From 0926c7e85f89be73b47706e02678cdee2813635f Mon Sep 17 00:00:00 2001 From: Robert Cronin Date: Thu, 24 Sep 2020 10:19:14 +0800 Subject: [PATCH] Add CA Functionality - generated files --- api/generated/client/.gitignore | 3 + api/generated/client/.swagger-codegen-ignore | 25 + api/generated/client/.swagger-codegen/VERSION | 1 + api/generated/client/api.ts | 281 + api/generated/client/configuration.ts | 66 + api/generated/client/custom.d.ts | 1 + api/generated/client/index.ts | 16 + api/generated/server/.swagger-codegen-ignore | 24 + api/generated/server/.swagger-codegen/VERSION | 1 + api/generated/server/README.md | 19 + api/generated/server/api/swagger.json | 96 + api/generated/server/controllers/Default.js | 25 + api/generated/server/index.js | 44 + api/generated/server/package.json | 20 + .../server/service/DefaultService.js | 45 + api/generated/server/utils/writer.js | 43 + dist/bin.js | 3958 +++-- dist/browser-client.d.ts | 48 - dist/browser-client.js | 13538 ---------------- dist/browser-client.js.map | 1 - dist/internal/daemon-script.js | 42 +- dist/polykey.js | 2945 ++-- dist/polykey.js.map | 2 +- media/dependencies.png | Bin 151149 -> 0 bytes nix/node-packages.nix | 1837 ++- package-lock.json | 1579 +- package.json | 2 +- proto/compiled/Agent_grpc_pb.d.ts | 636 + proto/compiled/Agent_grpc_pb.js | 598 +- proto/compiled/Agent_pb.d.ts | 1118 +- proto/compiled/Agent_pb.js | 7222 ++------- proto/compiled/Git_grpc_pb.d.ts | 58 - proto/compiled/Git_grpc_pb.js | 80 +- proto/compiled/Git_pb.d.ts | 40 +- proto/compiled/Git_pb.js | 511 +- proto/compiled/Peer_grpc_pb.d.ts | 4 +- proto/compiled/Peer_grpc_pb.js | 16 +- proto/compiled/Peer_pb.d.ts | 315 +- proto/compiled/Peer_pb.js | 1957 ++- proto/js/Agent.d.ts | 4513 ++---- proto/js/Agent.js | 8900 +++------- proto/js/Git.js | 8 +- proto/js/Peer.d.ts | 14 +- proto/js/Peer.js | 32 +- src/api/HttpApi.ts | 34 +- src/vaults/VaultManager.ts | 1 - 46 files changed, 15266 insertions(+), 35453 deletions(-) create mode 100644 api/generated/client/.gitignore create mode 100644 api/generated/client/.swagger-codegen-ignore create mode 100644 api/generated/client/.swagger-codegen/VERSION create mode 100644 api/generated/client/api.ts create mode 100644 api/generated/client/configuration.ts create mode 100644 api/generated/client/custom.d.ts create mode 100644 api/generated/client/index.ts create mode 100644 api/generated/server/.swagger-codegen-ignore create mode 100644 api/generated/server/.swagger-codegen/VERSION create mode 100644 api/generated/server/README.md create mode 100644 api/generated/server/api/swagger.json create mode 100644 api/generated/server/controllers/Default.js create mode 100644 api/generated/server/index.js create mode 100644 api/generated/server/package.json create mode 100644 api/generated/server/service/DefaultService.js create mode 100644 api/generated/server/utils/writer.js delete mode 100644 dist/browser-client.d.ts delete mode 100644 dist/browser-client.js delete mode 100644 dist/browser-client.js.map delete mode 100644 media/dependencies.png create mode 100644 proto/compiled/Agent_grpc_pb.d.ts delete mode 100644 proto/compiled/Git_grpc_pb.d.ts diff --git a/api/generated/client/.gitignore b/api/generated/client/.gitignore new file mode 100644 index 0000000000..35e2fb2b02 --- /dev/null +++ b/api/generated/client/.gitignore @@ -0,0 +1,3 @@ +wwwroot/*.js +node_modules +typings diff --git a/api/generated/client/.swagger-codegen-ignore b/api/generated/client/.swagger-codegen-ignore new file mode 100644 index 0000000000..f6b999b020 --- /dev/null +++ b/api/generated/client/.swagger-codegen-ignore @@ -0,0 +1,25 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md + +git_push.sh diff --git a/api/generated/client/.swagger-codegen/VERSION b/api/generated/client/.swagger-codegen/VERSION new file mode 100644 index 0000000000..a6254504e4 --- /dev/null +++ b/api/generated/client/.swagger-codegen/VERSION @@ -0,0 +1 @@ +2.3.1 \ No newline at end of file diff --git a/api/generated/client/api.ts b/api/generated/client/api.ts new file mode 100644 index 0000000000..e9954e113e --- /dev/null +++ b/api/generated/client/api.ts @@ -0,0 +1,281 @@ +/// +// tslint:disable +/** + * Polykey API + * Optional multiline or single-line description in [CommonMark](http://commonmark.org/help/) or HTML. + * + * OpenAPI spec version: 0.1.9 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +import * as url from "url"; +import * as portableFetch from "portable-fetch"; +import { Configuration } from "./configuration"; + +const BASE_PATH = "https://localhost".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface FetchAPI + */ +export interface FetchAPI { + (url: string, init?: any): Promise; +} + +/** + * + * @export + * @interface FetchArgs + */ +export interface FetchArgs { + url: string; + options: any; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected fetch: FetchAPI = portableFetch) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" + constructor(public field: string, msg?: string) { + super(msg); + } +} + +/** + * A JSON object containing a certificate signing request + * @export + * @interface CSRBody + */ +export interface CSRBody { + /** + * + * @type {string} + * @memberof CSRBody + */ + publicKey: string; + /** + * + * @type {string} + * @memberof CSRBody + */ + csr: string; +} + +/** + * A JSON object containing the root certificate + * @export + * @interface RootCertBody + */ +export interface RootCertBody { + /** + * + * @type {string} + * @memberof RootCertBody + */ + rootCert: string; +} + + +/** + * DefaultApi - fetch parameter creator + * @export + */ +export const DefaultApiFetchParamCreator = function (configuration?: Configuration) { + return { + /** + * Request a certificate from the polykey node CA + * @param {CSRBody} body Sign a certificate from a client + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + caCertificateSigningRequestPost(body: CSRBody, options: any = {}): FetchArgs { + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling caCertificateSigningRequestPost.'); + } + const localVarPath = `/ca/certificate_signing_request`; + const localVarUrlObj = url.parse(localVarPath, true); + const localVarRequestOptions = Object.assign({ method: 'POST' }, options); + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); + // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 + delete localVarUrlObj.search; + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + const needsSerialization = ("CSRBody" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || ""); + + return { + url: url.format(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns the root certificate for the polykey node. + * @summary Returns the root certificate. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + caRootCertificateGet(options: any = {}): FetchArgs { + const localVarPath = `/ca/root_certificate`; + const localVarUrlObj = url.parse(localVarPath, true); + const localVarRequestOptions = Object.assign({ method: 'GET' }, options); + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); + // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943 + delete localVarUrlObj.search; + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers); + + return { + url: url.format(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * DefaultApi - functional programming interface + * @export + */ +export const DefaultApiFp = function(configuration?: Configuration) { + return { + /** + * Request a certificate from the polykey node CA + * @param {CSRBody} body Sign a certificate from a client + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + caCertificateSigningRequestPost(body: CSRBody, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { + const localVarFetchArgs = DefaultApiFetchParamCreator(configuration).caCertificateSigningRequestPost(body, options); + return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => { + return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { + if (response.status >= 200 && response.status < 300) { + return response.json(); + } else { + throw response; + } + }); + }; + }, + /** + * Returns the root certificate for the polykey node. + * @summary Returns the root certificate. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + caRootCertificateGet(options?: any): (fetch?: FetchAPI, basePath?: string) => Promise { + const localVarFetchArgs = DefaultApiFetchParamCreator(configuration).caRootCertificateGet(options); + return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => { + return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => { + if (response.status >= 200 && response.status < 300) { + return response.json(); + } else { + throw response; + } + }); + }; + }, + } +}; + +/** + * DefaultApi - factory interface + * @export + */ +export const DefaultApiFactory = function (configuration?: Configuration, fetch?: FetchAPI, basePath?: string) { + return { + /** + * Request a certificate from the polykey node CA + * @param {CSRBody} body Sign a certificate from a client + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + caCertificateSigningRequestPost(body: CSRBody, options?: any) { + return DefaultApiFp(configuration).caCertificateSigningRequestPost(body, options)(fetch, basePath); + }, + /** + * Returns the root certificate for the polykey node. + * @summary Returns the root certificate. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + caRootCertificateGet(options?: any) { + return DefaultApiFp(configuration).caRootCertificateGet(options)(fetch, basePath); + }, + }; +}; + +/** + * DefaultApi - object-oriented interface + * @export + * @class DefaultApi + * @extends {BaseAPI} + */ +export class DefaultApi extends BaseAPI { + /** + * Request a certificate from the polykey node CA + * @param {} body Sign a certificate from a client + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public caCertificateSigningRequestPost(body: CSRBody, options?: any) { + return DefaultApiFp(this.configuration).caCertificateSigningRequestPost(body, options)(this.fetch, this.basePath); + } + + /** + * Returns the root certificate for the polykey node. + * @summary Returns the root certificate. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public caRootCertificateGet(options?: any) { + return DefaultApiFp(this.configuration).caRootCertificateGet(options)(this.fetch, this.basePath); + } + +} + diff --git a/api/generated/client/configuration.ts b/api/generated/client/configuration.ts new file mode 100644 index 0000000000..f9ad0de966 --- /dev/null +++ b/api/generated/client/configuration.ts @@ -0,0 +1,66 @@ +// tslint:disable +/** + * Polykey API + * Optional multiline or single-line description in [CommonMark](http://commonmark.org/help/) or HTML. + * + * OpenAPI spec version: 0.1.9 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | ((name: string) => string); + username?: string; + password?: string; + accessToken?: string | ((name: string, scopes?: string[]) => string); + basePath?: string; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | ((name: string) => string); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | ((name: string, scopes?: string[]) => string); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + } +} diff --git a/api/generated/client/custom.d.ts b/api/generated/client/custom.d.ts new file mode 100644 index 0000000000..02f969575e --- /dev/null +++ b/api/generated/client/custom.d.ts @@ -0,0 +1 @@ +declare module 'portable-fetch'; \ No newline at end of file diff --git a/api/generated/client/index.ts b/api/generated/client/index.ts new file mode 100644 index 0000000000..450e4e1d46 --- /dev/null +++ b/api/generated/client/index.ts @@ -0,0 +1,16 @@ +// tslint:disable +/** + * Polykey API + * Optional multiline or single-line description in [CommonMark](http://commonmark.org/help/) or HTML. + * + * OpenAPI spec version: 0.1.9 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; diff --git a/api/generated/server/.swagger-codegen-ignore b/api/generated/server/.swagger-codegen-ignore new file mode 100644 index 0000000000..7d16f766dc --- /dev/null +++ b/api/generated/server/.swagger-codegen-ignore @@ -0,0 +1,24 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md + diff --git a/api/generated/server/.swagger-codegen/VERSION b/api/generated/server/.swagger-codegen/VERSION new file mode 100644 index 0000000000..a6254504e4 --- /dev/null +++ b/api/generated/server/.swagger-codegen/VERSION @@ -0,0 +1 @@ +2.3.1 \ No newline at end of file diff --git a/api/generated/server/README.md b/api/generated/server/README.md new file mode 100644 index 0000000000..211055874d --- /dev/null +++ b/api/generated/server/README.md @@ -0,0 +1,19 @@ +# Swagger generated server + +## Overview +This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate a server stub. + +### Running the server +To run the server, run: + +``` +npm start +``` + +To view the Swagger UI interface: + +``` +open http://localhost:8080/docs +``` + +This project leverages the mega-awesome [swagger-tools](https://github.com/apigee-127/swagger-tools) middleware which does most all the work. diff --git a/api/generated/server/api/swagger.json b/api/generated/server/api/swagger.json new file mode 100644 index 0000000000..cabee12862 --- /dev/null +++ b/api/generated/server/api/swagger.json @@ -0,0 +1,96 @@ +{ + "swagger": "2.0", + "info": { + "description": "Optional multiline or single-line description in [CommonMark](http://commonmark.org/help/) or HTML.", + "version": "0.1.9", + "title": "Polykey API" + }, + "paths": { + "/ca/root_certificate": { + "get": { + "summary": "Returns the root certificate.", + "description": "Returns the root certificate for the polykey node.", + "operationId": "caRoot_certificateGET", + "parameters": [], + "responses": { + "200": { + "description": "Root certificate", + "schema": { + "$ref": "#/definitions/RootCertBody" + } + } + }, + "x-swagger-router-controller": "Default" + } + }, + "/ca/certificate_signing_request": { + "post": { + "description": "Request a certificate from the polykey node CA", + "operationId": "caCertificate_signing_requestPOST", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "description": "Sign a certificate from a client", + "required": true, + "schema": { + "$ref": "#/definitions/CSRBody" + } + } + ], + "responses": { + "200": { + "description": "Signed certificate", + "schema": { + "$ref": "#/definitions/CSRBody" + } + } + }, + "x-swagger-router-controller": "Default" + } + } + }, + "definitions": { + "CSRBody": { + "type": "object", + "required": [ + "csr", + "publicKey" + ], + "properties": { + "publicKey": { + "type": "string" + }, + "csr": { + "type": "string" + } + }, + "description": "A JSON object containing a certificate signing request", + "example": { + "csr": "csr", + "publicKey": "publicKey" + } + }, + "RootCertBody": { + "type": "object", + "required": [ + "root_cert" + ], + "properties": { + "root_cert": { + "type": "string" + } + }, + "description": "A JSON object containing the root certificate", + "example": { + "root_cert": "root_cert" + } + } + } +} diff --git a/api/generated/server/controllers/Default.js b/api/generated/server/controllers/Default.js new file mode 100644 index 0000000000..48d5ad3773 --- /dev/null +++ b/api/generated/server/controllers/Default.js @@ -0,0 +1,25 @@ +'use strict'; + +var utils = require('../utils/writer.js'); +var Default = require('../service/DefaultService'); + +module.exports.caCertificate_signing_requestPOST = function caCertificate_signing_requestPOST (req, res, next) { + var body = req.swagger.params['body'].value; + Default.caCertificate_signing_requestPOST(body) + .then(function (response) { + utils.writeJson(res, response); + }) + .catch(function (response) { + utils.writeJson(res, response); + }); +}; + +module.exports.caRoot_certificateGET = function caRoot_certificateGET (req, res, next) { + Default.caRoot_certificateGET() + .then(function (response) { + utils.writeJson(res, response); + }) + .catch(function (response) { + utils.writeJson(res, response); + }); +}; diff --git a/api/generated/server/index.js b/api/generated/server/index.js new file mode 100644 index 0000000000..2310e7b2fd --- /dev/null +++ b/api/generated/server/index.js @@ -0,0 +1,44 @@ +'use strict'; + +var fs = require('fs'), + path = require('path'), + http = require('http'); + +var app = require('connect')(); +var swaggerTools = require('swagger-tools'); +var jsyaml = require('js-yaml'); +var serverPort = 8080; + +// swaggerRouter configuration +var options = { + swaggerUi: path.join(__dirname, '/swagger.json'), + controllers: path.join(__dirname, './controllers'), + useStubs: process.env.NODE_ENV === 'development' // Conditionally turn on stubs (mock mode) +}; + +// The Swagger document (require it, build it programmatically, fetch it from a URL, ...) +var spec = fs.readFileSync(path.join(__dirname,'api/swagger.yaml'), 'utf8'); +var swaggerDoc = jsyaml.safeLoad(spec); + +// Initialize the Swagger middleware +swaggerTools.initializeMiddleware(swaggerDoc, function (middleware) { + + // Interpret Swagger resources and attach metadata to request - must be first in swagger-tools middleware chain + app.use(middleware.swaggerMetadata()); + + // Validate Swagger requests + app.use(middleware.swaggerValidator()); + + // Route validated requests to appropriate controller + app.use(middleware.swaggerRouter(options)); + + // Serve the Swagger documents and Swagger UI + app.use(middleware.swaggerUi()); + + // Start the server + http.createServer(app).listen(serverPort, function () { + console.log('Your server is listening on port %d (http://localhost:%d)', serverPort, serverPort); + console.log('Swagger-ui is available on http://localhost:%d/docs', serverPort); + }); + +}); diff --git a/api/generated/server/package.json b/api/generated/server/package.json new file mode 100644 index 0000000000..f206af220f --- /dev/null +++ b/api/generated/server/package.json @@ -0,0 +1,20 @@ +{ + "name": "polykey-api", + "version": "0.1.9", + "description": "Optional multiline or single-line description in [CommonMark](http://commonmark.org/help/) or HTML.", + "main": "index.js", + "scripts": { + "prestart": "npm install", + "start": "node index.js" + }, + "keywords": [ + "swagger" + ], + "license": "Unlicense", + "private": true, + "dependencies": { + "connect": "^3.2.0", + "js-yaml": "^3.3.0", + "swagger-tools": "0.10.1" + } +} diff --git a/api/generated/server/service/DefaultService.js b/api/generated/server/service/DefaultService.js new file mode 100644 index 0000000000..4d576d37b0 --- /dev/null +++ b/api/generated/server/service/DefaultService.js @@ -0,0 +1,45 @@ +'use strict'; + + +/** + * Request a certificate from the polykey node CA + * + * body CSRBody Sign a certificate from a client + * returns CSRBody + **/ +exports.caCertificate_signing_requestPOST = function(body) { + return new Promise(function(resolve, reject) { + var examples = {}; + examples['application/json'] = { + "csr" : "csr", + "publicKey" : "publicKey" +}; + if (Object.keys(examples).length > 0) { + resolve(examples[Object.keys(examples)[0]]); + } else { + resolve(); + } + }); +} + + +/** + * Returns the root certificate. + * Returns the root certificate for the polykey node. + * + * returns RootCertBody + **/ +exports.caRoot_certificateGET = function() { + return new Promise(function(resolve, reject) { + var examples = {}; + examples['application/json'] = { + "root_cert" : "root_cert" +}; + if (Object.keys(examples).length > 0) { + resolve(examples[Object.keys(examples)[0]]); + } else { + resolve(); + } + }); +} + diff --git a/api/generated/server/utils/writer.js b/api/generated/server/utils/writer.js new file mode 100644 index 0000000000..d79f6e1a52 --- /dev/null +++ b/api/generated/server/utils/writer.js @@ -0,0 +1,43 @@ +var ResponsePayload = function(code, payload) { + this.code = code; + this.payload = payload; +} + +exports.respondWithCode = function(code, payload) { + return new ResponsePayload(code, payload); +} + +var writeJson = exports.writeJson = function(response, arg1, arg2) { + var code; + var payload; + + if(arg1 && arg1 instanceof ResponsePayload) { + writeJson(response, arg1.payload, arg1.code); + return; + } + + if(arg2 && Number.isInteger(arg2)) { + code = arg2; + } + else { + if(arg1 && Number.isInteger(arg1)) { + code = arg1; + } + } + if(code && arg1) { + payload = arg1; + } + else if(arg1) { + payload = arg1; + } + + if(!code) { + // if no response code given, we default to 200 + code = 200; + } + if(typeof payload === 'object') { + payload = JSON.stringify(payload, null, 2); + } + response.writeHead(code, {'Content-Type': 'application/json'}); + response.end(payload); +} diff --git a/dist/bin.js b/dist/bin.js index c2c5d2b17f..622112db69 100644 --- a/dist/bin.js +++ b/dist/bin.js @@ -91,18 +91,24 @@ return /******/ (function(modules) { // webpackBootstrap /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 31); +/******/ return __webpack_require__(__webpack_require__.s = 32); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ +/***/ (function(module, exports) { + +module.exports = require("path"); + +/***/ }), +/* 1 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const Peer_1 = __webpack_require__(7); -const utils_1 = __webpack_require__(11); +const Peer_1 = __webpack_require__(6); +const utils_1 = __webpack_require__(9); class Address { constructor(host, port) { const parsedAddress = Address.parseHelper(`${host}:${port}`); @@ -162,15 +168,19 @@ exports.Address = Address; */ Address.AddressRegex = /^([a-zA-Z.]+|(?:[0-9]{1,3}\.){3}[0-9]{1,3})(?::)([0-9]{1,5})$/; class PeerInfo { - constructor(publicKey, connectedAddress, relayPublicKey) { + constructor(publicKey, relayPublicKey, peerAddress, apiAddress) { this.publicKey = PeerInfo.formatPublicKey(publicKey); - if (connectedAddress) { - const addr = Address.parse(connectedAddress); - this.peerAddress = addr; - } if (relayPublicKey) { this.relayPublicKey = PeerInfo.formatPublicKey(relayPublicKey); } + if (peerAddress) { + const addr = Address.parse(peerAddress); + this.peerAddress = addr; + } + if (apiAddress) { + const addr = Address.parse(apiAddress); + this.apiAddress = addr; + } } static formatPublicKey(str) { const startString = '-----BEGIN PGP PUBLIC KEY BLOCK-----'; @@ -178,33 +188,28 @@ class PeerInfo { return str.slice(str.indexOf(startString), str.indexOf(endString) + endString.length); } deepCopy() { - var _a; - return new PeerInfo(this.publicKey, (_a = this.peerAddress) === null || _a === void 0 ? void 0 : _a.toString(), this.relayPublicKey); + var _a, _b; + return new PeerInfo(this.publicKey, this.relayPublicKey, (_a = this.peerAddress) === null || _a === void 0 ? void 0 : _a.toString(), (_b = this.apiAddress) === null || _b === void 0 ? void 0 : _b.toString()); } toStringB64() { - var _a; + var _a, _b; const message = Peer_1.peerInterface.PeerInfoMessage.encodeDelimited({ publicKey: this.publicKey, - peerAddress: (_a = this.peerAddress) === null || _a === void 0 ? void 0 : _a.toString(), relayPublicKey: this.relayPublicKey, + peerAddress: (_a = this.peerAddress) === null || _a === void 0 ? void 0 : _a.toString(), + apiAddress: (_b = this.apiAddress) === null || _b === void 0 ? void 0 : _b.toString(), }).finish(); return utils_1.protobufToString(message); } static parseB64(str) { const message = utils_1.stringToProtobuf(str); const decoded = Peer_1.peerInterface.PeerInfoMessage.decodeDelimited(message); - return new PeerInfo(decoded.publicKey, decoded.peerAddress, decoded.relayPublicKey); + return new PeerInfo(decoded.publicKey, decoded.relayPublicKey, decoded.peerAddress, decoded.apiAddress); } } exports.default = PeerInfo; -/***/ }), -/* 1 */ -/***/ (function(module, exports) { - -module.exports = require("path"); - /***/ }), /* 2 */ /***/ (function(module, exports) { @@ -215,7 +220,7 @@ module.exports = require("commander"); /* 3 */ /***/ (function(module, exports) { -module.exports = require("fs"); +module.exports = require("../proto/compiled/Agent_pb"); /***/ }), /* 4 */ @@ -226,59 +231,29 @@ module.exports = require("fs"); var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; -Object.defineProperty(exports, "__esModule", { value: true }); -const os_1 = __importDefault(__webpack_require__(8)); -const PeerInfo_1 = __importDefault(__webpack_require__(0)); -exports.PeerInfo = PeerInfo_1.default; -const KeyManager_1 = __importDefault(__webpack_require__(34)); -exports.KeyManager = KeyManager_1.default; -const PeerManager_1 = __importDefault(__webpack_require__(37)); -exports.PeerManager = PeerManager_1.default; -const VaultManager_1 = __importDefault(__webpack_require__(48)); -exports.VaultManager = VaultManager_1.default; -const PolykeyAgent_1 = __importDefault(__webpack_require__(65)); -exports.PolykeyAgent = PolykeyAgent_1.default; -const PolykeyClient_1 = __importDefault(__webpack_require__(29)); -exports.PolykeyClient = PolykeyClient_1.default; -class Polykey { - constructor(polykeyPath = `${os_1.default.homedir()}/.polykey`, fileSystem, keyManager, peerManager, vaultManager) { - this.polykeyPath = polykeyPath; - // Set key manager - this.keyManager = keyManager !== null && keyManager !== void 0 ? keyManager : new KeyManager_1.default(this.polykeyPath, fileSystem); - // Initialize peer store and peer discovery classes - this.peerManager = peerManager !== null && peerManager !== void 0 ? peerManager : new PeerManager_1.default(this.polykeyPath, fileSystem, this.keyManager); - // Set or Initialize vaultManager - this.vaultManager = vaultManager !== null && vaultManager !== void 0 ? vaultManager : new VaultManager_1.default(this.polykeyPath, fileSystem, this.keyManager, this.peerManager); - } -} -exports.default = Polykey; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports) { - -module.exports = require("../proto/js/Agent"); - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; }; Object.defineProperty(exports, "__esModule", { value: true }); const os_1 = __importDefault(__webpack_require__(8)); -const chalk_1 = __importDefault(__webpack_require__(68)); +const chalk_1 = __importDefault(__webpack_require__(76)); +const Polykey_1 = __webpack_require__(31); +const pb = __importStar(__webpack_require__(3)); /*******************************************/ -// Error handler -function actionErrorHanlder(error) { - console.error(chalk_1.default.red(error.message)); -} function actionRunner(fn) { - return (...args) => fn(...args).catch(actionErrorHanlder); + return (...args) => fn(...args) + .catch((error) => { + pkLogger(error.message, PKMessageType.ERROR); + }) + .finally(() => { + if (true) { + process.exit(0); + } + }); } exports.actionRunner = actionRunner; function resolveTilde(filePath) { @@ -295,19 +270,23 @@ var PKMessageType; PKMessageType[PKMessageType["SUCCESS"] = 0] = "SUCCESS"; PKMessageType[PKMessageType["INFO"] = 1] = "INFO"; PKMessageType[PKMessageType["WARNING"] = 2] = "WARNING"; - PKMessageType[PKMessageType["none"] = 3] = "none"; + PKMessageType[PKMessageType["ERROR"] = 3] = "ERROR"; + PKMessageType[PKMessageType["none"] = 4] = "none"; })(PKMessageType || (PKMessageType = {})); exports.PKMessageType = PKMessageType; function pkLogger(message, type) { switch (type) { case PKMessageType.SUCCESS: - console.log(chalk_1.default.green(message)); + console.log(chalk_1.default.greenBright(message)); break; case PKMessageType.INFO: - console.log(chalk_1.default.blue(message)); + console.log(chalk_1.default.blueBright(message)); break; case PKMessageType.WARNING: - console.log(chalk_1.default.yellow(message)); + console.log(chalk_1.default.yellowBright(message)); + break; + case PKMessageType.ERROR: + console.error(chalk_1.default.redBright(message)); break; default: console.log(message); @@ -316,41 +295,74 @@ function pkLogger(message, type) { } exports.pkLogger = pkLogger; function determineNodePath(nodePath) { - const resolvedNodePath = nodePath !== null && nodePath !== void 0 ? nodePath : process.env.KEYNODE_PATH; + const resolvedNodePath = nodePath !== null && nodePath !== void 0 ? nodePath : process.env.PK_PATH; if (!resolvedNodePath) { - throw Error('no keynode path given, you can set it as an environment variable with "export KEYNODE_PATH=\'\'"'); + throw Error('no keynode path given, you can set it as an environment variable with "export PK_PATH=\'\'"'); } return resolveTilde(resolvedNodePath); } exports.determineNodePath = determineNodePath; +function promisifyGrpc(fn) { + return (request) => { + return new Promise((resolve, reject) => { + function customCallback(error, response) { + if (error) { + return reject(error); + } + return resolve(response); + } + fn(request, customCallback); + return; + }); + }; +} +exports.promisifyGrpc = promisifyGrpc; +async function getAgentClient(polykeyPath, daemon = false, restartOnStopped = true, failOnNotInitialized = true) { + if (restartOnStopped) { + // make sure agent is running + const pid = await Polykey_1.PolykeyAgent.startAgent(polykeyPath, daemon, failOnNotInitialized); + if (typeof pid == 'number') { + pkLogger(`agent has started with a pid of ${pid}`, PKMessageType.SUCCESS); + } + } + const client = Polykey_1.PolykeyAgent.connectToAgent(polykeyPath); + const res = (await promisifyGrpc(client.getStatus.bind(client))(new pb.EmptyMessage())); + if (res.getStatus() != pb.AgentStatusType.ONLINE) { + throw Error('agent is not running and could not be restarted'); + } + else { + return client; + } +} +exports.getAgentClient = getAgentClient; /***/ }), -/* 7 */ +/* 5 */ /***/ (function(module, exports) { -module.exports = require("../proto/js/Peer"); +module.exports = require("fs"); /***/ }), -/* 8 */ +/* 6 */ /***/ (function(module, exports) { -module.exports = require("os"); +module.exports = require("../proto/js/Peer"); /***/ }), -/* 9 */ +/* 7 */ /***/ (function(module, exports) { module.exports = require("events"); /***/ }), -/* 10 */ +/* 8 */ /***/ (function(module, exports) { -module.exports = require("net"); +module.exports = require("os"); /***/ }), -/* 11 */ +/* 9 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -363,7 +375,7 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", { value: true }); -const protobufjs = __importStar(__webpack_require__(33)); +const protobufjs = __importStar(__webpack_require__(39)); /** * Returns a 5 character long random string of lower case letters */ @@ -417,19 +429,25 @@ exports.sleep = sleep; /***/ }), -/* 12 */ +/* 10 */ +/***/ (function(module, exports) { + +module.exports = require("net"); + +/***/ }), +/* 11 */ /***/ (function(module, exports) { module.exports = require("../proto/compiled/Peer_pb"); /***/ }), -/* 13 */ +/* 12 */ /***/ (function(module, exports) { module.exports = require("readable-stream"); /***/ }), -/* 14 */ +/* 13 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -438,11 +456,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const dgram_1 = __importDefault(__webpack_require__(16)); -const cyclist_1 = __importDefault(__webpack_require__(41)); -const events_1 = __webpack_require__(9); -const readable_stream_1 = __webpack_require__(13); -const PeerInfo_1 = __webpack_require__(0); +const dgram_1 = __importDefault(__webpack_require__(18)); +const cyclist_1 = __importDefault(__webpack_require__(48)); +const events_1 = __webpack_require__(7); +const readable_stream_1 = __webpack_require__(12); +const PeerInfo_1 = __webpack_require__(1); const EXTENSION = 0; const VERSION = 1; const UINT16 = 0xffff; @@ -832,55 +850,109 @@ exports.connect = connect; /***/ }), -/* 15 */ +/* 14 */ /***/ (function(module, exports) { -module.exports = require("crypto"); +module.exports = require("@grpc/grpc-js"); + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const os_1 = __importDefault(__webpack_require__(8)); +const HttpApi_1 = __importDefault(__webpack_require__(34)); +const KeyManager_1 = __importDefault(__webpack_require__(40)); +exports.KeyManager = KeyManager_1.default; +const PeerManager_1 = __importDefault(__webpack_require__(44)); +exports.PeerManager = PeerManager_1.default; +const VaultManager_1 = __importDefault(__webpack_require__(55)); +exports.VaultManager = VaultManager_1.default; +const PolykeyAgent_1 = __importDefault(__webpack_require__(72)); +exports.PolykeyAgent = PolykeyAgent_1.default; +const PeerInfo_1 = __importStar(__webpack_require__(1)); +exports.PeerInfo = PeerInfo_1.default; +exports.Address = PeerInfo_1.Address; +class Polykey { + constructor(polykeyPath = `${os_1.default.homedir()}/.polykey`, fileSystem, keyManager, peerManager, vaultManager) { + this.polykeyPath = polykeyPath; + // Set key manager + this.keyManager = keyManager !== null && keyManager !== void 0 ? keyManager : new KeyManager_1.default(this.polykeyPath, fileSystem); + // Initialize peer store and peer discovery classes + this.peerManager = peerManager !== null && peerManager !== void 0 ? peerManager : new PeerManager_1.default(this.polykeyPath, fileSystem, this.keyManager); + // Set or Initialize vaultManager + this.vaultManager = vaultManager !== null && vaultManager !== void 0 ? vaultManager : new VaultManager_1.default(this.polykeyPath, fileSystem, this.keyManager, this.peerManager); + // start the api + this.httpApi = new HttpApi_1.default((() => this.peerManager.peerInfo).bind(this), ((apiAddress) => { + this.peerManager.peerInfo.apiAddress = apiAddress; + }).bind(this), this.keyManager.pki.handleCSR.bind(this), (() => this.keyManager.pki.RootCert).bind(this)); + } +} +exports.default = Polykey; + /***/ }), /* 16 */ /***/ (function(module, exports) { -module.exports = require("dgram"); +module.exports = require("crypto"); /***/ }), /* 17 */ /***/ (function(module, exports) { -module.exports = require("@grpc/grpc-js"); +module.exports = require("util"); /***/ }), /* 18 */ /***/ (function(module, exports) { -module.exports = require("../proto/compiled/Peer_grpc_pb"); +module.exports = require("dgram"); /***/ }), /* 19 */ /***/ (function(module, exports) { -module.exports = require("isomorphic-git"); +module.exports = require("../proto/compiled/Peer_grpc_pb"); /***/ }), /* 20 */ /***/ (function(module, exports) { -module.exports = require("encryptedfs"); +module.exports = require("isomorphic-git"); /***/ }), /* 21 */ /***/ (function(module, exports) { -module.exports = require("virtualfs"); +module.exports = require("encryptedfs"); /***/ }), /* 22 */ /***/ (function(module, exports) { -module.exports = require("../proto/js/Git"); +module.exports = require("virtualfs"); /***/ }), /* 23 */ +/***/ (function(module, exports) { + +module.exports = require("../proto/js/Git"); + +/***/ }), +/* 24 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -980,7 +1052,7 @@ exports.default = GitPktLine; /***/ }), -/* 24 */ +/* 25 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -990,8 +1062,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); // This is a convenience wrapper for reading and writing files in the 'refs' directory. -const path_1 = __importDefault(__webpack_require__(1)); -const GitPackedRefs_1 = __importDefault(__webpack_require__(53)); +const path_1 = __importDefault(__webpack_require__(0)); +const GitPackedRefs_1 = __importDefault(__webpack_require__(60)); // @see https://git-scm.com/docs/git-rev-parse.html#_specifying_revisions const refpaths = (ref) => [ `${ref}`, @@ -1112,13 +1184,13 @@ exports.default = GitRefManager; /***/ }), -/* 25 */ +/* 26 */ /***/ (function(module, exports) { module.exports = require("pako"); /***/ }), -/* 26 */ +/* 27 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1308,7 +1380,7 @@ exports.default = GitCommit; /***/ }), -/* 27 */ +/* 28 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1317,10 +1389,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const fs_1 = __importDefault(__webpack_require__(3)); -const pako_1 = __importDefault(__webpack_require__(25)); -const path_1 = __importDefault(__webpack_require__(1)); -const GitObject_1 = __importDefault(__webpack_require__(58)); +const fs_1 = __importDefault(__webpack_require__(5)); +const pako_1 = __importDefault(__webpack_require__(26)); +const path_1 = __importDefault(__webpack_require__(0)); +const GitObject_1 = __importDefault(__webpack_require__(65)); const PackfileCache = new Map(); class GitObjectManager { static async read(fileSystem, gitdir, oid, format = 'content') { @@ -1379,17 +1451,64 @@ exports.default = GitObjectManager; /***/ }), -/* 28 */ +/* 29 */ /***/ (function(module, exports) { module.exports = require("process"); /***/ }), -/* 29 */ +/* 30 */ +/***/ (function(module, exports) { + +module.exports = require("child_process"); + +/***/ }), +/* 31 */ +/***/ (function(module, exports) { + +module.exports = require("./polykey.js"); + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const commander_1 = __webpack_require__(2); +const agent_1 = __importDefault(__webpack_require__(33)); +const peers_1 = __importDefault(__webpack_require__(77)); +const crypto_1 = __importDefault(__webpack_require__(81)); +const vaults_1 = __importDefault(__webpack_require__(82)); +const secrets_1 = __importDefault(__webpack_require__(83)); +const keys_1 = __importDefault(__webpack_require__(84)); +/*******************************************/ +const polykey = new commander_1.program.Command(); +polykey + .version(__webpack_require__(85).version, '--version', 'output the current version') + .addCommand(keys_1.default()) + .addCommand(secrets_1.default()) + .addCommand(vaults_1.default()) + .addCommand(peers_1.default()) + .addCommand(crypto_1.default()) + .addCommand(agent_1.default()); +module.exports = function (argv) { + polykey.parse(argv); +}; + + +/***/ }), +/* 33 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; @@ -1398,678 +1517,130 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", { value: true }); -const PeerInfo_1 = __importStar(__webpack_require__(0)); -const Agent_1 = __webpack_require__(5); -class PolykeyClient { - constructor(getStream) { - this.getStream = getStream; - } - async sendRequestToAgent(request) { - const stream = this.getStream(); - const responseList = await new Promise((resolve, reject) => { - try { - const responseList = []; - stream.on('data', (data) => { - if (data instanceof Uint8Array) { - responseList.push(data); - } - else { - responseList.push(...data); - } - }); - stream.on('error', (err) => { - reject(err); - }); - stream.on('end', () => { - resolve(responseList); - }); - if (!stream.writableEnded) { - stream.write(request); - } +const commander_1 = __importDefault(__webpack_require__(2)); +const Polykey_1 = __webpack_require__(15); +const pb = __importStar(__webpack_require__(3)); +const utils_1 = __webpack_require__(4); +function makeStartAgentCommand() { + return new commander_1.default.Command('start') + .description('start the agent') + .option('--node-path ', 'node path') + .option('-d, --daemon', 'start the agent as a daemon process') + .action(utils_1.actionRunner(async (options) => { + const nodePath = utils_1.determineNodePath(options.nodePath); + try { + const client = Polykey_1.PolykeyAgent.connectToAgent(nodePath); + const res = (await utils_1.promisifyGrpc(client.getStatus.bind(client))(new pb.EmptyMessage())); + if (res.getStatus() == pb.AgentStatusType.ONLINE) { + utils_1.pkLogger(`agent is already running`, utils_1.PKMessageType.INFO); } - catch (err) { - reject(err); + else { + throw Error(`agent is not running`); } - }); - return responseList; - } - async handleAgentCommunication(type, nodePath, request) { - // Encode message and sent - const agentMessage = Agent_1.agentInterface.AgentMessage.encodeDelimited({ - type: type, - isResponse: false, - nodePath: nodePath, - subMessage: request, - }).finish(); - const responseList = await this.sendRequestToAgent(agentMessage); - const agentMessageList = []; - for (const response of responseList.values()) { - const { subMessage, type } = Agent_1.agentInterface.AgentMessage.decodeDelimited(response); - if (type == Agent_1.agentInterface.AgentMessageType.ERROR) { - const { error } = Agent_1.agentInterface.ErrorMessage.decodeDelimited(subMessage); - const reason = new Error(`Agent Error: ${error}`); - throw reason; + } + catch (error) { + const pid = await Polykey_1.PolykeyAgent.startAgent(nodePath, options.daemon); + const client = Polykey_1.PolykeyAgent.connectToAgent(nodePath); + const res = (await utils_1.promisifyGrpc(client.getStatus.bind(client))(new pb.EmptyMessage())); + if (res.getStatus() == pb.AgentStatusType.ONLINE) { + utils_1.pkLogger(`agent has started with a pid of ${pid}`, utils_1.PKMessageType.SUCCESS); } else { - agentMessageList.push(Agent_1.agentInterface.AgentMessage.decodeDelimited(response)); + utils_1.pkLogger(`agent could not be started`, utils_1.PKMessageType.ERROR); } } - return agentMessageList; - } - async registerNode(path, passphrase) { - var _a; - const registerNodeRequest = Agent_1.agentInterface.RegisterNodeRequestMessage.encodeDelimited({ passphrase }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.REGISTER_NODE, path, registerNodeRequest); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.REGISTER_NODE)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.RegisterNodeResponseMessage.decodeDelimited(subMessage); - return successful; - } - async newNode(path, userId, passphrase, nbits) { - var _a; - const newNodeRequest = Agent_1.agentInterface.NewNodeRequestMessage.encodeDelimited({ - userId, - passphrase, - nbits, - }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.NEW_NODE, path, newNodeRequest); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.NEW_NODE)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.NewNodeResponseMessage.decodeDelimited(subMessage); - return successful; - } - async listNodes(unlockedOnly = true) { - var _a; - const newNodeRequest = Agent_1.agentInterface.ListNodesRequestMessage.encodeDelimited({ unlockedOnly }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_NODES, undefined, newNodeRequest); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_NODES)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { nodes } = Agent_1.agentInterface.ListNodesResponseMessage.decodeDelimited(subMessage); - return nodes; - } - ///////////////////// - // Key commands // - ///////////////////// - async deriveKey(nodePath, keyName, passphrase) { - var _a; - const request = Agent_1.agentInterface.DeriveKeyRequestMessage.encodeDelimited({ keyName, passphrase }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DERIVE_KEY, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DERIVE_KEY)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.DeriveKeyResponseMessage.decodeDelimited(subMessage); - return successful; - } - async deleteKey(nodePath, keyName) { - var _a; - const request = Agent_1.agentInterface.DeleteKeyRequestMessage.encodeDelimited({ keyName }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DELETE_KEY, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DELETE_KEY)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.DeleteKeyResponseMessage.decodeDelimited(subMessage); - return successful; - } - async listKeys(nodePath) { - var _a; - const request = Agent_1.agentInterface.ListKeysRequestMessage.encodeDelimited({}).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_KEYS, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_KEYS)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { keyNames } = Agent_1.agentInterface.ListKeysResponseMessage.decodeDelimited(subMessage); - return keyNames; - } - async getKey(nodePath, keyName) { - var _a; - const request = Agent_1.agentInterface.GetKeyRequestMessage.encodeDelimited({ keyName }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.GET_KEY, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.GET_KEY)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { keyContent } = Agent_1.agentInterface.GetKeyResponseMessage.decodeDelimited(subMessage); - return keyContent; - } - async getPrimaryKeyPair(nodePath, includePrivateKey = false) { - var _a; - const request = Agent_1.agentInterface.GetPrimaryKeyPairRequestMessage.encodeDelimited({ includePrivateKey }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.GET_PRIMARY_KEYPAIR, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.GET_PRIMARY_KEYPAIR)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { publicKey, privateKey } = Agent_1.agentInterface.GetPrimaryKeyPairResponseMessage.decodeDelimited(subMessage); - return { publicKey, privateKey }; - } - ///////////////////// - // Crypto commands // - ///////////////////// - async signFile(nodePath, filePath, privateKeyPath, passphrase) { - var _a; - const request = Agent_1.agentInterface.SignFileRequestMessage.encodeDelimited({ - filePath, - privateKeyPath, - passphrase, - }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.SIGN_FILE, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.SIGN_FILE)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { signaturePath } = Agent_1.agentInterface.SignFileResponseMessage.decodeDelimited(subMessage); - return signaturePath; - } - async verifyFile(nodePath, filePath, publicKeyPath) { - var _a; - const request = Agent_1.agentInterface.VerifyFileRequestMessage.encodeDelimited({ filePath, publicKeyPath }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.VERIFY_FILE, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.VERIFY_FILE)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { verified } = Agent_1.agentInterface.VerifyFileResponseMessage.decodeDelimited(subMessage); - return verified; - } - async encryptFile(nodePath, filePath, publicKeyPath) { - var _a; - const request = Agent_1.agentInterface.EncryptFileRequestMessage.encodeDelimited({ filePath, publicKeyPath }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.ENCRYPT_FILE, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.ENCRYPT_FILE)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { encryptedPath } = Agent_1.agentInterface.EncryptFileResponseMessage.decodeDelimited(subMessage); - return encryptedPath; - } - async decryptFile(nodePath, filePath, privateKeyPath, passphrase) { - var _a; - const request = Agent_1.agentInterface.DecryptFileRequestMessage.encodeDelimited({ - filePath, - privateKeyPath, - passphrase, - }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DECRYPT_FILE, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DECRYPT_FILE)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { decryptedPath } = Agent_1.agentInterface.DecryptFileResponseMessage.decodeDelimited(subMessage); - return decryptedPath; - } - ////////////////////// - // Vault Operations // - ////////////////////// - async listVaults(nodePath) { - var _a; - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_VAULTS, nodePath); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_VAULTS)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { vaultNames } = Agent_1.agentInterface.ListVaultsResponseMessage.decodeDelimited(subMessage); - return vaultNames; - } - async scanVaultNames(nodePath, publicKey) { - var _a; - const request = Agent_1.agentInterface.ScanVaultNamesRequestMessage.encodeDelimited({ publicKey }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.SCAN_VAULT_NAMES, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.SCAN_VAULT_NAMES)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { vaultNames } = Agent_1.agentInterface.ScanVaultNamesResponseMessage.decodeDelimited(subMessage); - return vaultNames; - } - async newVault(nodePath, vaultName) { - var _a; - const request = Agent_1.agentInterface.NewVaultRequestMessage.encodeDelimited({ vaultName }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.NEW_VAULT, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.NEW_VAULT)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.NewVaultResponseMessage.decodeDelimited(subMessage); - return successful; - } - async pullVault(nodePath, vaultName, publicKey) { - var _a; - const request = Agent_1.agentInterface.PullVaultRequestMessage.encodeDelimited({ vaultName, publicKey }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.PULL_VAULT, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.PULL_VAULT)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.PullVaultResponseMessage.decodeDelimited(subMessage); - return successful; - } - async destroyVault(nodePath, vaultName) { - var _a; - const request = Agent_1.agentInterface.DestroyVaultRequestMessage.encodeDelimited({ vaultName }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DESTROY_VAULT, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DESTROY_VAULT)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.DestroyVaultResponseMessage.decodeDelimited(subMessage); - return successful; - } - /////////////////////// - // Secret Operations // - /////////////////////// - async listSecrets(nodePath, vaultName) { - var _a; - const request = Agent_1.agentInterface.ListSecretsRequestMessage.encodeDelimited({ vaultName }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_SECRETS, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_SECRETS)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { secretNames } = Agent_1.agentInterface.ListSecretsResponseMessage.decodeDelimited(subMessage); - return secretNames; - } - async createSecret(nodePath, vaultName, secretName, secret) { - var _a; - let request; - if (typeof secret == 'string') { - request = Agent_1.agentInterface.CreateSecretRequestMessage.encodeDelimited({ - vaultName, - secretName, - secretPath: secret, - }).finish(); - } - else { - request = Agent_1.agentInterface.CreateSecretRequestMessage.encodeDelimited({ - vaultName, - secretName, - secretContent: secret, - }).finish(); - } - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.CREATE_SECRET, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.CREATE_SECRET)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.CreateSecretResponseMessage.decodeDelimited(subMessage); - return successful; - } - async destroySecret(nodePath, vaultName, secretName) { - var _a; - const request = Agent_1.agentInterface.DestroySecretRequestMessage.encodeDelimited({ vaultName, secretName }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DESTROY_SECRET, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DESTROY_SECRET)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.DestroySecretResponseMessage.decodeDelimited(subMessage); - return successful; - } - async getSecret(nodePath, vaultName, secretName) { - var _a; - const request = Agent_1.agentInterface.GetSecretRequestMessage.encodeDelimited({ vaultName, secretName }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.GET_SECRET, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.GET_SECRET)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { secret } = Agent_1.agentInterface.GetSecretResponseMessage.decodeDelimited(subMessage); - return Buffer.from(secret); - } - async updateSecret(nodePath, vaultName, secretName, secret) { - var _a; - let request; - if (typeof secret == 'string') { - request = Agent_1.agentInterface.UpdateSecretRequestMessage.encodeDelimited({ - vaultName, - secretName, - secretPath: secret, - }).finish(); - } - else { - request = Agent_1.agentInterface.UpdateSecretRequestMessage.encodeDelimited({ - vaultName, - secretName, - secretContent: secret, - }).finish(); - } - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.UPDATE_SECRET, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.UPDATE_SECRET)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.UpdateSecretResponseMessage.decodeDelimited(subMessage); - return successful; - } - ///////////////////// - // Peer Operations // - ///////////////////// - async addPeer(nodePath, publicKey, peerAddress, relayPublicKey) { - var _a; - const request = Agent_1.agentInterface.AddPeerRequestMessage.encodeDelimited({ - publicKey, - peerAddress, - relayPublicKey, - }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.ADD_PEER, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.ADD_PEER)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.AddPeerResponseMessage.decodeDelimited(subMessage); - return successful; - } - async getPeerInfo(nodePath, current = false, publicKey) { - var _a; - const request = Agent_1.agentInterface.PeerInfoRequestMessage.encodeDelimited({ current, publicKey }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.GET_PEER_INFO, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.GET_PEER_INFO)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { publicKey: responsePublicKey, peerAddress, relayPublicKey, } = Agent_1.agentInterface.PeerInfoResponseMessage.decodeDelimited(subMessage); - return new PeerInfo_1.default(responsePublicKey, peerAddress, relayPublicKey); - } - async pingPeer(nodePath, publicKey, timeout) { - var _a; - const request = Agent_1.agentInterface.PingPeerRequestMessage.encodeDelimited({ publicKey, timeout }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.PING_PEER, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.PING_PEER)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.PingPeerResponseMessage.decodeDelimited(subMessage); - return successful; - } - async findPeer(nodePath, publicKey, timeout) { - var _a; - const request = Agent_1.agentInterface.FindPeerRequestMessage.encodeDelimited({ publicKey, timeout }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.FIND_PEER, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.FIND_PEER)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.FindPeerResponseMessage.decodeDelimited(subMessage); - return successful; - } - async findSocialPeer(nodePath, handle, service, timeout) { - var _a; - const request = Agent_1.agentInterface.FindSocialPeerRequestMessage.encodeDelimited({ handle, service, timeout }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.FIND_SOCIAL_PEER, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.FIND_SOCIAL_PEER)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.FindSocialPeerResponseMessage.decodeDelimited(subMessage); - return successful; - } - async listPeers(nodePath) { - var _a; - const request = Agent_1.agentInterface.ListPeersRequestMessage.encodeDelimited({}).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_PEERS, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_PEERS)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { publicKeys } = Agent_1.agentInterface.ListPeersResponseMessage.decodeDelimited(subMessage); - return publicKeys; - } - async toggleStealth(nodePath, active) { - var _a; - const request = Agent_1.agentInterface.ToggleStealthRequestMessage.encodeDelimited({ active }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.TOGGLE_STEALTH, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.TOGGLE_STEALTH)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.ToggleStealthResponseMessage.decodeDelimited(subMessage); - return successful; - } - async updatePeer(nodePath, publicKey, currentNode, peerHost, peerPort, relayPublicKey) { - var _a; - const request = Agent_1.agentInterface.UpdatePeerInfoRequestMessage.encodeDelimited({ - publicKey, - currentNode, - peerHost, - peerPort, - relayPublicKey, - }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.UPDATE_PEER_INFO, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.UPDATE_PEER_INFO)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.UpdatePeerInfoResponseMessage.decodeDelimited(subMessage); - return successful; - } - async requestRelay(nodePath, publicKey) { - var _a; - const request = Agent_1.agentInterface.RequestRelayRequestMessage.encodeDelimited({ publicKey }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.REQUEST_RELAY, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.REQUEST_RELAY)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.RequestRelayResponseMessage.decodeDelimited(subMessage); - return successful; - } - async requestPunch(nodePath, publicKey) { - var _a; - const request = Agent_1.agentInterface.RequestPunchRequestMessage.encodeDelimited({ publicKey }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.REQUEST_PUNCH, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.REQUEST_PUNCH)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { address } = Agent_1.agentInterface.RequestPunchResponseMessage.decodeDelimited(subMessage); - return PeerInfo_1.Address.parse(address); - } - /////////////////// - // Agent control // - /////////////////// - async getAgentStatus() { - var _a; - try { - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.STATUS); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.STATUS)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { status } = Agent_1.agentInterface.AgentStatusResponseMessage.decodeDelimited(subMessage); - return status; - } - catch (err) { - if (err.toString().match(/ECONNRESET|ENOENT|ECONNRESET/)) { - return Agent_1.agentInterface.AgentStatusType.OFFLINE; - } - throw err; - } - } - async stopAgent() { - try { - // Tell it to start shutting and wait for response - await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.STOP_AGENT); - return true; - } - catch (err) { - return (await this.getAgentStatus()) != Agent_1.agentInterface.AgentStatusType.ONLINE; - } - } -} -exports.default = PolykeyClient; - - -/***/ }), -/* 30 */ -/***/ (function(module, exports) { - -module.exports = require("child_process"); - -/***/ }), -/* 31 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const commander_1 = __webpack_require__(2); -const agent_1 = __importDefault(__webpack_require__(32)); -const peers_1 = __importDefault(__webpack_require__(69)); -const crypto_1 = __importDefault(__webpack_require__(73)); -const vaults_1 = __importDefault(__webpack_require__(74)); -const secrets_1 = __importDefault(__webpack_require__(75)); -const keys_1 = __importDefault(__webpack_require__(76)); -/*******************************************/ -const polykey = new commander_1.program.Command(); -polykey - .version(__webpack_require__(77).version, '--version', 'output the current version') - .addCommand(keys_1.default()) - .addCommand(secrets_1.default()) - .addCommand(vaults_1.default()) - .addCommand(peers_1.default()) - .addCommand(crypto_1.default()) - .addCommand(agent_1.default()); -module.exports = function (argv) { - polykey.parse(argv); -}; - - -/***/ }), -/* 32 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const fs_1 = __importDefault(__webpack_require__(3)); -const commander_1 = __importDefault(__webpack_require__(2)); -const Polykey_1 = __webpack_require__(4); -const utils_1 = __webpack_require__(6); -const Agent_1 = __webpack_require__(5); -function makeStartAgentCommand() { - return new commander_1.default.Command('start') - .description('start the agent') - .option('-d, --daemon', 'start the agent as a daemon process') - .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); - // Tell agent to stop - const status = await client.getAgentStatus(); - if (status == Agent_1.agentInterface.AgentStatusType.ONLINE) { - utils_1.pkLogger('agent is already running', utils_1.PKMessageType.INFO); - } - else { - const pid = await Polykey_1.PolykeyAgent.startAgent(options.daemon); - utils_1.pkLogger(`agent has started with pid of ${pid}`, utils_1.PKMessageType.SUCCESS); - } })); } function makeRestartAgentCommand() { return new commander_1.default.Command('restart') .description('restart the agent') + .option('--node-path ', 'node path') .option('-d, --daemon', 'start the agent as a daemon process') .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); + const nodePath = utils_1.determineNodePath(options.nodePath); + const client = await utils_1.getAgentClient(nodePath, options.daemon, false, false); // Tell agent to stop - client.stopAgent(); - const pid = await Polykey_1.PolykeyAgent.startAgent(options.daemon); + const res = (await utils_1.promisifyGrpc(client.stopAgent.bind(client))(new pb.EmptyMessage())); + const pid = await Polykey_1.PolykeyAgent.startAgent(nodePath, options.daemon); utils_1.pkLogger(`agent has restarted with pid of ${pid}`, utils_1.PKMessageType.SUCCESS); })); } function makeAgentStatusCommand() { - return new commander_1.default.Command('status').description('retrieve the status of the agent').action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); - const status = await client.getAgentStatus(); - utils_1.pkLogger(`agent status is: '${Agent_1.agentInterface.AgentStatusType[status].toLowerCase()}'`, utils_1.PKMessageType.INFO); + return new commander_1.default.Command('status') + .description('retrieve the status of the agent') + .option('--node-path ', 'node path') + .action(utils_1.actionRunner(async (options) => { + const nodePath = utils_1.determineNodePath(options.nodePath); + try { + const client = await utils_1.getAgentClient(nodePath, undefined, false); + const res = (await utils_1.promisifyGrpc(client.getStatus.bind(client))(new pb.EmptyMessage())); + const status = res.getStatus(); + const statusString = Object.keys(pb.AgentStatusType).find((k) => pb.AgentStatusType[k] === status); + utils_1.pkLogger(`agent status is: '${statusString === null || statusString === void 0 ? void 0 : statusString.toLowerCase()}'`, utils_1.PKMessageType.INFO); + } + catch (error) { + utils_1.pkLogger(`agent status is: 'offline'`, utils_1.PKMessageType.INFO); + } })); } function makeStopAgentCommand() { return new commander_1.default.Command('stop') .description('stop the agent') + .option('--node-path ', 'node path') .option('-f, --force', 'forcibly stop the agent') .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); - const status = await client.getAgentStatus(); - if (status == Agent_1.agentInterface.AgentStatusType.OFFLINE) { - utils_1.pkLogger('agent is already stopped', utils_1.PKMessageType.INFO); - } - else { - // Tell agent to stop - await client.stopAgent(); - if (options.force ? true : false) { - fs_1.default.unlinkSync(Polykey_1.PolykeyAgent.SocketPath); - } - const status = await client.getAgentStatus(); - if (status != Agent_1.agentInterface.AgentStatusType.ONLINE) { + const nodePath = utils_1.determineNodePath(options.nodePath); + try { + const client = await utils_1.getAgentClient(nodePath, undefined, false); + // see if agent returns with online status + const res = (await utils_1.promisifyGrpc(client.getStatus.bind(client))(new pb.EmptyMessage())); + if (res.getStatus() == pb.AgentStatusType.ONLINE) { + // Tell agent to stop + await utils_1.promisifyGrpc(client.stopAgent.bind(client))(new pb.EmptyMessage()); utils_1.pkLogger('agent has successfully stopped', utils_1.PKMessageType.SUCCESS); } else { throw Error('agent failed to stop'); } } - })); -} -function makeListNodesCommand() { - return new commander_1.default.Command('list') - .alias('ls') - .description('list all the nodes controlled by the node') - .option('-u, --unlocked-only, only list the nodes that are unlocked') - .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); - const nodes = await client.listNodes(options.unlockedOnly ? true : false); - if (nodes.length == 0) { - utils_1.pkLogger('no nodes were listed', utils_1.PKMessageType.INFO); - } - else { - for (const node of nodes) { - utils_1.pkLogger(node, utils_1.PKMessageType.INFO); - } + catch (error) { + utils_1.pkLogger('agent is already stopped', utils_1.PKMessageType.INFO); } })); } -function makeNewNodeCommand() { - return new commander_1.default.Command('create') - .description('create a new polykey node') +function makeInitNodeCommand() { + return new commander_1.default.Command('init') + .description('initialize a new polykey node') .option('-k, --node-path ', 'provide the polykey path. defaults to ~/.polykey') .requiredOption('-ui, --user-id ', 'provide an identifier for the keypair to be generated') .requiredOption('-pp, --private-passphrase ', 'provide the passphrase to the private key') .option('-nb, --number-of-bits ', 'number of bits to use for key pair generation') .option('-v, --verbose', 'increase verbosity by one level') .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); const nodePath = utils_1.determineNodePath(options.nodePath); - const successful = await client.newNode(utils_1.determineNodePath(options.nodePath), options.userId, options.privatePassphrase, parseInt(options.numberOfBits)); - if (successful) { - utils_1.pkLogger(`node was successfully generated at: '${nodePath}'`, utils_1.PKMessageType.SUCCESS); - } - else { - throw Error('something went wrong with node creation'); - } + const client = await utils_1.getAgentClient(nodePath, undefined, true, false); + const request = new pb.NewNodeMessage(); + request.setUserid(options.userId); + request.setPassphrase(options.privatePassphrase); + if (options.numberOfBits) { + request.setNbits(options.numberOfBits); + } + const res = (await utils_1.promisifyGrpc(client.newNode.bind(client))(request)); + utils_1.pkLogger(`node was successfully initialized at: '${nodePath}'`, utils_1.PKMessageType.SUCCESS); })); } -function makeLoadNodeCommand() { - return new commander_1.default.Command('load') - .description('load an existing polykey node') +function makeUnlockNodeCommand() { + return new commander_1.default.Command('unlock') + .description('unlock polykey') .option('-k, --node-path ', 'provide the polykey path. defaults to ~/.polykey') .requiredOption('-pp, --private-passphrase ', 'provide the passphrase to the private key') .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); const nodePath = utils_1.determineNodePath(options.nodePath); - const successful = await client.registerNode(nodePath, options.privatePassphrase); - if (successful) { + const client = await utils_1.getAgentClient(nodePath); + const request = new pb.StringMessage(); + request.setS(options.privatePassphrase); + const res = (await utils_1.promisifyGrpc(client.registerNode.bind(client))(request)); + if (res.getB()) { utils_1.pkLogger(`node was successfully loaded at: '${nodePath}'`, utils_1.PKMessageType.SUCCESS); } else { @@ -2084,21 +1655,175 @@ function makeAgentCommand() { .addCommand(makeRestartAgentCommand()) .addCommand(makeAgentStatusCommand()) .addCommand(makeStopAgentCommand()) - .addCommand(makeListNodesCommand()) - .addCommand(makeNewNodeCommand()) - .addCommand(makeLoadNodeCommand()); + .addCommand(makeInitNodeCommand()) + .addCommand(makeUnlockNodeCommand()); } exports.default = makeAgentCommand; /***/ }), -/* 33 */ +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const fs_1 = __importDefault(__webpack_require__(5)); +const http_1 = __importDefault(__webpack_require__(35)); +const path_1 = __importDefault(__webpack_require__(0)); +const js_yaml_1 = __importDefault(__webpack_require__(36)); +const connect_1 = __importDefault(__webpack_require__(37)); +const swagger_tools_1 = __importDefault(__webpack_require__(38)); +const PeerInfo_1 = __webpack_require__(1); +class ResponsePayload { + constructor(code, payload) { + this.code = code; + this.payload = payload; + } +} +class HttpApi { + constructor(getPeerInfo, updateApiAddress, handleCSR, getRootCertificate) { + this.certificateSigningRequest = async (req, res, next) => { + try { + const body = req.swagger.params['body'].value; + const response = await this.handleCertificateSigningRequest(body); + this.writeJson(res, response); + } + catch (error) { + this.writeJson(res, error); + } + }; + this.rootCertificate = async (req, res, next) => { + try { + const response = await this.handleRootCertificateRequest(); + this.writeJson(res, response); + } + catch (error) { + this.writeJson(res, error); + } + }; + this.getLocalPeerInfo = getPeerInfo; + this.updateApiAddress = updateApiAddress; + this.handleCSR = handleCSR; + this.getRootCertificate = getRootCertificate; + this.connectServer = connect_1.default(); + } + async start(port = 0) { + return await new Promise((resolve, reject) => { + // this code is needed as we can't require yaml files + let yamlDoc; + const fromSrcFolderPath = path_1.default.join(__dirname, '../../openapi.yaml'); + const fromDistFolderPath = path_1.default.join(__dirname, '../openapi.yaml'); + if (fs_1.default.existsSync(fromSrcFolderPath)) { + yamlDoc = fs_1.default.readFileSync(fromSrcFolderPath).toString(); + } + else { + yamlDoc = fs_1.default.readFileSync(fromDistFolderPath).toString(); + } + const swaggerDoc = js_yaml_1.default.load(yamlDoc); + // Initialize the Swagger middleware + swagger_tools_1.default.initializeMiddleware(swaggerDoc, (middleware) => { + // Interpret Swagger resources and attach metadata to request - must be first in swagger-tools middleware chain + this.connectServer.use(middleware.swaggerMetadata()); + // Validate Swagger requests + this.connectServer.use(middleware.swaggerValidator()); + // Route validated requests to appropriate controller + this.connectServer.use(middleware.swaggerRouter({ + controllers: this.ControllerOptions, + // controllers: path.join(__dirname, './controllers'), + useStubs: "production" === 'development', + })); + // Serve the Swagger documents and Swagger UI + this.connectServer.use(middleware.swaggerUi()); + // Start the server + this.httpServer = http_1.default.createServer(this.connectServer).listen(port, () => { + const addressInfo = this.httpServer.address(); + const address = PeerInfo_1.Address.fromAddressInfo(addressInfo); + this.updateApiAddress(address); + console.log(`HTTP API served at: http://${address.toString()}`); + console.log(`HTTP API docs served at: http://${address.toString()}/docs`); + resolve(port); + }); + }); + }); + } + async handleCertificateSigningRequest(body) { + const publicKey = body.publicKey; + const csr = body.csr; + return { + publicKey: this.getLocalPeerInfo().publicKey, + csr: this.handleCSR(csr), + }; + } + async handleRootCertificateRequest() { + return { + rootCert: this.getRootCertificate(), + }; + } + //////////////////////// + // Controller methods // + //////////////////////// + get ControllerOptions() { + const options = {}; + options['certificateSigningRequest'] = this.certificateSigningRequest.bind(this); + options['rootCertificate'] = this.rootCertificate.bind(this); + return options; + } + // === Helper methods === // + writeJson(response, payload, code = 200) { + let responseString; + if (!payload) { + responseString = undefined; + } + else if (payload instanceof Error) { + code = 500; + responseString = JSON.stringify({ error: payload.message }, null, 2); + } + else { + responseString = JSON.stringify(payload, null, 2); + } + response.writeHead(code, { 'Content-Type': 'application/json' }); + response.end(responseString); + } +} +exports.default = HttpApi; + + +/***/ }), +/* 35 */ +/***/ (function(module, exports) { + +module.exports = require("http"); + +/***/ }), +/* 36 */ +/***/ (function(module, exports) { + +module.exports = require("js-yaml"); + +/***/ }), +/* 37 */ +/***/ (function(module, exports) { + +module.exports = require("connect"); + +/***/ }), +/* 38 */ +/***/ (function(module, exports) { + +module.exports = require("swagger-tools"); + +/***/ }), +/* 39 */ /***/ (function(module, exports) { module.exports = require("protobufjs"); /***/ }), -/* 34 */ +/* 40 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2108,32 +1833,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const os_1 = __importDefault(__webpack_require__(8)); -const fs_1 = __importDefault(__webpack_require__(3)); -const path_1 = __importDefault(__webpack_require__(1)); -const kbpgp_1 = __importDefault(__webpack_require__(35)); -const crypto_1 = __importDefault(__webpack_require__(15)); -const util_1 = __webpack_require__(36); +const path_1 = __importDefault(__webpack_require__(0)); +const kbpgp_1 = __importDefault(__webpack_require__(41)); +const crypto_1 = __importDefault(__webpack_require__(16)); +const util_1 = __webpack_require__(17); +const PublicKeyInfrastructure_1 = __importDefault(__webpack_require__(42)); class KeyManager { - constructor(polyKeyPath = `${os_1.default.homedir()}/.polykey`, fileSystem, useWebWorkers = false, workerPool) { + constructor(polykeyPath = `${os_1.default.homedir()}/.polykey`, fileSystem, useWebWorkers = false, workerPool) { this.primaryKeyPair = { private: null, public: null }; this.metadata = { privateKeyPath: null, publicKeyPath: null, - pkiKeyPath: null, - pkiCertPath: null, - caCertPath: null, }; - ///////// - // PKI // - ///////// - this.pkiInfo = { key: null, cert: null, caCert: null }; this.useWebWorkers = useWebWorkers; this.workerPool = workerPool; this.derivedKeys = new Map(); this.fileSystem = fileSystem; // Load key manager metadata - this.polykeyPath = polyKeyPath; - this.keypairPath = path_1.default.join(polyKeyPath, '.keys'); + this.polykeyPath = polykeyPath; + this.keypairPath = path_1.default.join(polykeyPath, '.keys'); if (!this.fileSystem.existsSync(this.keypairPath)) { this.fileSystem.mkdirSync(this.keypairPath, { recursive: true }); } @@ -2148,17 +1866,7 @@ class KeyManager { ///////// // PKI // ///////// - // Load pki keys and certs - if (this.metadata.pkiKeyPath) { - this.pkiInfo.key = fs_1.default.readFileSync(this.metadata.pkiKeyPath); - } - if (this.metadata.pkiCertPath) { - this.pkiInfo.cert = fs_1.default.readFileSync(this.metadata.pkiCertPath); - } - if (this.metadata.caCertPath) { - this.pkiInfo.caCert = fs_1.default.readFileSync(this.metadata.caCertPath); - } - this.loadPKIInfo(this.pkiInfo.key, this.pkiInfo.cert, this.pkiInfo.caCert, true); + this.pki = new PublicKeyInfrastructure_1.default(this.polykeyPath, this.fileSystem); } get identityLoaded() { return this.primaryIdentity ? true : false; @@ -2226,12 +1934,18 @@ class KeyManager { hasPublicKey() { return this.primaryKeyPair.public ? true : false; } + /** + * Determines whether public key is loaded or not + */ + hasPrivateKey() { + return this.primaryKeyPair.private ? true : false; + } /** * Get the public key of the primary keypair */ getPublicKey() { if (!this.primaryKeyPair.public) { - throw Error('Public key does not exist in memory'); + throw Error('public key does not exist in memory'); } return this.primaryKeyPair.public; } @@ -2240,7 +1954,7 @@ class KeyManager { */ getPrivateKey() { if (!this.primaryKeyPair.private) { - throw Error('Private key does not exist in memory'); + throw Error('private key does not exist in memory'); } return this.primaryKeyPair.private; } @@ -2332,6 +2046,21 @@ class KeyManager { } return key; } + /** + * Synchronously Generates a new symmetric key and stores it in the key manager + * @param name Unique name of the generated key + * @param passphrase Passphrase to derive the key from + * @param storeKey Whether to store the key in the key manager + */ + generateKeySync(name, passphrase, storeKey = true) { + const salt = crypto_1.default.randomBytes(32); + const key = crypto_1.default.pbkdf2Sync(passphrase, salt, 10000, 256 / 8, 'sha256'); + if (storeKey) { + this.derivedKeys[name] = key; + this.writeMetadata(); + } + return key; + } /** * Deletes a derived symmetric key from the key manager * @param name Name of the key to be deleted @@ -2689,39 +2418,6 @@ class KeyManager { this.fileSystem.writeFileSync(filePath, decryptedData); return filePath; } - ///////// - // PKI // - ///////// - get PKIInfo() { - return this.pkiInfo; - } - loadPKIInfo(key, cert, caCert, writeToFile = false) { - if (key) { - this.pkiInfo.key = key; - } - if (cert) { - this.pkiInfo.cert = cert; - } - if (caCert) { - this.pkiInfo.caCert = caCert; - } - if (writeToFile) { - // Store in the metadata path folder - const storagePath = path_1.default.dirname(this.metadataPath); - if (key) { - this.metadata.pkiKeyPath = path_1.default.join(storagePath, 'pki_private_key'); - fs_1.default.writeFileSync(this.metadata.pkiKeyPath, key); - } - if (cert) { - this.metadata.pkiCertPath = path_1.default.join(storagePath, 'pki_cert'); - fs_1.default.writeFileSync(this.metadata.pkiCertPath, cert); - } - if (caCert) { - this.metadata.caCertPath = path_1.default.join(storagePath, 'ca_cert'); - fs_1.default.writeFileSync(this.metadata.caCertPath, caCert); - } - } - } /* ============ HELPERS =============== */ /** * Get the key for a given name @@ -2743,6 +2439,9 @@ class KeyManager { async writeMetadata() { const metadata = JSON.stringify(this.metadata); this.fileSystem.writeFileSync(this.metadataPath, metadata); + this.writeEncryptedMetadata(); + } + async writeEncryptedMetadata() { // Store the keys if identity is loaded if (this.identityLoaded) { const derivedKeys = JSON.stringify(this.derivedKeys); @@ -2750,18 +2449,21 @@ class KeyManager { await this.fileSystem.promises.writeFile(this.derivedKeysPath, encryptedMetadata); } } - async loadMetadata() { + loadMetadata() { // Check if file exists if (this.fileSystem.existsSync(this.metadataPath)) { const metadata = this.fileSystem.readFileSync(this.metadataPath).toString(); this.metadata = JSON.parse(metadata); - if (this.identityLoaded && this.fileSystem.existsSync(this.derivedKeysPath)) { - const encryptedMetadata = this.fileSystem.readFileSync(this.derivedKeysPath); - const metadata = (await this.decryptData(encryptedMetadata)).toString(); - const derivedKeys = JSON.parse(metadata); - for (const key of Object.keys(derivedKeys)) { - this.derivedKeys[key] = Buffer.from(derivedKeys[key]); - } + this.loadEncryptedMetadata(); + } + } + async loadEncryptedMetadata() { + if (this.identityLoaded && this.fileSystem.existsSync(this.derivedKeysPath)) { + const encryptedMetadata = this.fileSystem.readFileSync(this.derivedKeysPath); + const metadata = (await this.decryptData(encryptedMetadata)).toString(); + const derivedKeys = JSON.parse(metadata); + for (const key of Object.keys(derivedKeys)) { + this.derivedKeys[key] = Buffer.from(derivedKeys[key]); } } } @@ -2770,19 +2472,437 @@ exports.default = KeyManager; /***/ }), -/* 35 */ +/* 41 */ /***/ (function(module, exports) { module.exports = require("kbpgp"); /***/ }), -/* 36 */ +/* 42 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const path_1 = __importDefault(__webpack_require__(0)); +const node_forge_1 = __webpack_require__(43); +/** + * This class manages X.509 certificates for secure and authenticated communication between peers. + */ +class PublicKeyInfrastructure { + constructor(polykeyPath, fileSystem) { + var _a; + this.commonName = (_a = process.env.PK_HOST) !== null && _a !== void 0 ? _a : 'localhost'; + this.pkiPath = path_1.default.join(polykeyPath, '.pki'); + this.pkiFs = fileSystem; + this.loadMetadata(); + } + get CACertificates() { + return this.CAStore.listAllCertificates() + .map((c) => node_forge_1.pki.certificateToPem(c)) + .join('\n'); + } + get TLSClientCredentials() { + if (this.certificate) { + return { + privateKey: node_forge_1.pki.privateKeyToPem(this.keypair.privateKey), + certificate: node_forge_1.pki.certificateToPem(this.certificate), + rootCertificate: this.CACertificates, + }; + } + else { + return undefined; + } + } + get TLSServerCredentials() { + if (this.certificate) { + return { + privateKey: node_forge_1.pki.privateKeyToPem(this.keypair.privateKey), + certificate: node_forge_1.pki.certificateToPem(this.certificate), + rootCertificate: this.CACertificates, + }; + } + else { + return undefined; + } + } + get RootCert() { + return node_forge_1.pki.certificateToPem(this.rootCertificate); + } + // private createCACertificate( + createCACertificate(organizationName = 'MatrixAI') { + const certificate = node_forge_1.pki.createCertificate(); + certificate.publicKey = this.rootKeypair.publicKey; + certificate.serialNumber = '01'; + certificate.validity.notBefore = new Date(); + certificate.validity.notAfter = new Date(); + certificate.validity.notAfter.setFullYear(certificate.validity.notBefore.getFullYear() + 1); + const attrs = [ + { + name: 'commonName', + value: this.commonName, + }, + { + name: 'organizationName', + value: organizationName, + }, + ]; + certificate.setSubject(attrs); + certificate.setIssuer(attrs); + certificate.setExtensions([ + { + name: 'basicConstraints', + cA: true, + }, + { + name: 'keyUsage', + keyCertSign: true, + digitalSignature: true, + nonRepudiation: true, + keyEncipherment: true, + dataEncipherment: true, + }, + { + name: 'extKeyUsage', + serverAuth: true, + clientAuth: true, + codeSigning: true, + emailProtection: true, + timeStamping: true, + }, + { + name: 'nsCertType', + client: true, + server: true, + email: true, + objsign: true, + sslCA: true, + emailCA: true, + objCA: true, + }, + { + name: 'subjectKeyIdentifier', + }, + ]); + certificate.sign(this.rootKeypair.privateKey); + return certificate; + } + createCSR(commonName, challengePassword) { + // create a certification request (CSR) + const csr = node_forge_1.pki.createCertificationRequest(); + csr.serialNumber = '01'; + csr.publicKey = this.keypair.publicKey; + csr.setSubject([ + { + name: 'commonName', + value: commonName, + }, + { + name: 'countryName', + value: 'US', + }, + { + shortName: 'ST', + value: 'Virginia', + }, + { + name: 'localityName', + value: 'Blacksburg', + }, + { + name: 'organizationName', + value: 'Test', + }, + { + shortName: 'OU', + value: 'Test', + }, + ]); + // set (optional) attributes + csr.setAttributes([ + { + name: 'challengePassword', + value: 'password', + }, + { + name: 'unstructuredName', + value: 'My company', + }, + ]); + csr.sign(this.keypair.privateKey); + return node_forge_1.pki.certificationRequestToPem(csr); + } + createAgentServerCredentials() { + const keypair = node_forge_1.pki.rsa.generateKeyPair(); + // create a certification request (CSR) + const csr = node_forge_1.pki.createCertificationRequest(); + csr.serialNumber = '01'; + csr.publicKey = keypair.publicKey; + csr.setSubject([ + { + name: 'commonName', + value: 'localhost', + }, + { + name: 'countryName', + value: 'US', + }, + { + shortName: 'ST', + value: 'Virginia', + }, + { + name: 'localityName', + value: 'Blacksburg', + }, + { + name: 'organizationName', + value: 'Test', + }, + { + shortName: 'OU', + value: 'Test', + }, + ]); + // set (optional) attributes + csr.setAttributes([ + { + name: 'challengePassword', + value: 'password', + }, + { + name: 'unstructuredName', + value: 'My company', + }, + ]); + csr.sign(keypair.privateKey); + const csrPem = node_forge_1.pki.certificationRequestToPem(csr); + const cert = this.handleCSR(csrPem); + return { + serverCert: cert, + serverKeyPair: { + private: node_forge_1.pki.privateKeyToPem(keypair.privateKey), + public: node_forge_1.pki.publicKeyToPem(keypair.publicKey), + }, + }; + } + createAgentClientCredentials() { + const keypair = node_forge_1.pki.rsa.generateKeyPair(); + // create a certification request (CSR) + const csr = node_forge_1.pki.createCertificationRequest(); + csr.serialNumber = '01'; + csr.publicKey = keypair.publicKey; + csr.setSubject([ + { + name: 'commonName', + value: 'localhost', + }, + { + name: 'countryName', + value: 'US', + }, + { + shortName: 'ST', + value: 'Virginia', + }, + { + name: 'localityName', + value: 'Blacksburg', + }, + { + name: 'organizationName', + value: 'Test', + }, + { + shortName: 'OU', + value: 'Test', + }, + ]); + // set (optional) attributes + csr.setAttributes([ + { + name: 'challengePassword', + value: 'password', + }, + { + name: 'unstructuredName', + value: 'My company', + }, + ]); + csr.sign(keypair.privateKey); + const csrPem = node_forge_1.pki.certificationRequestToPem(csr); + const cert = this.handleCSR(csrPem); + return { + clientCert: cert, + clientKeyPair: { + private: node_forge_1.pki.privateKeyToPem(keypair.privateKey), + public: node_forge_1.pki.publicKeyToPem(keypair.publicKey), + }, + }; + } + importCertificate(certString) { + this.certificate = node_forge_1.pki.certificateFromPem(certString); + } + addCA(certString) { + this.CAStore.addCertificate(certString); + } + handleCSR(csrPem) { + var _a; + const csr = node_forge_1.pki.certificationRequestFromPem(csrPem); + // verify certification request + try { + if (!csr.verify(csr)) { + throw new Error('Signature not verified.'); + } + } + catch (err) { + throw new Error('Signature not verified.'); + } + // TODO validate challenge password + const challengePassword = csr.getAttribute({ name: 'challengePassword' }); + const cert = node_forge_1.pki.createCertificate(); + cert.serialNumber = '01'; + cert.validity.notBefore = new Date(); + cert.validity.notAfter = new Date(); + cert.validity.notAfter.setFullYear(cert.validity.notBefore.getFullYear() + 1); + cert.setSubject(csr.subject.attributes); + cert.setIssuer(this.rootCertificate.issuer.attributes); + cert.publicKey = csr.publicKey; + cert.setExtensions([ + ...((_a = csr.extensions) !== null && _a !== void 0 ? _a : []), + { + name: 'basicConstraints', + cA: true, + }, + { + name: 'keyUsage', + keyCertSign: true, + digitalSignature: true, + nonRepudiation: true, + keyEncipherment: true, + dataEncipherment: true, + }, + { + name: 'extKeyUsage', + serverAuth: true, + clientAuth: true, + codeSigning: true, + emailProtection: true, + timeStamping: true, + }, + { + name: 'nsCertType', + client: true, + server: true, + email: true, + objsign: true, + sslCA: true, + emailCA: true, + objCA: true, + }, + { + name: 'subjectKeyIdentifier', + }, + ]); + // sign certificate + cert.sign(this.rootKeypair.privateKey); + // return certificate in pem form + return node_forge_1.pki.certificateToPem(cert); + } + // ===== Helper methods ===== // + loadMetadata() { + if (this.pkiFs) { + // make the pkiPath directory + this.pkiFs.mkdirSync(this.pkiPath, { recursive: true }); + // load keypair + const keypairPath = path_1.default.join(this.pkiPath, 'keypair'); + if (this.pkiFs.existsSync(keypairPath)) { + this.keypair = this.jsonToKeyPair(this.pkiFs.readFileSync(keypairPath).toString()); + } + else { + // create the keypair if it doesn't exist + this.keypair = node_forge_1.pki.rsa.generateKeyPair(); + } + // load root keypair + const rootKeypairPath = path_1.default.join(this.pkiPath, 'root_keypair'); + if (this.pkiFs.existsSync(rootKeypairPath)) { + this.rootKeypair = this.jsonToKeyPair(this.pkiFs.readFileSync(rootKeypairPath).toString()); + } + else { + // create the keypair if it doesn't exist + this.rootKeypair = node_forge_1.pki.rsa.generateKeyPair(); + } + // load certificate + const certificatePath = path_1.default.join(this.pkiPath, 'certificate'); + if (this.pkiFs.existsSync(certificatePath)) { + this.certificate = node_forge_1.pki.certificateFromPem(this.pkiFs.readFileSync(certificatePath).toString()); + } + // load root certificate + const rootCertificatePath = path_1.default.join(this.pkiPath, 'root_certificate'); + if (this.pkiFs.existsSync(rootCertificatePath)) { + this.rootCertificate = node_forge_1.pki.certificateFromPem(this.pkiFs.readFileSync(rootCertificatePath).toString()); + } + else { + // create the certificate if it doesn't exist + this.rootCertificate = this.createCACertificate(); + } + // CA store + const parsedCertificates = []; + const caStorePath = path_1.default.join(this.pkiPath, 'ca_store_certificates'); + if (this.pkiFs.existsSync(caStorePath)) { + const certificates = JSON.parse(this.pkiFs.readFileSync(caStorePath).toString()); + parsedCertificates.push(...certificates.map((c) => node_forge_1.pki.certificateFromPem(c))); + } + this.CAStore = node_forge_1.pki.createCaStore(parsedCertificates); + // this is a little recursive but necessary since we initialize all the variables if they are empty in this method + this.writeMetadata(); + } + } + writeMetadata() { + if (this.pkiFs) { + // write keypairs + this.pkiFs.writeFileSync(path_1.default.join(this.pkiPath, 'keypair'), Buffer.from(this.keyPairToJSON(this.keypair))); + this.pkiFs.writeFileSync(path_1.default.join(this.pkiPath, 'root_keypair'), Buffer.from(this.keyPairToJSON(this.rootKeypair))); + // write certificates + if (this.certificate) { + this.pkiFs.writeFileSync(path_1.default.join(this.pkiPath, 'certificate'), Buffer.from(node_forge_1.pki.certificateToPem(this.certificate))); + } + this.pkiFs.writeFileSync(path_1.default.join(this.pkiPath, 'root_certificate'), Buffer.from(node_forge_1.pki.certificateToPem(this.rootCertificate))); + // write ca store + const certsJson = JSON.stringify(this.CAStore.listAllCertificates().map((c) => node_forge_1.pki.certificateToPem(c))); + this.pkiFs.writeFileSync(path_1.default.join(this.pkiPath, 'ca_store_certificates'), certsJson); + } + } + // === Helper Methods === // + keyPairToJSON(keypair) { + const obj = { + privateKey: node_forge_1.pki.privateKeyToPem(keypair.privateKey), + publicKey: node_forge_1.pki.publicKeyToPem(keypair.publicKey), + }; + return JSON.stringify(obj); + } + jsonToKeyPair(json) { + const obj = JSON.parse(json); + return { + privateKey: node_forge_1.pki.privateKeyFromPem(obj.privateKey), + publicKey: node_forge_1.pki.publicKeyFromPem(obj.publicKey), + }; + } +} +exports.default = PublicKeyInfrastructure; + + +/***/ }), +/* 43 */ /***/ (function(module, exports) { -module.exports = require("util"); +module.exports = require("node-forge"); /***/ }), -/* 37 */ +/* 44 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2792,13 +2912,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const os_1 = __importDefault(__webpack_require__(8)); -const path_1 = __importDefault(__webpack_require__(1)); -const TurnClient_1 = __importDefault(__webpack_require__(38)); -const Peer_1 = __webpack_require__(7); -const PeerInfo_1 = __importDefault(__webpack_require__(0)); -const PeerServer_1 = __importDefault(__webpack_require__(43)); -const PeerConnection_1 = __importDefault(__webpack_require__(46)); -const MulticastBroadcaster_1 = __importDefault(__webpack_require__(47)); +const path_1 = __importDefault(__webpack_require__(0)); +const TurnClient_1 = __importDefault(__webpack_require__(45)); +const Peer_1 = __webpack_require__(6); +const PeerInfo_1 = __importDefault(__webpack_require__(1)); +const PeerServer_1 = __importDefault(__webpack_require__(50)); +const PeerConnection_1 = __importDefault(__webpack_require__(53)); +const MulticastBroadcaster_1 = __importDefault(__webpack_require__(54)); const keybaseDiscovery = { name: 'Keybase', findUser: async (handle, service) => { @@ -2933,10 +3053,10 @@ class PeerManager { } /** * Finds an existing peer given a social service and handle - * @param handle Username or handle of the user (e.g. @john-smith) - * @param service Service on which to search for the user (e.g. github) + * @param username Username (e.g. @github/john-smith) */ async findSocialUser(handle, service, timeout) { + // parse with regex const tasks = this.socialDiscoveryServices.map((s) => s.findUser(handle, service)); const pubKeyOrFail = await Promise.race(tasks); if (!pubKeyOrFail) { @@ -2993,19 +3113,19 @@ class PeerManager { this.fileSystem.writeFileSync(this.peerStoreMetadataPath, peerStoreMetadata); } loadMetadata() { - var _a, _b; + var _a, _b, _c; // load peer info if path exists if (this.fileSystem.existsSync(this.peerInfoMetadataPath)) { const metadata = this.fileSystem.readFileSync(this.peerInfoMetadataPath); - const { publicKey, peerAddress, relayPublicKey } = Peer_1.peerInterface.PeerInfoMessage.decodeDelimited(metadata); - this.peerInfo = new PeerInfo_1.default(publicKey, peerAddress, relayPublicKey); + const { publicKey, relayPublicKey, peerAddress, apiAddress } = Peer_1.peerInterface.PeerInfoMessage.decodeDelimited(metadata); + this.peerInfo = new PeerInfo_1.default(publicKey, relayPublicKey, peerAddress, apiAddress); } // load peer store if path exists if (this.fileSystem.existsSync(this.peerStoreMetadataPath)) { const metadata = this.fileSystem.readFileSync(this.peerStoreMetadataPath); const { peerInfoList } = Peer_1.peerInterface.PeerInfoListMessage.decodeDelimited(metadata); for (const peerInfoMessage of peerInfoList) { - const peerInfo = new PeerInfo_1.default(peerInfoMessage.publicKey, (_a = peerInfoMessage.peerAddress) !== null && _a !== void 0 ? _a : undefined, (_b = peerInfoMessage.relayPublicKey) !== null && _b !== void 0 ? _b : undefined); + const peerInfo = new PeerInfo_1.default(peerInfoMessage.publicKey, (_a = peerInfoMessage.relayPublicKey) !== null && _a !== void 0 ? _a : undefined, (_b = peerInfoMessage.peerAddress) !== null && _b !== void 0 ? _b : undefined, (_c = peerInfoMessage.apiAddress) !== null && _c !== void 0 ? _c : undefined); this.peerStore.set(peerInfo.publicKey, peerInfo); } } @@ -3015,7 +3135,7 @@ exports.default = PeerManager; /***/ }), -/* 38 */ +/* 45 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3026,11 +3146,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) { Object.defineProperty(exports, "__esModule", { value: true }); // adapted from https://github.com/advance512/nat-traversal const net_1 = __importDefault(__webpack_require__(10)); -const events_1 = __webpack_require__(9); -const PeerInfo_1 = __webpack_require__(0); -const Peer_1 = __webpack_require__(7); -const Peer_pb_1 = __webpack_require__(12); -const UDPHolePunchClient_1 = __importDefault(__webpack_require__(39)); +const events_1 = __webpack_require__(7); +const PeerInfo_1 = __webpack_require__(1); +const Peer_1 = __webpack_require__(6); +const Peer_pb_1 = __webpack_require__(11); +const UDPHolePunchClient_1 = __importDefault(__webpack_require__(46)); let socketPipeId = 1; class SocketPipe extends events_1.EventEmitter { constructor(localAddress, relayAddress) { @@ -3256,7 +3376,7 @@ exports.default = TurnClient; /***/ }), -/* 39 */ +/* 46 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3267,11 +3387,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const net_1 = __importDefault(__webpack_require__(10)); -const PeerInfo_1 = __webpack_require__(0); -const Peer_1 = __webpack_require__(7); -const UDPToTCPSocketPipe_1 = __importDefault(__webpack_require__(40)); -const TCPToUDPSocketPipe_1 = __importDefault(__webpack_require__(42)); -const MicroTransportProtocol_1 = __webpack_require__(14); +const PeerInfo_1 = __webpack_require__(1); +const Peer_1 = __webpack_require__(6); +const UDPToTCPSocketPipe_1 = __importDefault(__webpack_require__(47)); +const TCPToUDPSocketPipe_1 = __importDefault(__webpack_require__(49)); +const MicroTransportProtocol_1 = __webpack_require__(13); class UDPHolePunchClient { constructor(peerManager) { this.outgoingSocketPipes = new Map(); @@ -3329,14 +3449,14 @@ exports.default = UDPHolePunchClient; /***/ }), -/* 40 */ +/* 47 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const events_1 = __webpack_require__(9); -const MicroTransportProtocol_1 = __webpack_require__(14); +const events_1 = __webpack_require__(7); +const MicroTransportProtocol_1 = __webpack_require__(13); let socketPipeId = 0; class UDPToTCPSocketPipe extends events_1.EventEmitter { constructor(tcpSocket, udpAddress) { @@ -3442,13 +3562,13 @@ exports.default = UDPToTCPSocketPipe; /***/ }), -/* 41 */ +/* 48 */ /***/ (function(module, exports) { module.exports = require("cyclist"); /***/ }), -/* 42 */ +/* 49 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3458,7 +3578,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const net_1 = __importDefault(__webpack_require__(10)); -const events_1 = __webpack_require__(9); +const events_1 = __webpack_require__(7); let socketPipeId = 1; class TCPToUDPSocketPipe extends events_1.EventEmitter { constructor(localAddress, relaySocket) { @@ -3568,7 +3688,7 @@ exports.default = TCPToUDPSocketPipe; /***/ }), -/* 43 */ +/* 50 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3584,15 +3704,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const PeerInfo_1 = __webpack_require__(0); -const grpc = __importStar(__webpack_require__(17)); -const TurnServer_1 = __importDefault(__webpack_require__(44)); -const utils_1 = __webpack_require__(11); -const Peer_grpc_pb_1 = __webpack_require__(18); -const Peer_pb_1 = __webpack_require__(12); +const PeerInfo_1 = __webpack_require__(1); +const grpc = __importStar(__webpack_require__(14)); +const TurnServer_1 = __importDefault(__webpack_require__(51)); +const utils_1 = __webpack_require__(9); +const Peer_grpc_pb_1 = __webpack_require__(19); +const Peer_pb_1 = __webpack_require__(11); class PeerServer { constructor(peerManager, keyManager) { - var _a, _b, _c; + var _a, _b, _c, _d, _e, _f, _g, _h, _j; this.started = false; this.peerManager = peerManager; this.keyManager = keyManager; @@ -3600,31 +3720,32 @@ class PeerServer { // GRPC Server // ///////////////// this.server = new grpc.Server(); - this.server.addService(Peer_grpc_pb_1.PeerService, { - messagePeer: this.messagePeer.bind(this), - }); + this.server.addService(Peer_grpc_pb_1.PeerService, this); // Create the server credentials. SSL only if ca cert exists - const pkiInfo = this.keyManager.PKIInfo; - if (pkiInfo.caCert && pkiInfo.cert && pkiInfo.key) { - this.credentials = grpc.ServerCredentials.createSsl(pkiInfo.caCert, [ + const credentials = (_a = this.keyManager.pki) === null || _a === void 0 ? void 0 : _a.TLSServerCredentials; + if (credentials) { + this.credentials = grpc.ServerCredentials.createSsl(Buffer.from(credentials.rootCertificate), [ { - private_key: pkiInfo.key, - cert_chain: pkiInfo.cert, + private_key: Buffer.from(credentials.privateKey), + cert_chain: Buffer.from(credentials.certificate), }, ], true); } else { this.credentials = grpc.ServerCredentials.createInsecure(); } - const port = (_c = (_a = process.env.PK_PORT) !== null && _a !== void 0 ? _a : (_b = this.peerManager.peerInfo.peerAddress) === null || _b === void 0 ? void 0 : _b.port) !== null && _c !== void 0 ? _c : 0; - this.server.bindAsync(`0.0.0.0:${port}`, this.credentials, async (err, boundPort) => { + const port = (_e = (_b = process.env.PK_PORT) !== null && _b !== void 0 ? _b : (_d = (_c = this.peerManager.peerInfo) === null || _c === void 0 ? void 0 : _c.peerAddress) === null || _d === void 0 ? void 0 : _d.port) !== null && _e !== void 0 ? _e : 0; + const host = (_j = (_f = process.env.PK_HOST) !== null && _f !== void 0 ? _f : (_h = (_g = this.peerManager.peerInfo) === null || _g === void 0 ? void 0 : _g.peerAddress) === null || _h === void 0 ? void 0 : _h.host) !== null && _j !== void 0 ? _j : 'localhost'; + this.server.bindAsync(`${host}:${port}`, this.credentials, async (err, boundPort) => { if (err) { throw err; } else { - const address = new PeerInfo_1.Address('0.0.0.0', boundPort); + const address = new PeerInfo_1.Address(host, boundPort); this.server.start(); - this.peerManager.peerInfo.peerAddress = address; + if (this.peerManager.peerInfo) { + this.peerManager.peerInfo.peerAddress = address; + } console.log(`Peer Server running on: ${address}`); this.started = true; this.turnServer = new TurnServer_1.default(this.peerManager); @@ -3633,13 +3754,13 @@ class PeerServer { } async messagePeer(call, callback) { const peerRequest = call.request; - const { publickey: publickey, type, submessage } = peerRequest.toObject(); + const { publicKey, type, subMessage: requestMessage } = peerRequest.toObject(); // if we don't know publicKey, end connection - if (!this.peerManager.hasPeer(publickey)) { + if (!this.peerManager.hasPeer(publicKey)) { throw Error('unknown public key'); } // verify and decrypt request - const verifiedMessage = await this.keyManager.verifyData(Buffer.from(submessage), Buffer.from(publickey)); + const verifiedMessage = await this.keyManager.verifyData(Buffer.from(requestMessage), Buffer.from(publicKey)); const decryptedMessage = await this.keyManager.decryptData(verifiedMessage); const request = utils_1.stringToProtobuf(decryptedMessage.toString()); let response; @@ -3648,7 +3769,7 @@ class PeerServer { response = await this.handlePing(request); break; case Peer_pb_1.SubServiceType.GIT: - response = await this.handleGitRequest(request, publickey); + response = await this.handleGitRequest(request, publicKey); break; case Peer_pb_1.SubServiceType.NAT_TRAVERSAL: response = await this.handleNatRequest(request); @@ -3657,14 +3778,14 @@ class PeerServer { throw Error('peer message type not identified'); } // encrypt and sign response - const encryptedResponse = await this.keyManager.encryptData(Buffer.from(utils_1.protobufToString(response)), Buffer.from(publickey)); + const encryptedResponse = await this.keyManager.encryptData(Buffer.from(utils_1.protobufToString(response)), Buffer.from(publicKey)); const signedResponse = await this.keyManager.signData(encryptedResponse); const subMessage = signedResponse.toString(); // composes peer message const peerResponse = new Peer_pb_1.PeerMessage(); - peerResponse.setPublickey(this.peerManager.peerInfo.publicKey); + peerResponse.setPublicKey(this.peerManager.peerInfo.publicKey); peerResponse.setType(type); - peerResponse.setSubmessage(subMessage); + peerResponse.setSubMessage(subMessage); // return peer response callback(null, peerResponse); } @@ -3677,7 +3798,7 @@ exports.default = PeerServer; /***/ }), -/* 44 */ +/* 51 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3687,11 +3808,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); // adapted from https://github.com/advance512/nat-traversal -const PeerInfo_1 = __webpack_require__(0); -const events_1 = __webpack_require__(9); +const PeerInfo_1 = __webpack_require__(1); +const events_1 = __webpack_require__(7); const net_1 = __importDefault(__webpack_require__(10)); -const Peer_1 = __webpack_require__(7); -const UDPHolePunchServer_1 = __importDefault(__webpack_require__(45)); +const Peer_1 = __webpack_require__(6); +const UDPHolePunchServer_1 = __importDefault(__webpack_require__(52)); class SocketPipe extends events_1.EventEmitter { constructor(serverSocket, id) { super(); @@ -3920,7 +4041,7 @@ exports.default = TurnServer; /***/ }), -/* 45 */ +/* 52 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3929,9 +4050,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const PeerInfo_1 = __importDefault(__webpack_require__(0)); -const Peer_1 = __webpack_require__(7); -const MicroTransportProtocol_1 = __webpack_require__(14); +const PeerInfo_1 = __importDefault(__webpack_require__(1)); +const Peer_1 = __webpack_require__(6); +const MicroTransportProtocol_1 = __webpack_require__(13); class UDPHolePunchServer { constructor(peerManager) { // publicKey -> Server @@ -3970,7 +4091,7 @@ exports.default = UDPHolePunchServer; /***/ }), -/* 46 */ +/* 53 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3986,21 +4107,22 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", { value: true }); -const PeerInfo_1 = __importDefault(__webpack_require__(0)); -const crypto_1 = __webpack_require__(15); -const grpc = __importStar(__webpack_require__(17)); -const utils_1 = __webpack_require__(11); -const Peer_grpc_pb_1 = __webpack_require__(18); -const Peer_pb_1 = __webpack_require__(12); +const PeerInfo_1 = __importDefault(__webpack_require__(1)); +const crypto_1 = __webpack_require__(16); +const grpc = __importStar(__webpack_require__(14)); +const utils_1 = __webpack_require__(9); +const Peer_grpc_pb_1 = __webpack_require__(19); +const Peer_pb_1 = __webpack_require__(11); class PeerConnection { constructor(publicKey, keyManager, peerManager) { + var _a; this.connected = false; this.publicKey = publicKey; this.keyManager = keyManager; this.peerManager = peerManager; - const pkiInfo = keyManager.PKIInfo; - if (pkiInfo.caCert && pkiInfo.cert && pkiInfo.key) { - this.credentials = grpc.credentials.createSsl(pkiInfo.caCert, pkiInfo.key, pkiInfo.cert); + const credentials = (_a = this.keyManager.pki) === null || _a === void 0 ? void 0 : _a.TLSClientCredentials; + if (credentials) { + this.credentials = grpc.ChannelCredentials.createSsl(Buffer.from(credentials.rootCertificate), Buffer.from(credentials.privateKey), Buffer.from(credentials.certificate)); } else { this.credentials = grpc.credentials.createInsecure(); @@ -4056,11 +4178,31 @@ class PeerConnection { throw Error('peer is already connected'); } } + async connectFirstChannel() { + return await new Promise((resolve, reject) => { + const promiseList = [this.connectDirectly(), this.connectHolePunch(), this.connectRelay()]; + const errorList = []; + for (const promise of promiseList) { + promise + .then((p) => { + resolve(p); + }) + .catch((error) => null); + promise.catch((error) => { + errorList.push(error); + // check if all have failed + if (errorList.length == promiseList.length) { + reject(errorList); + } + }); + } + }); + } async connect() { // connect if not already connected if (!this.connected) { try { - this.peerClient = await utils_1.promiseAny([this.connectDirectly(), this.connectHolePunch(), this.connectRelay()]); + this.peerClient = await this.connectFirstChannel(); } catch (error) { console.log(error); @@ -4149,20 +4291,20 @@ class PeerConnection { const subMessage = signedMessage.toString(); // encode and send message const peerRequest = new Peer_pb_1.PeerMessage(); - peerRequest.setPublickey(this.peerManager.peerInfo.publicKey); + peerRequest.setPublicKey(this.peerManager.peerInfo.publicKey); peerRequest.setType(type); - peerRequest.setSubmessage(subMessage); + peerRequest.setSubMessage(subMessage); return peerRequest; } async decodeResponse(response) { - const { publickey, type: responseType, submessage } = response.toObject(); + const { publicKey, type: responseType, subMessage } = response.toObject(); // decode peerResponse - if (PeerInfo_1.default.formatPublicKey(this.getPeerInfo().publicKey) != PeerInfo_1.default.formatPublicKey(publickey)) { + if (PeerInfo_1.default.formatPublicKey(this.getPeerInfo().publicKey) != PeerInfo_1.default.formatPublicKey(publicKey)) { // drop packet throw Error('response public key does not match request public key'); } // verify response - const verifiedResponse = await this.keyManager.verifyData(Buffer.from(submessage), Buffer.from(publickey)); + const verifiedResponse = await this.keyManager.verifyData(Buffer.from(subMessage), Buffer.from(publicKey)); // decrypt response const decryptedResponse = await this.keyManager.decryptData(verifiedResponse); const responseBuffer = utils_1.stringToProtobuf(decryptedResponse.toString()); @@ -4173,7 +4315,7 @@ exports.default = PeerConnection; /***/ }), -/* 47 */ +/* 54 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4183,11 +4325,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; var _a, _b; Object.defineProperty(exports, "__esModule", { value: true }); -const dgram_1 = __importDefault(__webpack_require__(16)); -const PeerInfo_1 = __importDefault(__webpack_require__(0)); -const events_1 = __webpack_require__(9); -const Peer_1 = __webpack_require__(7); -const utils_1 = __webpack_require__(11); +const dgram_1 = __importDefault(__webpack_require__(18)); +const PeerInfo_1 = __importDefault(__webpack_require__(1)); +const events_1 = __webpack_require__(7); +const Peer_1 = __webpack_require__(6); +const utils_1 = __webpack_require__(9); // This module is based heavily on libp2p's mDNS module: // https://github.com/libp2p/js-libp2p-mdns // It is supposed to discover peers on the local network @@ -4271,9 +4413,9 @@ class MulticastBroadcaster extends events_1.EventEmitter { // verify the subMessage const verifiedMessage = await this.keyManager.verifyData(subMessage, Buffer.from(signingKey)); const encodedMessage = utils_1.stringToProtobuf(verifiedMessage.toString()); - const { publicKey, peerAddress, relayPublicKey } = Peer_1.peerInterface.PeerInfoMessage.decodeDelimited(encodedMessage); + const { publicKey, relayPublicKey, peerAddress, apiAddress } = Peer_1.peerInterface.PeerInfoMessage.decodeDelimited(encodedMessage); // construct a peer info object - const peerInfo = new PeerInfo_1.default(publicKey, peerAddress, relayPublicKey); + const peerInfo = new PeerInfo_1.default(publicKey, relayPublicKey, peerAddress, apiAddress); // update the peer store this.peerManager.updatePeer(peerInfo); this.emit('found', publicKey); @@ -4288,7 +4430,7 @@ exports.default = MulticastBroadcaster; /***/ }), -/* 48 */ +/* 55 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4298,12 +4440,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const os_1 = __importDefault(__webpack_require__(8)); -const path_1 = __importDefault(__webpack_require__(1)); -const isomorphic_git_1 = __importDefault(__webpack_require__(19)); -const Vault_1 = __importDefault(__webpack_require__(49)); -const encryptedfs_1 = __webpack_require__(20); -const GitBackend_1 = __importDefault(__webpack_require__(51)); -const GitFrontend_1 = __importDefault(__webpack_require__(63)); +const path_1 = __importDefault(__webpack_require__(0)); +const isomorphic_git_1 = __importDefault(__webpack_require__(20)); +const Vault_1 = __importDefault(__webpack_require__(56)); +const encryptedfs_1 = __webpack_require__(21); +const GitBackend_1 = __importDefault(__webpack_require__(58)); +const GitFrontend_1 = __importDefault(__webpack_require__(70)); class VaultManager { constructor(polykeyPath = `${os_1.default.homedir()}/.polykey`, fileSystem, keyManager, peerManager) { this.polykeyPath = polykeyPath; @@ -4320,10 +4462,13 @@ class VaultManager { this.gitFrontend = new GitFrontend_1.default(peerManager); this.peerManager.setGitHandler(this.gitBackend.handleGitMessage.bind(this.gitBackend)); // Read in vault keys - this.loadMetadata(); + this.loadEncryptedMetadata(); } + /** + * Get the names of all vaults in memory + */ getVaultNames(publicKey) { - const vaultNames = Object.keys(this.vaults); + const vaultNames = Array.from(this.vaults.keys()); if (publicKey) { const allowedVaultNames = []; for (const vaultName of vaultNames) { @@ -4359,11 +4504,11 @@ class VaultManager { } } /** - * Get a vault from the vault manager + * Create a new vault * @param vaultName Unique name of new vault * @param key Optional key to use for the vault encryption, otherwise it is generated */ - async createVault(vaultName, key) { + async newVault(vaultName, key) { if (this.vaultExists(vaultName)) { throw Error('Vault already exists!'); } @@ -4382,40 +4527,22 @@ class VaultManager { vaultKey = key; } this.vaultKeys.set(vaultName, vaultKey); - this.writeMetadata(); + await this.writeEncryptedMetadata(); // Create vault const vault = new Vault_1.default(vaultName, vaultKey, this.polykeyPath, this.gitFrontend); - // Init repository for vault - const efs = vault.EncryptedFS; - const fileSystem = { promises: efs.promises }; - await isomorphic_git_1.default.init({ - fs: fileSystem, - dir: vaultPath, - }); - // Initial commit - await isomorphic_git_1.default.commit({ - fs: fileSystem, - dir: vaultPath, - author: { - name: vaultName, - }, - message: 'init commit', - }); - // Write packed-refs file because isomorphic git goes searching for it - // and apparently its not autogenerated - efs.writeFileSync(path_1.default.join(vaultPath, '.git', 'packed-refs'), '# pack-refs with: peeled fully-peeled sorted'); + await vault.initializeVault(); // Set vault this.vaults.set(vaultName, vault); return this.getVault(vaultName); } catch (err) { // Delete vault dir and garbage collect - this.destroyVault(vaultName); + await this.deleteVault(vaultName); throw err; } } /** - * Get a vault from the vault manager + * Clone a vault from a peer * @param vaultName Name of vault to be cloned * @param address Address of polykey node that owns vault to be cloned * @param getSocket Function to get an active connection to provided address @@ -4439,7 +4566,7 @@ class VaultManager { // Generate new key const vaultKey = await this.keyManager.generateKey(`${vaultName}-Key`, this.keyManager.getPrivateKey()); // Set filesystem - const vfsInstance = new (__webpack_require__(21).VirtualFS)(); + const vfsInstance = new (__webpack_require__(22).VirtualFS)(); const newEfs = new encryptedfs_1.EncryptedFS(vaultKey, vfsInstance, vfsInstance, this.fileSystem, process); // Clone vault from address await isomorphic_git_1.default.clone({ @@ -4460,6 +4587,15 @@ class VaultManager { const vaultNameList = await gitRequest.scanVaults(); return vaultNameList; } + /** + * Pull a vault from a specific peer + * @param vaultName Name of vault to be pulled + * @param publicKey Public key of polykey node that owns vault to be pulled + */ + async pullVault(vaultName, publicKey) { + const vault = this.getVault(vaultName); + await vault.pullVault(publicKey); + } /** * Determines whether the vault exists * @param vaultName Name of desired vault @@ -4473,10 +4609,10 @@ class VaultManager { * [WARNING] Destroys a certain vault and all its secrets * @param vaultName Name of vault to be destroyed */ - destroyVault(vaultName) { + async deleteVault(vaultName) { // this is convenience function for removing all tags // and triggering garbage collection - // destruction is a better word as we should ensure all traces is removed + // destruction is a better word as we should ensure all traces are removed const vaultPath = path_1.default.join(this.polykeyPath, vaultName); // Remove directory on file system if (this.fileSystem.existsSync(vaultPath)) { @@ -4486,18 +4622,12 @@ class VaultManager { this.vaults.delete(vaultName); this.vaultKeys.delete(vaultName); // Write to metadata file - this.writeMetadata(); + await this.writeEncryptedMetadata(); const vaultPathExists = this.fileSystem.existsSync(vaultPath); if (vaultPathExists) { - throw Error('Vault folder could not be destroyed!'); + throw Error('Vault folder could not be deleted!'); } } - /** - * List the names of all vaults in memory - */ - listVaults() { - return Array.from(this.vaults.keys()); - } /* ============ HELPERS =============== */ validateVault(vaultName) { if (!this.vaults.has(vaultName)) { @@ -4511,12 +4641,12 @@ class VaultManager { throw Error(`vault directory does not exist: '${vaultPath}'`); } } - async writeMetadata() { + async writeEncryptedMetadata() { const metadata = JSON.stringify([...this.vaultKeys]); const encryptedMetadata = await this.keyManager.encryptData(Buffer.from(metadata)); await this.fileSystem.promises.writeFile(this.metadataPath, encryptedMetadata); } - async loadMetadata() { + async loadEncryptedMetadata() { // Check if file exists if (this.fileSystem.existsSync(this.metadataPath) && this.keyManager.identityLoaded) { const encryptedMetadata = this.fileSystem.readFileSync(this.metadataPath); @@ -4526,6 +4656,8 @@ class VaultManager { } // Initialize vaults in memory for (const [vaultName, vaultKey] of this.vaultKeys.entries()) { + console.log(vaultName); + console.log(vaultKey); const vaultPath = path_1.default.join(this.polykeyPath, vaultName); if (this.fileSystem.existsSync(vaultPath)) { const vault = new Vault_1.default(vaultName, vaultKey, this.polykeyPath, this.gitFrontend); @@ -4539,7 +4671,7 @@ exports.default = VaultManager; /***/ }), -/* 49 */ +/* 56 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4548,11 +4680,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const fs_1 = __importDefault(__webpack_require__(3)); -const path_1 = __importDefault(__webpack_require__(1)); -const isomorphic_git_1 = __importDefault(__webpack_require__(19)); -const async_mutex_1 = __webpack_require__(50); -const encryptedfs_1 = __webpack_require__(20); +const fs_1 = __importDefault(__webpack_require__(5)); +const path_1 = __importDefault(__webpack_require__(0)); +const isomorphic_git_1 = __importDefault(__webpack_require__(20)); +const async_mutex_1 = __webpack_require__(57); +const encryptedfs_1 = __webpack_require__(21); class Vault { constructor(name, symKey, baseDir, gitFrontend) { // Concurrency @@ -4561,7 +4693,7 @@ class Vault { // do we use the same gpg pub/priv keypair this.key = symKey; // Set filesystem - const vfsInstance = new (__webpack_require__(21).VirtualFS)(); + const vfsInstance = new (__webpack_require__(22).VirtualFS)(); this.efs = new encryptedfs_1.EncryptedFS(this.key, vfsInstance, vfsInstance, fs_1.default, process); this.name = name; this.vaultPath = path_1.default.join(baseDir, name); @@ -4574,6 +4706,40 @@ class Vault { this.metadataPath = path_1.default.join(this.vaultPath, '.vault', 'metadata'); this.loadMetadata(); } + async initializeVault() { + // Init repository for vault + const efs = this.EncryptedFS; + const fileSystem = { promises: efs.promises }; + // first make sure its not already initialized + try { + const statusMatrix = await isomorphic_git_1.default.statusMatrix({ + fs: fileSystem, + dir: this.vaultPath, + }); + if (statusMatrix == undefined) { + return; + } + } + catch (error) { + return; + } + await isomorphic_git_1.default.init({ + fs: fileSystem, + dir: this.vaultPath, + }); + // Initial commit + await isomorphic_git_1.default.commit({ + fs: fileSystem, + dir: this.vaultPath, + author: { + name: this.name, + }, + message: 'init commit', + }); + // Write packed-refs file because isomorphic git goes searching for it + // and apparently its not autogenerated + efs.writeFileSync(path_1.default.join(this.vaultPath, '.git', 'packed-refs'), '# pack-refs with: peeled fully-peeled sorted'); + } /** * Returns the Encrypted File System used for vault operations */ @@ -4846,13 +5012,13 @@ exports.default = Vault; /***/ }), -/* 50 */ +/* 57 */ /***/ (function(module, exports) { module.exports = require("async-mutex"); /***/ }), -/* 51 */ +/* 58 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4861,12 +5027,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const path_1 = __importDefault(__webpack_require__(1)); -const Git_1 = __webpack_require__(22); -const readable_stream_1 = __webpack_require__(13); -const uploadPack_1 = __importDefault(__webpack_require__(52)); -const GitSideBand_1 = __importDefault(__webpack_require__(54)); -const packObjects_1 = __importDefault(__webpack_require__(56)); +const path_1 = __importDefault(__webpack_require__(0)); +const Git_1 = __webpack_require__(23); +const readable_stream_1 = __webpack_require__(12); +const uploadPack_1 = __importDefault(__webpack_require__(59)); +const GitSideBand_1 = __importDefault(__webpack_require__(61)); +const packObjects_1 = __importDefault(__webpack_require__(63)); // Here is the protocol git outlines for sending pack files over http: // https://git-scm.com/docs/pack-protocol/2.17.0 // https://github.com/git/git/blob/master/Documentation/technical/pack-protocol.txt @@ -4978,7 +5144,7 @@ exports.default = GitBackend; /***/ }), -/* 52 */ +/* 59 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4987,9 +5153,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const path_1 = __importDefault(__webpack_require__(1)); -const GitPktLine_1 = __importDefault(__webpack_require__(23)); -const GitRefManager_1 = __importDefault(__webpack_require__(24)); +const path_1 = __importDefault(__webpack_require__(0)); +const GitPktLine_1 = __importDefault(__webpack_require__(24)); +const GitRefManager_1 = __importDefault(__webpack_require__(25)); async function writeRefsAdResponse({ capabilities, refs, symrefs }) { const stream = []; // Compose capabilities string @@ -5039,7 +5205,7 @@ exports.default = uploadPack; /***/ }), -/* 53 */ +/* 60 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5086,7 +5252,7 @@ exports.default = GitPackedRefs; /***/ }), -/* 54 */ +/* 61 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5116,9 +5282,9 @@ information. If no 'side-band' capability was specified, the server will stream the entire packfile without multiplexing. */ -const buffer_1 = __webpack_require__(55); -const readable_stream_1 = __webpack_require__(13); -const GitPktLine_1 = __importDefault(__webpack_require__(23)); +const buffer_1 = __webpack_require__(62); +const readable_stream_1 = __webpack_require__(12); +const GitPktLine_1 = __importDefault(__webpack_require__(24)); function splitBuffer(buffer, maxBytes) { const result = []; let index = 0; @@ -5243,13 +5409,13 @@ exports.default = GitSideBand; /***/ }), -/* 55 */ +/* 62 */ /***/ (function(module, exports) { module.exports = require("buffer"); /***/ }), -/* 56 */ +/* 63 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5258,14 +5424,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const pako_1 = __importDefault(__webpack_require__(25)); -const path_1 = __importDefault(__webpack_require__(1)); -const log_1 = __importDefault(__webpack_require__(57)); -const GitTree_1 = __importDefault(__webpack_require__(61)); -const sha_js_1 = __importDefault(__webpack_require__(62)); -const GitCommit_1 = __importDefault(__webpack_require__(26)); -const readable_stream_1 = __webpack_require__(13); -const GitObjectManager_1 = __importDefault(__webpack_require__(27)); +const pako_1 = __importDefault(__webpack_require__(26)); +const path_1 = __importDefault(__webpack_require__(0)); +const log_1 = __importDefault(__webpack_require__(64)); +const GitTree_1 = __importDefault(__webpack_require__(68)); +const sha_js_1 = __importDefault(__webpack_require__(69)); +const GitCommit_1 = __importDefault(__webpack_require__(27)); +const readable_stream_1 = __webpack_require__(12); +const GitObjectManager_1 = __importDefault(__webpack_require__(28)); const types = { commit: 0b0010000, tree: 0b0100000, @@ -5424,7 +5590,7 @@ exports.default = packObjects; /***/ }), -/* 57 */ +/* 64 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5433,10 +5599,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const path = __webpack_require__(1); -const GitCommit_1 = __importDefault(__webpack_require__(26)); -const GitObjectManager_1 = __importDefault(__webpack_require__(27)); -const GitRefManager_1 = __importDefault(__webpack_require__(24)); +const path = __webpack_require__(0); +const GitCommit_1 = __importDefault(__webpack_require__(27)); +const GitObjectManager_1 = __importDefault(__webpack_require__(28)); +const GitRefManager_1 = __importDefault(__webpack_require__(25)); async function logCommit(fileSystem, gitdir, oid, signing) { try { let { type, object } = await GitObjectManager_1.default.read(fileSystem, gitdir, oid); @@ -5516,7 +5682,7 @@ exports.default = log; /***/ }), -/* 58 */ +/* 65 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5525,7 +5691,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const shasum_1 = __importDefault(__webpack_require__(59)); +const shasum_1 = __importDefault(__webpack_require__(66)); class GitObject { static hash({ type, object }) { let buffer = Buffer.concat([Buffer.from(`${type} ${object.byteLength.toString()}\0`), Buffer.from(object)]); @@ -5566,7 +5732,7 @@ exports.default = GitObject; /***/ }), -/* 59 */ +/* 66 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5575,7 +5741,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const sha1_1 = __importDefault(__webpack_require__(60)); +const sha1_1 = __importDefault(__webpack_require__(67)); // This is modeled after @dominictarr's "shasum" module, // but without the 'json-stable-stringify' dependency and // extra type-casting features. @@ -5586,13 +5752,13 @@ exports.default = shasum; /***/ }), -/* 60 */ +/* 67 */ /***/ (function(module, exports) { module.exports = require("sha.js/sha1"); /***/ }), -/* 61 */ +/* 68 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5698,13 +5864,13 @@ exports.default = GitTree; /***/ }), -/* 62 */ +/* 69 */ /***/ (function(module, exports) { module.exports = require("sha.js"); /***/ }), -/* 63 */ +/* 70 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5713,9 +5879,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const GitRequest_1 = __importDefault(__webpack_require__(64)); -const Git_1 = __webpack_require__(22); -const Peer_pb_1 = __webpack_require__(12); +const GitRequest_1 = __importDefault(__webpack_require__(71)); +const Git_1 = __webpack_require__(23); +const Peer_pb_1 = __webpack_require__(11); /** * Responsible for converting HTTP messages from isomorphic-git into requests and sending them to a specific peer. */ @@ -5773,7 +5939,7 @@ exports.default = GitFrontend; /***/ }), -/* 64 */ +/* 71 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5864,7 +6030,7 @@ exports.default = GitRequest; /***/ }), -/* 65 */ +/* 72 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5880,629 +6046,757 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", { value: true }); -const os_1 = __importDefault(__webpack_require__(8)); -const fs_1 = __importDefault(__webpack_require__(3)); -const net_1 = __importDefault(__webpack_require__(10)); -const path_1 = __importDefault(__webpack_require__(1)); -const process_1 = __importDefault(__webpack_require__(28)); -const configstore_1 = __importDefault(__webpack_require__(66)); -const PeerInfo_1 = __importDefault(__webpack_require__(0)); -const PolykeyClient_1 = __importDefault(__webpack_require__(29)); -const Polykey_1 = __importStar(__webpack_require__(67)); +const fs_1 = __importDefault(__webpack_require__(5)); +const path_1 = __importDefault(__webpack_require__(0)); +const process_1 = __importDefault(__webpack_require__(29)); +const get_port_1 = __importDefault(__webpack_require__(73)); +const util_1 = __webpack_require__(17); +const configstore_1 = __importDefault(__webpack_require__(74)); +const grpc = __importStar(__webpack_require__(14)); const child_process_1 = __webpack_require__(30); -const Agent_1 = __webpack_require__(5); +const agent = __importStar(__webpack_require__(3)); +const Polykey_1 = __importStar(__webpack_require__(31)); +const Agent_grpc_pb_1 = __webpack_require__(75); class PolykeyAgent { - constructor() { - // For storing the state of each polykey node - // Keys are the paths to the polykey node, e.g. '~/.polykey' - this.polykeyMap = new Map(); + constructor(polykeyPath) { + ///////////// + // Polykey // + ///////////// + // construct polykey instance if already initialized + this.pk = new Polykey_1.default(polykeyPath, fs_1.default); + ////////////////// + // Config Store // + ////////////////// + this.configStore = PolykeyAgent.ConfigStore(this.pk.polykeyPath); + ///////////// + // Process // + ///////////// + process_1.default.title = 'polykey-agent'; + // set pid for stopAgent command this.pid = process_1.default.pid; - this.socketPath = PolykeyAgent.SocketPath; - this.persistentStore = new configstore_1.default('polykey', undefined, { - configPath: path_1.default.join(path_1.default.dirname(this.socketPath), '.node_path_list.json'), + this.configStore.set('pid', this.pid); + ///////////////// + // GRPC Server // + ///////////////// + this.server = new grpc.Server(); + this.server.addService(Agent_grpc_pb_1.AgentService, this); + } + failOnLocked() { + if (!this.pk.keyManager.identityLoaded) { + throw Error(`polykey is locked at ${this.pk.polykeyPath}`); + } + } + static CAStore(polykeyPath) { + return new configstore_1.default('ca', undefined, { + configPath: path_1.default.join(polykeyPath, '.agent', 'caStoreConfig.json'), }); - // Make sure the socket file doesn't already exist (agent is already running) - if (fs_1.default.existsSync(this.socketPath)) { - fs_1.default.unlinkSync(this.socketPath); - } - // Make the socket path if it doesn't exist - if (!fs_1.default.existsSync(path_1.default.dirname(this.socketPath))) { - fs_1.default.promises.mkdir(path_1.default.dirname(this.socketPath)); - } - // Load polykeys - const nodePaths = this.persistentStore.get('nodePaths'); - if (nodePaths === null || nodePaths === void 0 ? void 0 : nodePaths.values) { - for (const path of nodePaths) { - if (fs_1.default.existsSync(path)) { - this.setPolyKey(path, new Polykey_1.default(path, fs_1.default)); - } - else { - this.removeNodePath(path); - } - } + } + get ServerCredentials() { + const caStoreConfig = PolykeyAgent.CAStore(this.pk.polykeyPath); + // The agent stores its root certificate and the client cert and keypair + // in a user specific folder. + // check if credentials exist for current polykey path + let caStore; + if (caStoreConfig.has(this.pk.polykeyPath)) { + caStore = caStoreConfig.get(this.pk.polykeyPath); + } + else { + const clientCreds = this.pk.keyManager.pki.createAgentClientCredentials(); + caStore = { + rootCert: this.pk.keyManager.pki.RootCert, + ...clientCreds, + }; + caStoreConfig.set(this.pk.polykeyPath, caStore); + } + //////////////////////// + // Server credentials // + //////////////////////// + const tlsCredentials = this.pk.keyManager.pki.createAgentServerCredentials(); + if (tlsCredentials) { + return grpc.ServerCredentials.createSsl(Buffer.from(this.pk.keyManager.pki.RootCert), [ + { + private_key: Buffer.from(tlsCredentials.serverKeyPair.private), + cert_chain: Buffer.from(tlsCredentials.serverCert), + }, + ], true); } else { - this.persistentStore.set('nodePaths', []); + return grpc.ServerCredentials.createInsecure(); } - // Start the server - this.server = net_1.default.createServer().listen(this.socketPath); - this.server.on('connection', (socket) => { - this.handleClientCommunication(socket); - }); } - setPolyKey(nodePath, pk) { - this.polykeyMap.set(nodePath, pk); - const nodePathSet = new Set(this.persistentStore.get('nodePaths')); - nodePathSet.add(nodePath); - this.persistentStore.set('nodePaths', Array.from(nodePathSet.values())); - } - removeNodePath(nodePath) { - this.polykeyMap.delete(nodePath); - const nodePathSet = new Set(this.persistentStore.get('nodePaths')); - nodePathSet.delete(nodePath); - this.persistentStore.set('nodePaths', Array.from(nodePathSet.values())); - } - getPolyKey(nodePath, failOnLocked = true) { - const pk = this.polykeyMap.get(nodePath); - if (this.polykeyMap.has(nodePath) && pk) { - if (fs_1.default.existsSync(nodePath)) { - if (failOnLocked && !pk.keyManager.identityLoaded) { - throw Error(`node path exists in memory but is locked: ${nodePath}`); + async startServer() { + // first try and stop server if its still running + // don't need to catch errors + try { + await util_1.promisify(this.server.tryShutdown)(); + } + catch (error) { } + // handle port + const portString = this.configStore.get('port'); + const portOptions = portString + ? { host: 'localhost', port: parseInt(portString) } + : undefined; + const port = await get_port_1.default(portOptions); + // bind server to port and start + const boundPort = await new Promise((resolve, reject) => { + this.server.bindAsync(`localhost:${port}`, this.ServerCredentials, (error, boundPort) => { + if (error) { + reject(error); } else { - return pk; + resolve(boundPort); } + }); + }); + this.server.start(); + this.configStore.set('port', boundPort); + console.log(`Agent started on: 'localhost:${boundPort}'`); + } + async addPeer(call, callback) { + try { + this.failOnLocked(); + const { publicKey, peerAddress, relayPublicKey, apiAddress } = call.request.toObject(); + this.pk.peerManager.addPeer(new Polykey_1.PeerInfo(publicKey, peerAddress, relayPublicKey, apiAddress)); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async decryptFile(call, callback) { + try { + this.failOnLocked(); + const { filePath, privateKeyPath, passphrase } = call.request.toObject(); + const decryptedPath = await this.pk.keyManager.decryptFile(filePath, privateKeyPath, passphrase); + const response = new agent.StringMessage(); + response.setS(decryptedPath); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async deleteKey(call, callback) { + try { + this.failOnLocked(); + const { s } = call.request.toObject(); + const successful = await this.pk.keyManager.deleteKey(s); + const response = new agent.BooleanMessage(); + response.setB(successful); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async deleteSecret(call, callback) { + try { + this.failOnLocked(); + const { vaultName, secretName } = call.request.toObject(); + const vault = this.pk.vaultManager.getVault(vaultName); + await vault.removeSecret(secretName); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async deleteVault(call, callback) { + try { + this.failOnLocked(); + const { s } = call.request.toObject(); + await this.pk.vaultManager.deleteVault(s); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async deriveKey(call, callback) { + try { + this.failOnLocked(); + const { keyName, passphrase } = call.request.toObject(); + await this.pk.keyManager.generateKey(keyName, passphrase); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async encryptFile(call, callback) { + try { + this.failOnLocked(); + const { filePath, publicKeyPath } = call.request.toObject(); + const encryptedPath = await this.pk.keyManager.encryptFile(filePath, publicKeyPath); + const response = new agent.StringMessage(); + response.setS(encryptedPath); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async findPeer(call, callback) { + try { + this.failOnLocked(); + const { publicKeyOrHandle, timeout } = call.request.toObject(); + const successful = await this.pk.peerManager.findPublicKey(publicKeyOrHandle, timeout); + const response = new agent.BooleanMessage(); + response.setB(successful); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async findSocialPeer(call, callback) { + try { + this.failOnLocked(); + const { publicKeyOrHandle, timeout } = call.request.toObject(); + // eslint-disable-next-line + const usernameRegex = /^\@([a-zA-Z0-9_-]+)\/([a-zA-Z0-9_-]+)/; + const matches = publicKeyOrHandle.match(usernameRegex); + const service = matches[1]; + const handle = matches[2]; + const successful = await this.pk.peerManager.findSocialUser(handle, service, timeout); + const response = new agent.BooleanMessage(); + response.setB(successful); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async getKey(call, callback) { + try { + this.failOnLocked(); + const { s } = call.request.toObject(); + const keyContent = this.pk.keyManager.getKey(s).toString(); + const response = new agent.StringMessage(); + response.setS(keyContent); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async getLocalPeerInfo(call, callback) { + var _a, _b; + try { + this.failOnLocked(); + const { s } = call.request.toObject(); + const peerInfo = this.pk.peerManager.peerInfo; + const response = new agent.PeerInfoMessage(); + response.setPublicKey(peerInfo.publicKey); + if (peerInfo.relayPublicKey) { + response.setRelayPublicKey(peerInfo.relayPublicKey); + } + if (peerInfo.peerAddress) { + response.setPeerAddress((_a = peerInfo.peerAddress) === null || _a === void 0 ? void 0 : _a.toString()); + } + if (peerInfo.apiAddress) { + response.setApiAddress((_b = peerInfo.apiAddress) === null || _b === void 0 ? void 0 : _b.toString()); + } + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async getPeerInfo(call, callback) { + var _a, _b; + try { + this.failOnLocked(); + const { s } = call.request.toObject(); + if (!this.pk.peerManager.hasPeer(s)) { + throw Error('public key does not exist in peer store'); + } + const peerInfo = this.pk.peerManager.getPeer(s); + const response = new agent.PeerInfoMessage(); + response.setPublicKey(peerInfo.publicKey); + if (peerInfo.relayPublicKey) { + response.setRelayPublicKey(peerInfo.relayPublicKey); + } + if (peerInfo.peerAddress) { + response.setPeerAddress((_a = peerInfo.peerAddress) === null || _a === void 0 ? void 0 : _a.toString()); + } + if (peerInfo.apiAddress) { + response.setApiAddress((_b = peerInfo.apiAddress) === null || _b === void 0 ? void 0 : _b.toString()); + } + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async getPrimaryKeyPair(call, callback) { + try { + this.failOnLocked(); + const { b } = call.request.toObject(); + const keypair = this.pk.keyManager.getKeyPair(); + const response = new agent.KeyPairMessage(); + response.setPublicKey(keypair.public); + if (b) { + response.setPrivateKey(keypair.private); + } + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async getSecret(call, callback) { + try { + this.failOnLocked(); + const { vaultName, secretName } = call.request.toObject(); + const vault = this.pk.vaultManager.getVault(vaultName); + const secret = vault.getSecret(secretName).toString(); + const response = new agent.StringMessage(); + response.setS(secret); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async getStatus(call, callback) { + try { + const response = new agent.AgentStatusMessage(); + response.setStatus(agent.AgentStatusType.ONLINE); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async listKeys(call, callback) { + try { + this.failOnLocked(); + const keyNames = this.pk.keyManager.listKeys(); + const response = new agent.StringListMessage(); + response.setSList(keyNames); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + listNodes(call, callback) { + try { + const { b } = call.request.toObject(); + const response = new agent.StringListMessage(); + response.setSList([this.pk.polykeyPath]); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async listPeers(call, callback) { + try { + this.failOnLocked(); + const publicKeys = this.pk.peerManager.listPeers(); + const response = new agent.StringListMessage(); + response.setSList(publicKeys); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async listSecrets(call, callback) { + try { + this.failOnLocked(); + const { s } = call.request.toObject(); + const vault = this.pk.vaultManager.getVault(s); + const secretNames = vault.listSecrets(); + const response = new agent.StringListMessage(); + response.setSList(secretNames); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async listVaults(call, callback) { + try { + this.failOnLocked(); + const vaultNames = this.pk.vaultManager.getVaultNames(); + const response = new agent.StringListMessage(); + response.setSList(vaultNames); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async newNode(call, callback) { + try { + const { userid, passphrase, nbits } = call.request.toObject(); + // check node is already initialized + if (this.pk.keyManager.hasPrivateKey()) { + throw Error(`polykey keypair already exists at node path: '${this.pk.polykeyPath}'`); + } + const km = new Polykey_1.KeyManager(this.pk.polykeyPath, fs_1.default); + const resolvedNBits = nbits && nbits != 0 ? nbits : undefined; + await km.generateKeyPair(userid, passphrase, resolvedNBits, true); + this.pk = new Polykey_1.default(this.pk.polykeyPath, fs_1.default, km); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async newSecret(call, callback) { + try { + this.failOnLocked(); + const { secretPath, secretFilePath, secretContent } = call.request.toObject(); + const vault = this.pk.vaultManager.getVault(secretPath === null || secretPath === void 0 ? void 0 : secretPath.vaultName); + let secretBuffer; + if (secretFilePath) { + secretBuffer = await fs_1.default.promises.readFile(secretFilePath); } else { - this.removeNodePath(nodePath); - throw Error(`node path exists in memory but does not exist on file system: ${nodePath}`); + secretBuffer = Buffer.from(secretContent); } + await vault.addSecret(secretPath === null || secretPath === void 0 ? void 0 : secretPath.secretName, secretBuffer); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); } - else { - this.removeNodePath(nodePath); - throw Error(`node path does not exist in memory: ${nodePath}`); + catch (error) { + callback(error, null); } } - get AllNodePaths() { - return Array.from(this.polykeyMap.keys()).filter((nodePath) => { - try { - this.getPolyKey(nodePath, false); - return true; - } - catch (_a) { - return false; - } - }); - } - get UnlockedNodePaths() { - return this.AllNodePaths.filter((nodePath) => { - try { - return this.getPolyKey(nodePath, false).keyManager.identityLoaded; - } - catch (_a) { - return false; - } - }); + async newVault(call, callback) { + try { + this.failOnLocked(); + const { s } = call.request.toObject(); + await this.pk.vaultManager.newVault(s); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); + } + catch (error) { + callback(error, null); + } } - stop() { - this.server.close(); - for (const nodePath of this.polykeyMap.keys()) { - const pk = this.getPolyKey(nodePath); - pk.peerManager.multicastBroadcaster.stopBroadcasting(); + async pingPeer(call, callback) { + try { + this.failOnLocked(); + const { publicKeyOrHandle, timeout } = call.request.toObject(); + const successful = await this.pk.peerManager.pingPeer(publicKeyOrHandle, timeout); + const response = new agent.BooleanMessage(); + response.setB(successful); + callback(null, response); } - // finally kill the pid of the agent process - if (process_1.default.env.NODE_ENV !== 'test') { - process_1.default.kill(this.pid); + catch (error) { + callback(error, null); } } - handleClientCommunication(socket) { - socket.on('data', async (encodedMessage) => { - var _a; - try { - const { type, nodePath, subMessage } = Agent_1.agentInterface.AgentMessage.decodeDelimited(encodedMessage); - let response = undefined; - switch (type) { - case Agent_1.agentInterface.AgentMessageType.STATUS: - response = Agent_1.agentInterface.AgentStatusResponseMessage.encodeDelimited({ - status: Agent_1.agentInterface.AgentStatusType.ONLINE, - }).finish(); - break; - case Agent_1.agentInterface.AgentMessageType.STOP_AGENT: - this.stop(); - break; - case Agent_1.agentInterface.AgentMessageType.REGISTER_NODE: - response = await this.registerNode(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.NEW_NODE: - response = await this.newNode(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.LIST_NODES: - response = this.listNodes(subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.DERIVE_KEY: - response = await this.deriveKey(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.LIST_KEYS: - response = await this.listKeys(nodePath); - break; - case Agent_1.agentInterface.AgentMessageType.GET_KEY: - response = await this.getKey(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.GET_PRIMARY_KEYPAIR: - response = await this.getPrimaryKeyPair(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.DELETE_KEY: - response = await this.deleteKey(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.SIGN_FILE: - response = await this.signFile(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.VERIFY_FILE: - response = await this.verifyFile(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.ENCRYPT_FILE: - response = await this.encryptFile(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.DECRYPT_FILE: - response = await this.decryptFile(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.LIST_VAULTS: - response = await this.listVaults(nodePath); - break; - case Agent_1.agentInterface.AgentMessageType.SCAN_VAULT_NAMES: - response = await this.scanVaultNames(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.NEW_VAULT: - response = await this.newVault(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.PULL_VAULT: - response = await this.pullVault(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.DESTROY_VAULT: - response = await this.destroyVault(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.LIST_SECRETS: - response = await this.listSecrets(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.CREATE_SECRET: - response = await this.createSecret(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.DESTROY_SECRET: - response = await this.destroySecret(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.GET_SECRET: - response = await this.getSecret(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.UPDATE_SECRET: - response = await this.updateSecret(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.ADD_PEER: - response = await this.addPeer(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.GET_PEER_INFO: - response = await this.getPeerInfo(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.PING_PEER: - response = await this.pingPeer(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.FIND_PEER: - response = await this.findPeer(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.FIND_SOCIAL_PEER: - response = await this.findSocialPeer(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.LIST_PEERS: - response = await this.listPeers(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.TOGGLE_STEALTH: - response = await this.toggleStealth(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.UPDATE_PEER_INFO: - response = await this.updatePeerInfo(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.REQUEST_RELAY: - response = await this.requestRelay(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.REQUEST_PUNCH: - response = await this.requestPunch(nodePath, subMessage); - break; - default: - throw Error(`message type not supported: ${Agent_1.agentInterface.AgentMessageType[type]}`); - } - if (response) { - const encodedResponse = Agent_1.agentInterface.AgentMessage.encodeDelimited({ - type: type, - isResponse: true, - nodePath: nodePath, - subMessage: response, - }).finish(); - socket.write(encodedResponse); - } - else { - throw Error('something went wrong'); - } - } - catch (err) { - const errorResponse = Agent_1.agentInterface.AgentMessage.encodeDelimited({ - type: Agent_1.agentInterface.AgentMessageType.ERROR, - isResponse: true, - nodePath: undefined, - subMessage: Agent_1.agentInterface.ErrorMessage.encodeDelimited({ error: (_a = err.message) !== null && _a !== void 0 ? _a : err }).finish(), - }).finish(); - socket.write(errorResponse); + async pullVault(call, callback) { + try { + this.failOnLocked(); + const { vaultName, publicKey } = call.request.toObject(); + // pull if vault exists locally, otherwise clone + if (this.pk.vaultManager.vaultExists(vaultName)) { + const vault = this.pk.vaultManager.getVault(vaultName); + await vault.pullVault(publicKey); } - // Close connection - socket.end(); - }); - } - // Register an existing polykey agent - async registerNode(nodePath, request) { - const { passphrase } = Agent_1.agentInterface.RegisterNodeRequestMessage.decodeDelimited(request); - let pk; - if (this.polykeyMap.has(nodePath)) { - pk = this.getPolyKey(nodePath, false); - if (pk.keyManager.identityLoaded) { - throw Error(`node path is already loaded and unlocked: '${nodePath}'`); + else { + await this.pk.vaultManager.cloneVault(vaultName, publicKey); } - await pk.keyManager.unlockIdentity(passphrase); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); + } + catch (error) { + callback(error, null); } - else { - const km = new Polykey_1.KeyManager(nodePath, fs_1.default); - await km.unlockIdentity(passphrase); - // Create polykey class - pk = new Polykey_1.default(nodePath, fs_1.default, km); - } - // Load all metadata - await pk.keyManager.loadMetadata(); - await pk.vaultManager.loadMetadata(); - // Set polykey class - this.setPolyKey(nodePath, pk); - // Encode and send response - const response = Agent_1.agentInterface.NewNodeResponseMessage.encodeDelimited({ - successful: pk.keyManager.identityLoaded && this.polykeyMap.has(nodePath), - }).finish(); - return response; } - // Create a new polykey agent - async newNode(nodePath, request) { - // Throw if path already exists - if (this.polykeyMap.has(nodePath) && fs_1.default.existsSync(nodePath)) { - throw Error(`node path '${nodePath}' is already loaded`); + async registerNode(call, callback) { + try { + if (this.pk.keyManager.identityLoaded) { + throw Error('node is already unlocked'); + } + const { s } = call.request.toObject(); + await this.pk.keyManager.unlockIdentity(s); + // re-load all meta data + await this.pk.keyManager.loadEncryptedMetadata(); + this.pk.peerManager.loadMetadata(); + await this.pk.vaultManager.loadEncryptedMetadata(); + await this.pk.httpApi.start(); + // send response + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); } - else if (fs_1.default.existsSync(nodePath)) { - throw Error(`node path already exists: '${nodePath}'`); + catch (error) { + callback(error, null); } - const { userId, passphrase, nbits } = Agent_1.agentInterface.NewNodeRequestMessage.decodeDelimited(request); - const km = new Polykey_1.KeyManager(nodePath, fs_1.default); - await km.generateKeyPair(userId, passphrase, nbits == 0 ? undefined : nbits, true, (info) => { - // socket.write(JSON.stringify(info)) - }); - // Create and set polykey class - const pk = new Polykey_1.default(nodePath, fs_1.default, km); - this.setPolyKey(nodePath, pk); - // Encode and send response - const response = Agent_1.agentInterface.NewNodeResponseMessage.encodeDelimited({ - successful: km.identityLoaded && this.polykeyMap.has(nodePath), - }).finish(); - return response; } - // Create a new polykey agent - listNodes(request) { - const { unlockedOnly } = Agent_1.agentInterface.ListNodesRequestMessage.decodeDelimited(request); - if (unlockedOnly) { - return Agent_1.agentInterface.ListNodesResponseMessage.encodeDelimited({ nodes: this.UnlockedNodePaths }).finish(); + async requestHolePunch(call, callback) { + try { + this.failOnLocked(); + const { s } = call.request.toObject(); + const address = await this.pk.peerManager.turnClient.requestLocalHolePunchAddress(s); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); + } + catch (error) { + callback(error, null); } - else { - return Agent_1.agentInterface.ListNodesResponseMessage.encodeDelimited({ nodes: this.AllNodePaths }).finish(); - } - } - ///////////////////////// - // KeyManager commands // - ///////////////////////// - async deriveKey(nodePath, request) { - const { keyName, passphrase } = Agent_1.agentInterface.DeriveKeyRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - await pk.keyManager.generateKey(keyName, passphrase); - return Agent_1.agentInterface.DeriveKeyResponseMessage.encodeDelimited({ successful: true }).finish(); - } - async listKeys(nodePath) { - const pk = this.getPolyKey(nodePath); - const keyNames = pk.keyManager.listKeys(); - return Agent_1.agentInterface.ListKeysResponseMessage.encodeDelimited({ keyNames }).finish(); - } - async getKey(nodePath, request) { - const { keyName } = Agent_1.agentInterface.GetKeyRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const keyContent = pk.keyManager.getKey(keyName).toString(); - return Agent_1.agentInterface.GetKeyResponseMessage.encodeDelimited({ keyContent }).finish(); - } - async getPrimaryKeyPair(nodePath, request) { - const { includePrivateKey } = Agent_1.agentInterface.GetPrimaryKeyPairRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const keypair = pk.keyManager.getKeyPair(); - return Agent_1.agentInterface.GetPrimaryKeyPairResponseMessage.encodeDelimited({ - publicKey: keypair.public, - privateKey: includePrivateKey ? keypair.private : undefined, - }).finish(); - } - async deleteKey(nodePath, request) { - const { keyName } = Agent_1.agentInterface.DeleteKeyRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const successful = await pk.keyManager.deleteKey(keyName); - return Agent_1.agentInterface.DeleteKeyResponseMessage.encodeDelimited({ successful }).finish(); - } - ///////////////////// - // Crypto commands // - ///////////////////// - async signFile(nodePath, request) { - const { filePath, privateKeyPath, passphrase } = Agent_1.agentInterface.SignFileRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const signaturePath = await pk.keyManager.signFile(filePath, privateKeyPath, passphrase); - return Agent_1.agentInterface.SignFileResponseMessage.encodeDelimited({ signaturePath }).finish(); - } - async verifyFile(nodePath, request) { - const { filePath, publicKeyPath } = Agent_1.agentInterface.VerifyFileRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const verified = await pk.keyManager.verifyFile(filePath, publicKeyPath); - return Agent_1.agentInterface.VerifyFileResponseMessage.encodeDelimited({ verified }).finish(); - } - async encryptFile(nodePath, request) { - const { filePath, publicKeyPath } = Agent_1.agentInterface.EncryptFileRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const encryptedPath = await pk.keyManager.encryptFile(filePath, publicKeyPath); - return Agent_1.agentInterface.EncryptFileResponseMessage.encodeDelimited({ encryptedPath }).finish(); - } - async decryptFile(nodePath, request) { - const { filePath, privateKeyPath, passphrase } = Agent_1.agentInterface.DecryptFileRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const decryptedPath = await pk.keyManager.decryptFile(filePath, privateKeyPath, passphrase); - return Agent_1.agentInterface.DecryptFileResponseMessage.encodeDelimited({ decryptedPath }).finish(); } - ////////////////////// - // Vault Operations // - ////////////////////// - async listVaults(nodePath) { - const pk = this.getPolyKey(nodePath); - const vaultNames = pk.vaultManager.listVaults(); - return Agent_1.agentInterface.ListVaultsResponseMessage.encodeDelimited({ vaultNames }).finish(); - } - async scanVaultNames(nodePath, request) { - const { publicKey } = Agent_1.agentInterface.ScanVaultNamesRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const vaultNames = await pk.vaultManager.scanVaultNames(publicKey); - return Agent_1.agentInterface.ScanVaultNamesResponseMessage.encodeDelimited({ vaultNames }).finish(); - } - async newVault(nodePath, request) { - const { vaultName } = Agent_1.agentInterface.NewVaultRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - await pk.vaultManager.createVault(vaultName); - return Agent_1.agentInterface.NewVaultResponseMessage.encodeDelimited({ successful: true }).finish(); - } - async pullVault(nodePath, request) { - const { vaultName, publicKey } = Agent_1.agentInterface.PullVaultRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - // pull if vault exists locally, otherwise clone - if (pk.vaultManager.vaultExists(vaultName)) { - const vault = pk.vaultManager.getVault(vaultName); - vault.pullVault(publicKey); + async requestRelay(call, callback) { + try { + this.failOnLocked(); + const { s } = call.request.toObject(); + await this.pk.peerManager.turnClient.requestRelayConnection(s); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); } - else { - pk.vaultManager.cloneVault(vaultName, publicKey); + catch (error) { + callback(error, null); } - return Agent_1.agentInterface.PullVaultResponseMessage.encodeDelimited({ successful: true }).finish(); - } - async destroyVault(nodePath, request) { - const { vaultName } = Agent_1.agentInterface.DestroyVaultRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - pk.vaultManager.destroyVault(vaultName); - return Agent_1.agentInterface.DestroyVaultResponseMessage.encodeDelimited({ successful: true }).finish(); } - /////////////////////// - // Secret Operations // - /////////////////////// - async listSecrets(nodePath, request) { - const { vaultName } = Agent_1.agentInterface.ListSecretsRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const vault = pk.vaultManager.getVault(vaultName); - const secretNames = vault.listSecrets(); - return Agent_1.agentInterface.ListSecretsResponseMessage.encodeDelimited({ secretNames }).finish(); - } - async createSecret(nodePath, request) { - const { vaultName, secretName, secretPath, secretContent, } = Agent_1.agentInterface.CreateSecretRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const vault = pk.vaultManager.getVault(vaultName); - let secretBuffer; - if (secretPath) { - secretBuffer = await fs_1.default.promises.readFile(secretPath); + async scanVaultNames(call, callback) { + try { + this.failOnLocked(); + const { s } = call.request.toObject(); + const vaultNames = await this.pk.vaultManager.scanVaultNames(s); + const response = new agent.StringListMessage(); + response.setSList(vaultNames); + callback(null, response); } - else { - secretBuffer = Buffer.from(secretContent); - } - await vault.addSecret(secretName, secretBuffer); - return Agent_1.agentInterface.CreateSecretResponseMessage.encodeDelimited({ successful: true }).finish(); - } - async destroySecret(nodePath, request) { - const { vaultName, secretName } = Agent_1.agentInterface.DestroySecretRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const vault = pk.vaultManager.getVault(vaultName); - await vault.removeSecret(secretName); - return Agent_1.agentInterface.DestroySecretResponseMessage.encodeDelimited({ successful: true }).finish(); - } - async getSecret(nodePath, request) { - const { vaultName, secretName } = Agent_1.agentInterface.GetSecretRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const vault = pk.vaultManager.getVault(vaultName); - const secret = Buffer.from(vault.getSecret(secretName)); - return Agent_1.agentInterface.GetSecretResponseMessage.encodeDelimited({ secret: secret }).finish(); - } - async updateSecret(nodePath, request) { - const { vaultName, secretName, secretPath, secretContent, } = Agent_1.agentInterface.UpdateSecretRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const vault = pk.vaultManager.getVault(vaultName); - let secretBuffer; - if (secretPath) { - secretBuffer = await fs_1.default.promises.readFile(secretPath); + catch (error) { + callback(error, null); } - else { - secretBuffer = Buffer.from(secretContent); + } + async signFile(call, callback) { + try { + this.failOnLocked(); + const { filePath, privateKeyPath, passphrase } = call.request.toObject(); + const signaturePath = await this.pk.keyManager.signFile(filePath, privateKeyPath, passphrase); + const response = new agent.StringMessage(); + response.setS(signaturePath); + callback(null, response); + } + catch (error) { + callback(error, null); } - await vault.updateSecret(secretName, secretBuffer); - return Agent_1.agentInterface.UpdateSecretResponseMessage.encodeDelimited({ successful: true }).finish(); } - ///////////////////// - // Peer Operations // - ///////////////////// - async addPeer(nodePath, request) { - const { publicKey, peerAddress, relayPublicKey } = Agent_1.agentInterface.AddPeerRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - pk.peerManager.addPeer(new PeerInfo_1.default(publicKey, peerAddress, relayPublicKey)); - return Agent_1.agentInterface.AddPeerResponseMessage.encodeDelimited({ successful: true }).finish(); + async stopAgent(call, callback) { + try { + this.pk.peerManager.multicastBroadcaster.stopBroadcasting(); + const response = new agent.BooleanMessage(); + response.setB(true); + this.configStore.clear(); + callback(null, response); + await util_1.promisify(this.server.tryShutdown)(); + // finally kill the pid of the agent process + if (process_1.default.env.NODE_ENV !== 'test') { + process_1.default.kill(this.pid); + } + } + catch (error) { + callback(error, null); + } } - async getPeerInfo(nodePath, request) { - var _a; - const { current, publicKey } = Agent_1.agentInterface.PeerInfoRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - let peerInfo; - if (current) { - peerInfo = pk.peerManager.peerInfo; + async toggleStealthMode(call, callback) { + try { + this.failOnLocked(); + const { b } = call.request.toObject(); + this.pk.peerManager.toggleStealthMode(b); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); } - else { - if (!pk.peerManager.hasPeer(publicKey)) { - throw Error('public key does not exist in peer store'); - } - peerInfo = pk.peerManager.getPeer(publicKey); + catch (error) { + callback(error, null); } - return Agent_1.agentInterface.PeerInfoResponseMessage.encodeDelimited({ - publicKey: peerInfo.publicKey, - peerAddress: (_a = peerInfo.peerAddress) === null || _a === void 0 ? void 0 : _a.toString(), - relayPublicKey: peerInfo.relayPublicKey, - }).finish(); } - async pingPeer(nodePath, request) { - const { publicKey, timeout } = Agent_1.agentInterface.PingPeerRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const successful = await pk.peerManager.pingPeer(publicKey, timeout); - return Agent_1.agentInterface.PingPeerResponseMessage.encodeDelimited({ successful }).finish(); - } - async findPeer(nodePath, request) { - const { publicKey, timeout } = Agent_1.agentInterface.FindPeerRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const successful = await pk.peerManager.findPublicKey(publicKey, timeout); - return Agent_1.agentInterface.FindPeerResponseMessage.encodeDelimited({ successful }).finish(); - } - async findSocialPeer(nodePath, request) { - const { handle, service, timeout } = Agent_1.agentInterface.FindSocialPeerRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const successful = await pk.peerManager.findSocialUser(handle, service, timeout); - return Agent_1.agentInterface.FindSocialPeerResponseMessage.encodeDelimited({ successful }).finish(); - } - async listPeers(nodePath, request) { - const pk = this.getPolyKey(nodePath); - const publicKeys = pk.peerManager.listPeers(); - return Agent_1.agentInterface.ListPeersResponseMessage.encodeDelimited({ publicKeys }).finish(); - } - async toggleStealth(nodePath, request) { - const { active } = Agent_1.agentInterface.ToggleStealthRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - pk.peerManager.toggleStealthMode(active); - return Agent_1.agentInterface.ToggleStealthResponseMessage.encodeDelimited({ successful: true }).finish(); - } - async updatePeerInfo(nodePath, request) { - var _a, _b; - const { publicKey, currentNode, peerHost, peerPort, relayPublicKey, } = Agent_1.agentInterface.UpdatePeerInfoRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - let currentPeerInfo; - if (currentNode) { - currentPeerInfo = pk.peerManager.peerInfo; + async updateLocalPeerInfo(call, callback) { + try { + this.failOnLocked(); + const { publicKey, relayPublicKey, peerAddress, apiAddress } = call.request.toObject(); + this.pk.peerManager.peerInfo.relayPublicKey = relayPublicKey; + this.pk.peerManager.peerInfo.peerAddress = Polykey_1.Address.parse(peerAddress); + this.pk.peerManager.peerInfo.apiAddress = Polykey_1.Address.parse(apiAddress); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); } - else { - if (!pk.peerManager.hasPeer(publicKey)) { + catch (error) { + callback(error, null); + } + } + async updatePeerInfo(call, callback) { + try { + this.failOnLocked(); + const { publicKey, relayPublicKey, peerAddress, apiAddress } = call.request.toObject(); + if (!this.pk.peerManager.hasPeer(publicKey)) { throw Error('peer does not exist in store'); } - currentPeerInfo = pk.peerManager.getPeer(publicKey); + const peerInfo = this.pk.peerManager.getPeer(publicKey); + peerInfo.relayPublicKey = relayPublicKey; + peerInfo.peerAddress = Polykey_1.Address.parse(peerAddress); + peerInfo.apiAddress = Polykey_1.Address.parse(apiAddress); + this.pk.peerManager.updatePeer(peerInfo); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); } - (_a = currentPeerInfo.peerAddress) === null || _a === void 0 ? void 0 : _a.updateHost(peerHost); - (_b = currentPeerInfo.peerAddress) === null || _b === void 0 ? void 0 : _b.updatePort(peerPort); - currentPeerInfo.relayPublicKey = relayPublicKey; - if (!currentNode) { - pk.peerManager.updatePeer(currentPeerInfo); + catch (error) { + callback(error, null); } - return Agent_1.agentInterface.UpdatePeerInfoResponseMessage.encodeDelimited({ successful: true }).finish(); } - async requestRelay(nodePath, request) { - const { publicKey } = Agent_1.agentInterface.RequestRelayRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - await pk.peerManager.turnClient.requestRelayConnection(publicKey); - return Agent_1.agentInterface.RequestRelayResponseMessage.encodeDelimited({ successful: true }).finish(); + async updateSecret(call, callback) { + try { + this.failOnLocked(); + const { secretPath, secretFilePath, secretContent } = call.request.toObject(); + const vault = this.pk.vaultManager.getVault(secretPath === null || secretPath === void 0 ? void 0 : secretPath.vaultName); + let secretBuffer; + if (secretFilePath) { + secretBuffer = await fs_1.default.promises.readFile(secretFilePath); + } + else { + secretBuffer = Buffer.from(secretContent); + } + await vault.updateSecret(secretPath === null || secretPath === void 0 ? void 0 : secretPath.secretName, secretBuffer); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); + } + catch (error) { + callback(error, null); + } } - async requestPunch(nodePath, request) { - const { publicKey } = Agent_1.agentInterface.RequestPunchRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const address = await pk.peerManager.turnClient.requestLocalHolePunchAddress(publicKey); - return Agent_1.agentInterface.RequestPunchResponseMessage.encodeDelimited({ address: address.toString() }).finish(); + async verifyFile(call, callback) { + try { + this.failOnLocked(); + const { publicKeyPath, filePath } = call.request.toObject(); + const verified = await this.pk.keyManager.verifyFile(filePath, publicKeyPath); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); + } + catch (error) { + callback(error, null); + } } /////////////////////// // Client Connection // /////////////////////// - static connectToAgent(getStream) { - const defaultStream = () => { - const socket = net_1.default.createConnection(PolykeyAgent.SocketPath); - return socket; - }; - const client = new PolykeyClient_1.default(getStream !== null && getStream !== void 0 ? getStream : defaultStream); - return client; - } - // ===== Helper methods===== // - static get SocketPath() { - const platform = os_1.default.platform(); - const userInfo = os_1.default.userInfo(); - if (process_1.default.env.PK_SOCKET_PATH) { - return process_1.default.env.PK_SOCKET_PATH; - } - else if (platform == 'win32') { - return path_1.default.join('\\\\?\\pipe', process_1.default.cwd(), 'polykey-agent'); + static connectToAgent(polykeyPath) { + const configStore = PolykeyAgent.ConfigStore(polykeyPath); + const port = parseInt(configStore.get('port')); + if (!port) { + throw Error(`polykey agent is not started at polykey path: '${polykeyPath}'`); } else { - return `/run/user/${userInfo.uid}/polykey/S.polykey-agent`; + // get credentials + const caStoreConfig = PolykeyAgent.CAStore(polykeyPath); + // check if credentials exist for current polykey path + let credentials; + if (caStoreConfig.has(polykeyPath)) { + const caStore = caStoreConfig.get(polykeyPath); + credentials = grpc.ChannelCredentials.createSsl(Buffer.from(caStore.rootCert), Buffer.from(caStore.clientKeyPair.private), Buffer.from(caStore.clientCert)); + } + else { + credentials = grpc.credentials.createInsecure(); + } + const client = new Agent_grpc_pb_1.AgentClient(`localhost:${port}`, credentials); + return client; } } - static get LogPath() { - const platform = os_1.default.platform(); - const userInfo = os_1.default.userInfo(); - if (process_1.default.env.PK_LOG_PATH) { - return process_1.default.env.PK_LOG_PATH; - } - else if (platform == 'win32') { - return path_1.default.join(os_1.default.tmpdir(), 'polykey', 'log'); + static ConfigStore(polykeyPath) { + const configStore = new configstore_1.default('polykey', undefined, { + configPath: path_1.default.join(polykeyPath, '.agent', '.config.json'), + }); + return configStore; + } + static AgentIsRunning(polykeyPath) { + const existingPid = PolykeyAgent.AgentPid(polykeyPath); + if (existingPid) { + try { + process_1.default.kill(existingPid, 0); + return true; + } + catch (e) { + return false; + } } else { - return `/run/user/${userInfo.uid}/polykey/log`; + return false; } } - static async startAgent(daemon = false) { + static AgentPid(polykeyPath) { + const configStore = PolykeyAgent.ConfigStore(polykeyPath); + return parseInt(configStore.get('pid')); + } + static async startAgent(polykeyPath, daemon = false, failOnNotInitialized = true) { + // either resolves a newly started process ID or true if the process is running already return new Promise((resolve, reject) => { try { - if (fs_1.default.existsSync(PolykeyAgent.LogPath)) { - fs_1.default.rmdirSync(PolykeyAgent.LogPath, { recursive: true }); + if (failOnNotInitialized && !fs_1.default.existsSync(path_1.default.join(polykeyPath, '.keys', 'private_key'))) { + throw Error(`polykey node has not been initialized, initialize with 'pk agent init'`); + } + // check if agent is already running + if (PolykeyAgent.AgentIsRunning(polykeyPath)) { + resolve(true); + } + else { + const logPath = path_1.default.join(polykeyPath, '.agent', 'log'); + if (fs_1.default.existsSync(logPath)) { + fs_1.default.rmdirSync(logPath, { recursive: true }); + } + fs_1.default.mkdirSync(logPath, { recursive: true }); + let options = { + uid: process_1.default.getuid(), + detached: daemon, + stdio: [ + 'ignore', + fs_1.default.openSync(path_1.default.join(logPath, 'output.log'), 'a'), + fs_1.default.openSync(path_1.default.join(logPath, 'error.log'), 'a'), + 'ipc', + ], + }; + const agentProcess = child_process_1.spawn(PolykeyAgent.DAEMON_SCRIPT_PATH.includes('.js') ? 'node' : 'ts-node', [PolykeyAgent.DAEMON_SCRIPT_PATH], options); + agentProcess.send(polykeyPath, (err) => { + if (err) { + agentProcess.kill('SIGTERM'); + reject(err); + } + else { + const pid = agentProcess.pid; + agentProcess.on('message', (msg) => { + agentProcess.unref(); + agentProcess.disconnect(); + if (msg === 'started') { + resolve(pid); + } + else { + reject('something went wrong, child process did not start polykey agent'); + } + }); + } + }); } - fs_1.default.mkdirSync(PolykeyAgent.LogPath, { recursive: true }); - let options = { - uid: process_1.default.getuid(), - detached: daemon, - stdio: [ - 'ipc', - fs_1.default.openSync(path_1.default.join(PolykeyAgent.LogPath, 'output.log'), 'a'), - fs_1.default.openSync(path_1.default.join(PolykeyAgent.LogPath, 'error.log'), 'a'), - ], - }; - const agentProcess = child_process_1.spawn(PolykeyAgent.DAEMON_SCRIPT_PATH.includes('.js') ? 'node' : 'ts-node', [PolykeyAgent.DAEMON_SCRIPT_PATH], options); - const pid = agentProcess.pid; - agentProcess.unref(); - agentProcess.disconnect(); - resolve(pid); } - catch (err) { - reject(err); + catch (error) { + reject(error); } }); } @@ -6517,25 +6811,31 @@ exports.default = PolykeyAgent; /***/ }), -/* 66 */ +/* 73 */ +/***/ (function(module, exports) { + +module.exports = require("get-port"); + +/***/ }), +/* 74 */ /***/ (function(module, exports) { module.exports = require("configstore"); /***/ }), -/* 67 */ +/* 75 */ /***/ (function(module, exports) { -module.exports = require("./polykey.js"); +module.exports = require("../proto/compiled/Agent_grpc_pb"); /***/ }), -/* 68 */ +/* 76 */ /***/ (function(module, exports) { module.exports = require("chalk"); /***/ }), -/* 69 */ +/* 77 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6545,9 +6845,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const commander_1 = __importDefault(__webpack_require__(2)); -const natCommands_1 = __webpack_require__(70); -const peerCommands_1 = __webpack_require__(71); -const socialCommands_1 = __webpack_require__(72); +const natCommands_1 = __webpack_require__(78); +const peerCommands_1 = __webpack_require__(79); +const socialCommands_1 = __webpack_require__(80); function makePeersCommand() { return new commander_1.default.Command('peers') .description('peer operations') @@ -6566,7 +6866,7 @@ exports.default = makePeersCommand; /***/ }), -/* 70 */ +/* 78 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6574,12 +6874,18 @@ exports.default = makePeersCommand; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; Object.defineProperty(exports, "__esModule", { value: true }); -const fs_1 = __importDefault(__webpack_require__(3)); +const fs_1 = __importDefault(__webpack_require__(5)); const commander_1 = __importDefault(__webpack_require__(2)); -const Polykey_1 = __webpack_require__(4); -const utils_1 = __webpack_require__(6); -const Agent_1 = __webpack_require__(5); +const utils_1 = __webpack_require__(4); +const pb = __importStar(__webpack_require__(3)); function makeRelayCommand() { return new commander_1.default.Command('relay') .description('request a relay connection from a public peer') @@ -6587,16 +6893,14 @@ function makeRelayCommand() { .requiredOption('-pk, --public-key ', 'path to the file which contains the public key') .option('-v, --verbose', 'increase verbosity level by one') .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); - const status = await client.getAgentStatus(); - if (status != Agent_1.agentInterface.AgentStatusType.ONLINE) { - throw Error(`agent status is: '${Agent_1.agentInterface.AgentStatusType[status].toLowerCase()}'`); - } const nodePath = utils_1.determineNodePath(options.nodePath); + const client = await utils_1.getAgentClient(nodePath); // read in publicKey if it exists const publicKey = fs_1.default.readFileSync(options.publicKey).toString(); - const successful = await client.requestRelay(nodePath, publicKey); - if (successful) { + const request = new pb.StringMessage(); + request.setS(publicKey); + const res = (await utils_1.promisifyGrpc(client.requestRelay.bind(client))(request)); + if (res.getB()) { utils_1.pkLogger('peer server successfully relayed', utils_1.PKMessageType.SUCCESS); } else { @@ -6612,23 +6916,21 @@ function makePunchCommand() { .requiredOption('-pk, --public-key ', 'path to the file which contains the public key') .option('-v, --verbose', 'increase verbosity level by one') .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); - const status = await client.getAgentStatus(); - if (status != Agent_1.agentInterface.AgentStatusType.ONLINE) { - throw Error(`agent status is: '${Agent_1.agentInterface.AgentStatusType[status].toLowerCase()}'`); - } const nodePath = utils_1.determineNodePath(options.nodePath); + const client = await utils_1.getAgentClient(nodePath); // read in publicKey if it exists const publicKey = fs_1.default.readFileSync(options.publicKey).toString(); - const address = await client.requestPunch(nodePath, publicKey); - utils_1.pkLogger(`peer server successfully served at hole punched address: ${address.toString()}`, utils_1.PKMessageType.SUCCESS); + const request = new pb.StringMessage(); + request.setS(publicKey); + const res = (await utils_1.promisifyGrpc(client.requestHolePunch.bind(client))(request)); + utils_1.pkLogger(`peer address successfully hole punched`, utils_1.PKMessageType.SUCCESS); })); } exports.makePunchCommand = makePunchCommand; /***/ }), -/* 71 */ +/* 79 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6636,43 +6938,60 @@ exports.makePunchCommand = makePunchCommand; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; Object.defineProperty(exports, "__esModule", { value: true }); -const fs_1 = __importDefault(__webpack_require__(3)); +const fs_1 = __importDefault(__webpack_require__(5)); const commander_1 = __importDefault(__webpack_require__(2)); -const Polykey_1 = __webpack_require__(4); -const utils_1 = __webpack_require__(6); -const Agent_1 = __webpack_require__(5); +const Polykey_1 = __webpack_require__(15); +const pb = __importStar(__webpack_require__(3)); +const utils_1 = __webpack_require__(4); function makeAddPeerCommand() { return new commander_1.default.Command('add') .description('add a new peer to the store') .option('-b64, --base64 ', 'decode the peer info from a base64 string') .option('-pk, --public-key ', 'path to the file which contains the public key') - .option('-pa, --peer-address ', 'public address on which the node can be contacted') .option('-rk, --relay-key ', 'path to the file which contains the public key of the relay peer') + .option('-pa, --peer-address ', 'address on which the node can be contacted') + .option('-aa, --api-address ', 'address on which the HTTP API is served') .option('--node-path ', 'node path') .option('-v, --verbose', 'increase verbosity level by one') .action(utils_1.actionRunner(async (options) => { - var _a, _b, _c; - const client = Polykey_1.PolykeyAgent.connectToAgent(); - const status = await client.getAgentStatus(); - if (status != Agent_1.agentInterface.AgentStatusType.ONLINE) { - throw Error(`agent status is: '${Agent_1.agentInterface.AgentStatusType[status].toLowerCase()}'`); - } + var _a, _b; const nodePath = utils_1.determineNodePath(options.nodePath); + const client = await utils_1.getAgentClient(nodePath); const base64String = (_b = (_a = options === null || options === void 0 ? void 0 : options.base64) === null || _a === void 0 ? void 0 : _a.replace('\r', '')) === null || _b === void 0 ? void 0 : _b.replace('\n', ''); - let successful; + const request = new pb.PeerInfoMessage(); if (base64String != undefined) { // read in peer info string - const { publicKey, peerAddress, relayPublicKey } = Polykey_1.PeerInfo.parseB64(base64String); - successful = await client.addPeer(nodePath, publicKey, (_c = peerAddress === null || peerAddress === void 0 ? void 0 : peerAddress.toString()) !== null && _c !== void 0 ? _c : '', relayPublicKey); + const { publicKey, peerAddress, relayPublicKey, apiAddress } = Polykey_1.PeerInfo.parseB64(base64String); + request.setPublicKey(publicKey); + if (relayPublicKey) { + request.setRelayPublicKey(relayPublicKey); + } + if (peerAddress) { + request.setPeerAddress(peerAddress === null || peerAddress === void 0 ? void 0 : peerAddress.toString()); + } + if (apiAddress) { + request.setPeerAddress(apiAddress === null || apiAddress === void 0 ? void 0 : apiAddress.toString()); + } } else { // read in publicKey if it exists const publicKey = fs_1.default.readFileSync(options.publicKey).toString(); const relayPublicKey = fs_1.default.readFileSync(options.relayKey).toString(); - successful = await client.addPeer(nodePath, publicKey, options.peerAddress, relayPublicKey); + request.setPublicKey(publicKey); + request.setRelayPublicKey(relayPublicKey); + request.setPeerAddress(options.peerAddress); + request.setApiAddress(options.apiAddress); } - if (successful) { + const res = (await utils_1.promisifyGrpc(client.addPeer.bind(client))(request)); + if (res.getB()) { utils_1.pkLogger('peer successfully added to peer store', utils_1.PKMessageType.SUCCESS); } else { @@ -6686,18 +7005,18 @@ function makeFindPeerCommand() { .description('find a peer based on a public key') .option('--node-path ', 'node path') .requiredOption('-pk, --public-key ', 'path to the file which contains the public key') + .requiredOption('-t, --timeout ', 'timeout of the request in milliseconds') .option('-v, --verbose', 'increase verbosity level by one') .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); - const status = await client.getAgentStatus(); - if (status != Agent_1.agentInterface.AgentStatusType.ONLINE) { - throw Error(`agent status is: '${Agent_1.agentInterface.AgentStatusType[status].toLowerCase()}'`); - } const nodePath = utils_1.determineNodePath(options.nodePath); + const client = await utils_1.getAgentClient(nodePath); // read in publicKey if it exists const publicKey = fs_1.default.readFileSync(options.publicKey).toString(); - const successful = await client.findPeer(nodePath, publicKey); - if (successful) { + const request = new pb.ContactPeerMessage(); + request.setPublicKeyOrHandle(publicKey); + request.setTimeout(options.timeout); + const res = (await utils_1.promisifyGrpc(client.findPeer.bind(client))(request)); + if (res.getB()) { utils_1.pkLogger('peer successfully pinged', utils_1.PKMessageType.SUCCESS); } else { @@ -6715,30 +7034,37 @@ function makeGetPeerInfoCommand() { .option('-pk, --public-key ', 'path to the file which contains the public key') .option('-v, --verbose', 'increase verbosity level by one') .action(utils_1.actionRunner(async (options) => { - var _a, _b, _c; - const client = Polykey_1.PolykeyAgent.connectToAgent(); - const status = await client.getAgentStatus(); - if (status != Agent_1.agentInterface.AgentStatusType.ONLINE) { - throw Error(`agent status is: '${Agent_1.agentInterface.AgentStatusType[status].toLowerCase()}'`); - } + var _a, _b, _c, _d, _e; const nodePath = utils_1.determineNodePath(options.nodePath); + const client = await utils_1.getAgentClient(nodePath); const publicKeyPath = options.publicKey; // read in publicKey if it exists let publicKey; if (publicKeyPath) { publicKey = fs_1.default.readFileSync(publicKeyPath).toString(); } - const peerInfo = await client.getPeerInfo(nodePath, options.currentNode, publicKey); + let res; + if (options.currentNode) { + res = (await utils_1.promisifyGrpc(client.getLocalPeerInfo.bind(client))(new pb.EmptyMessage())); + } + else { + const request = new pb.StringMessage(); + request.setS(publicKey); + res = (await utils_1.promisifyGrpc(client.getPeerInfo.bind(client))(request)); + } + const peerInfo = new Polykey_1.PeerInfo(res.getPublicKey(), res.getRelayPublicKey(), res.getPeerAddress(), res.getApiAddress()); if (options.base64) { utils_1.pkLogger(peerInfo.toStringB64(), utils_1.PKMessageType.SUCCESS); } else { utils_1.pkLogger('Peer Public Key:', utils_1.PKMessageType.INFO); utils_1.pkLogger(peerInfo.publicKey, utils_1.PKMessageType.SUCCESS); - utils_1.pkLogger('Peer Address:', utils_1.PKMessageType.INFO); - utils_1.pkLogger((_b = (_a = peerInfo.peerAddress) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : '', utils_1.PKMessageType.SUCCESS); utils_1.pkLogger('Relay Public Key:', utils_1.PKMessageType.INFO); - utils_1.pkLogger((_c = peerInfo.relayPublicKey) !== null && _c !== void 0 ? _c : '', utils_1.PKMessageType.SUCCESS); + utils_1.pkLogger((_a = peerInfo.relayPublicKey) !== null && _a !== void 0 ? _a : '', utils_1.PKMessageType.SUCCESS); + utils_1.pkLogger('Peer Address:', utils_1.PKMessageType.INFO); + utils_1.pkLogger((_c = (_b = peerInfo.peerAddress) === null || _b === void 0 ? void 0 : _b.toString()) !== null && _c !== void 0 ? _c : '', utils_1.PKMessageType.SUCCESS); + utils_1.pkLogger('API Address:', utils_1.PKMessageType.INFO); + utils_1.pkLogger((_e = (_d = peerInfo.apiAddress) === null || _d === void 0 ? void 0 : _d.toString()) !== null && _e !== void 0 ? _e : '', utils_1.PKMessageType.SUCCESS); } })); } @@ -6750,13 +7076,10 @@ function makeListPeersCommand() { .option('--node-path ', 'node path') .option('-v, --verbose', 'increase verbosity level by one') .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); - const status = await client.getAgentStatus(); - if (status != Agent_1.agentInterface.AgentStatusType.ONLINE) { - throw Error(`agent status is: '${Agent_1.agentInterface.AgentStatusType[status].toLowerCase()}'`); - } const nodePath = utils_1.determineNodePath(options.nodePath); - const publicKeys = await client.listPeers(nodePath); + const client = await utils_1.getAgentClient(nodePath); + const res = (await utils_1.promisifyGrpc(client.listPeers.bind(client))(new pb.EmptyMessage())); + const publicKeys = res.getSList(); if (publicKeys === undefined || publicKeys.length == 0) { utils_1.pkLogger('no peers exist', utils_1.PKMessageType.INFO); } @@ -6775,16 +7098,14 @@ function makePingPeerCommand() { .requiredOption('-pk, --public-key ', 'path to the file which contains the public key') .option('-v, --verbose', 'increase verbosity level by one') .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); - const status = await client.getAgentStatus(); - if (status != Agent_1.agentInterface.AgentStatusType.ONLINE) { - throw Error(`agent status is: '${Agent_1.agentInterface.AgentStatusType[status].toLowerCase()}'`); - } const nodePath = utils_1.determineNodePath(options.nodePath); + const client = await utils_1.getAgentClient(nodePath); // read in publicKey if it exists const publicKey = fs_1.default.readFileSync(options.publicKey).toString(); - const successful = await client.pingPeer(nodePath, publicKey); - if (successful) { + const request = new pb.ContactPeerMessage(); + request.setPublicKeyOrHandle(publicKey); + const res = (await utils_1.promisifyGrpc(client.pingPeer.bind(client))(request)); + if (res.getB()) { utils_1.pkLogger('peer successfully pinged', utils_1.PKMessageType.SUCCESS); } else { @@ -6800,13 +7121,11 @@ function makeStealthCommand() { .option('--node-path ', 'node path') .option('-v, --verbose', 'increase verbosity level by one') .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); - const status = await client.getAgentStatus(); - if (status != Agent_1.agentInterface.AgentStatusType.ONLINE) { - throw Error(`agent status is: '${Agent_1.agentInterface.AgentStatusType[status].toLowerCase()}'`); - } const nodePath = utils_1.determineNodePath(options.nodePath); - await client.toggleStealth(nodePath, true); + const client = await utils_1.getAgentClient(nodePath); + const request = new pb.BooleanMessage(); + request.setB(true); + const res = (await utils_1.promisifyGrpc(client.toggleStealthMode.bind(client))(request)); utils_1.pkLogger(`stealth mode toggled to 'active'`, utils_1.PKMessageType.SUCCESS); })); // add inactive command @@ -6814,13 +7133,11 @@ function makeStealthCommand() { .option('--node-path ', 'node path') .option('-v, --verbose', 'increase verbosity level by one') .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); - const status = await client.getAgentStatus(); - if (status != Agent_1.agentInterface.AgentStatusType.ONLINE) { - throw Error(`agent status is: '${Agent_1.agentInterface.AgentStatusType[status].toLowerCase()}'`); - } const nodePath = utils_1.determineNodePath(options.nodePath); - await client.toggleStealth(nodePath, false); + const client = await utils_1.getAgentClient(nodePath); + const request = new pb.BooleanMessage(); + request.setB(false); + const res = (await utils_1.promisifyGrpc(client.toggleStealthMode.bind(client))(request)); utils_1.pkLogger(`stealth mode toggled to 'inactive'`, utils_1.PKMessageType.SUCCESS); })); const stealthCommand = new commander_1.default.Command('stealth') @@ -6835,21 +7152,16 @@ function makeUpdatePeerInfoCommand() { .description('update the peer info for a particular public key') .option('--node-path ', 'node path') .option('-cn, --current-node', 'only list the peer information for the current node, useful for sharing') - .option('-pk, --public-key ', 'path to the file which contains the public key') .option('-b64, --base64 ', 'decode the peer info from a base64 string') - .option('-ch, --peer-host ', 'update the peer addresss host') - .option('-cp, --peer-port ', 'update the peer addresss port') + .option('-pk, --public-key ', 'path to the file which contains the public key') .option('-rk, --relay-key ', 'path to the file which contains the public key of the relay peer') + .option('-pa, --peer-address ', 'update the peer address') + .option('-aa, --api-address ', 'update the api address') .option('-v, --verbose', 'increase verbosity level by one') .action(utils_1.actionRunner(async (options) => { var _a, _b; - const client = Polykey_1.PolykeyAgent.connectToAgent(); - const status = await client.getAgentStatus(); - if (status != Agent_1.agentInterface.AgentStatusType.ONLINE) { - throw Error(`agent status is: '${Agent_1.agentInterface.AgentStatusType[status].toLowerCase()}'`); - } const nodePath = utils_1.determineNodePath(options.nodePath); - const currentNode = options.currentNode; + const client = await utils_1.getAgentClient(nodePath); const publicKeyPath = options.publicKey; // read in publicKey if it exists let publicKey = undefined; @@ -6862,15 +7174,42 @@ function makeUpdatePeerInfoCommand() { if (relayPublicKeyPath) { relayPublicKey = fs_1.default.readFileSync(relayPublicKeyPath).toString(); } + const request = new pb.PeerInfoMessage(); const base64String = (_b = (_a = options === null || options === void 0 ? void 0 : options.base64) === null || _a === void 0 ? void 0 : _a.replace('\r', '')) === null || _b === void 0 ? void 0 : _b.replace('\n', ''); - let successful; if (base64String != undefined) { // read in peer info string - const { publicKey, peerAddress, relayPublicKey } = Polykey_1.PeerInfo.parseB64(base64String); - successful = await client.updatePeer(nodePath, currentNode ? undefined : publicKey, currentNode, peerAddress === null || peerAddress === void 0 ? void 0 : peerAddress.host, peerAddress === null || peerAddress === void 0 ? void 0 : peerAddress.port, relayPublicKey); + const { publicKey, relayPublicKey, peerAddress, apiAddress } = Polykey_1.PeerInfo.parseB64(base64String); + request.setPublicKey(publicKey); + if (relayPublicKey) { + request.setRelayPublicKey(relayPublicKey); + } + if (peerAddress) { + request.setPeerAddress(peerAddress === null || peerAddress === void 0 ? void 0 : peerAddress.toString()); + } + if (apiAddress) { + request.setApiAddress(apiAddress === null || apiAddress === void 0 ? void 0 : apiAddress.toString()); + } + } + else { + request.setPublicKey(options.publicKey); + if (options.relayPublicKey) { + request.setRelayPublicKey(options.relayPublicKey); + } + if (options.peerAddress) { + request.setPeerAddress(options.peerAddress); + } + if (options.apiAddress) { + request.setApiAddress(options.apiAddress); + } + } + let successful; + if (options.currentNode) { + const res = (await utils_1.promisifyGrpc(client.updateLocalPeerInfo.bind(client))(request)); + successful = res.getB(); } else { - successful = await client.updatePeer(nodePath, publicKey, currentNode, options.peerHost, options.peerPort, relayPublicKey); + const res = (await utils_1.promisifyGrpc(client.updatePeerInfo.bind(client))(request)); + successful = res.getB(); } if (successful) { utils_1.pkLogger('peer info was successfully updated', utils_1.PKMessageType.SUCCESS); @@ -6884,7 +7223,7 @@ exports.makeUpdatePeerInfoCommand = makeUpdatePeerInfoCommand; /***/ }), -/* 72 */ +/* 80 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6892,11 +7231,17 @@ exports.makeUpdatePeerInfoCommand = makeUpdatePeerInfoCommand; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; Object.defineProperty(exports, "__esModule", { value: true }); const commander_1 = __importDefault(__webpack_require__(2)); -const Polykey_1 = __webpack_require__(4); -const utils_1 = __webpack_require__(6); -const Agent_1 = __webpack_require__(5); +const utils_1 = __webpack_require__(4); +const pb = __importStar(__webpack_require__(3)); function makeFindSocialPeerCommand() { return new commander_1.default.Command('social') .description('find a peer based on a handle and service, e.g. john.smith and github') @@ -6905,14 +7250,12 @@ function makeFindSocialPeerCommand() { .requiredOption('-s, --service ', 'service where the handle can be found, e.g. github') .option('-v, --verbose', 'increase verbosity level by one') .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); - const status = await client.getAgentStatus(); - if (status != Agent_1.agentInterface.AgentStatusType.ONLINE) { - throw Error(`agent status is: '${Agent_1.agentInterface.AgentStatusType[status].toLowerCase()}'`); - } const nodePath = utils_1.determineNodePath(options.nodePath); - const successful = await client.findSocialPeer(nodePath, options.handle, options.service); - if (successful) { + const client = await utils_1.getAgentClient(nodePath); + const request = new pb.ContactPeerMessage(); + request.setPublicKeyOrHandle(`@${options.service}/${options.handle}`); + const res = (await utils_1.promisifyGrpc(client.findSocialPeer.bind(client))(request)); + if (res.getB()) { utils_1.pkLogger('peer successfully pinged', utils_1.PKMessageType.SUCCESS); } else { @@ -6924,7 +7267,7 @@ exports.makeFindSocialPeerCommand = makeFindSocialPeerCommand; /***/ }), -/* 73 */ +/* 81 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6932,11 +7275,17 @@ exports.makeFindSocialPeerCommand = makeFindSocialPeerCommand; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; Object.defineProperty(exports, "__esModule", { value: true }); const commander_1 = __importDefault(__webpack_require__(2)); -const Polykey_1 = __webpack_require__(4); -const utils_1 = __webpack_require__(6); -const Agent_1 = __webpack_require__(5); +const utils_1 = __webpack_require__(4); +const pb = __importStar(__webpack_require__(3)); function makeSignCommand() { return new commander_1.default.Command('sign') .description('signing operations [files]') @@ -6944,32 +7293,34 @@ function makeSignCommand() { .option('-k, --signing-key ', 'path to private key that will be used to sign files') .option('-p, --key-passphrase ', 'passphrase to unlock the provided signing key') .arguments('file(s) to be signed') - .action(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); - const status = await client.getAgentStatus(); - if (status != Agent_1.agentInterface.AgentStatusType.ONLINE) { - throw Error(`agent status is: '${Agent_1.agentInterface.AgentStatusType[status].toLowerCase()}'`); - } + .action(utils_1.actionRunner(async (options) => { const nodePath = utils_1.determineNodePath(options.nodePath); + const client = await utils_1.getAgentClient(nodePath); const signingKeyPath = options.signingKey; const keyPassphrase = options.keyPassphrase; if ((signingKeyPath || keyPassphrase) && !(signingKeyPath && keyPassphrase)) { throw Error('signing key and passphrase must be specified together'); } const filePathList = options.args.values(); + console.log('filePathList'); + console.log(filePathList); if (filePathList.length == 0) { throw Error('no files provided'); } for (const filePath of filePathList) { try { - const signaturePath = await client.signFile(nodePath, filePath, signingKeyPath, keyPassphrase); - utils_1.pkLogger(`file '${filePath}' successfully signed at '${signaturePath}'`, utils_1.PKMessageType.SUCCESS); + const request = new pb.SignFileMessage(); + request.setFilePath(filePath); + request.setPrivateKeyPath(signingKeyPath); + request.setPassphrase(keyPassphrase); + const res = (await utils_1.promisifyGrpc(client.signFile.bind(client))(request)); + utils_1.pkLogger(`file '${filePath}' successfully signed at '${res.getS()}'`, utils_1.PKMessageType.SUCCESS); } catch (err) { throw Error(`failed to sign '${filePath}': ${err}`); } } - }); + })); } function makeVerifyCommand() { return new commander_1.default.Command('verify') @@ -6978,15 +7329,14 @@ function makeVerifyCommand() { .option('-k, --public-key ', 'path to public key that will be used to verify files, defaults to primary key') .requiredOption('-f, --signed-file ', 'file to be verified') .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); - const status = await client.getAgentStatus(); - if (status != Agent_1.agentInterface.AgentStatusType.ONLINE) { - throw Error(`agent status is: '${Agent_1.agentInterface.AgentStatusType[status].toLowerCase()}'`); - } const nodePath = utils_1.determineNodePath(options.nodePath); + const client = await utils_1.getAgentClient(nodePath); const filePath = options.signedFile; - const verified = await client.verifyFile(nodePath, filePath, options.publicKey); - if (verified) { + const request = new pb.VerifyFileMessage(); + request.setFilePath(filePath); + request.setPublicKeyPath(options.publicKey); + const res = (await utils_1.promisifyGrpc(client.verifyFile.bind(client))(request)); + if (res.getB()) { utils_1.pkLogger(`file '${filePath}' was successfully verified`, utils_1.PKMessageType.SUCCESS); } else { @@ -7001,16 +7351,15 @@ function makeEncryptCommand() { .option('-k, --public-key ', 'path to public key that will be used to encrypt files, defaults to primary key') .requiredOption('-f, --file-path ', 'file to be encrypted') .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); - const status = await client.getAgentStatus(); - if (status != Agent_1.agentInterface.AgentStatusType.ONLINE) { - throw Error(`agent status is: '${Agent_1.agentInterface.AgentStatusType[status].toLowerCase()}'`); - } const nodePath = utils_1.determineNodePath(options.nodePath); + const client = await utils_1.getAgentClient(nodePath); const filePath = options.filePath; try { - const encryptedPath = await client.encryptFile(nodePath, filePath, options.publicKey); - utils_1.pkLogger(`file successfully encrypted: '${encryptedPath}'`, utils_1.PKMessageType.SUCCESS); + const request = new pb.EncryptFileMessage(); + request.setFilePath(filePath); + request.setPublicKeyPath(options.publicKey); + const res = (await utils_1.promisifyGrpc(client.encryptFile.bind(client))(request)); + utils_1.pkLogger(`file successfully encrypted: '${res.getS()}'`, utils_1.PKMessageType.SUCCESS); } catch (err) { throw Error(`failed to encrypt '${filePath}': ${err}`); @@ -7025,16 +7374,16 @@ function makeDecryptCommand() { .option('-p, --key-passphrase ', 'passphrase to unlock the provided private key') .requiredOption('-f, --file-path ', 'file to be decrypted') .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); - const status = await client.getAgentStatus(); - if (status != Agent_1.agentInterface.AgentStatusType.ONLINE) { - throw Error(`agent status is: '${Agent_1.agentInterface.AgentStatusType[status].toLowerCase()}'`); - } const nodePath = utils_1.determineNodePath(options.nodePath); + const client = await utils_1.getAgentClient(nodePath); const filePath = options.filePath; try { - const decryptedPath = await client.decryptFile(nodePath, filePath, options.privateKey, options.keyPassphrase); - utils_1.pkLogger(`file successfully decrypted: '${decryptedPath}'`, utils_1.PKMessageType.SUCCESS); + const request = new pb.DecryptFileMessage(); + request.setFilePath(filePath); + request.setPrivateKeyPath(options.privateKey); + request.setPassphrase(options.keyPassphrase); + const res = (await utils_1.promisifyGrpc(client.decryptFile.bind(client))(request)); + utils_1.pkLogger(`file successfully decrypted: '${res.getS()}'`, utils_1.PKMessageType.SUCCESS); } catch (err) { throw Error(`failed to decrypt '${filePath}': ${err}`); @@ -7053,7 +7402,7 @@ exports.default = makeCryptoCommand; /***/ }), -/* 74 */ +/* 82 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7061,12 +7410,18 @@ exports.default = makeCryptoCommand; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; Object.defineProperty(exports, "__esModule", { value: true }); -const fs_1 = __importDefault(__webpack_require__(3)); +const fs_1 = __importDefault(__webpack_require__(5)); const commander_1 = __importDefault(__webpack_require__(2)); -const Polykey_1 = __webpack_require__(4); -const utils_1 = __webpack_require__(6); -const Agent_1 = __webpack_require__(5); +const pb = __importStar(__webpack_require__(3)); +const utils_1 = __webpack_require__(4); function makeListVaultsCommand() { return new commander_1.default.Command('list') .description('list all available vaults') @@ -7074,13 +7429,10 @@ function makeListVaultsCommand() { .option('--node-path ', 'node path') .option('-v, --verbose', 'increase verbosity level by one') .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); - const status = await client.getAgentStatus(); - if (status != Agent_1.agentInterface.AgentStatusType.ONLINE) { - throw Error(`agent status is: '${Agent_1.agentInterface.AgentStatusType[status].toLowerCase()}'`); - } const nodePath = utils_1.determineNodePath(options.nodePath); - const vaultNames = await client.listVaults(nodePath); + const client = await utils_1.getAgentClient(nodePath); + const res = (await utils_1.promisifyGrpc(client.listVaults.bind(client))(new pb.EmptyMessage())); + const vaultNames = res.getSList(); if (vaultNames === undefined || vaultNames.length == 0) { utils_1.pkLogger('no vaults found', utils_1.PKMessageType.INFO); } @@ -7100,11 +7452,14 @@ function makeScanVaultsCommand() { .arguments('name of vault to remove') .action(utils_1.actionRunner(async (options) => { var _a; - const client = Polykey_1.PolykeyAgent.connectToAgent(); const nodePath = utils_1.determineNodePath(options.nodePath); + const client = await utils_1.getAgentClient(nodePath); const verbose = (_a = options.verbose) !== null && _a !== void 0 ? _a : false; const publicKey = fs_1.default.readFileSync(options.publicKey).toString(); - const vaultNames = await client.scanVaultNames(nodePath, publicKey); + const request = new pb.StringMessage(); + request.setS(publicKey); + const res = (await utils_1.promisifyGrpc(client.scanVaultNames.bind(client))(request)); + const vaultNames = res.getSList(); if (!vaultNames || vaultNames.length == 0) { utils_1.pkLogger(`no vault names were provided`, utils_1.PKMessageType.INFO); } @@ -7119,10 +7474,12 @@ function makeNewVaultCommand() { .option('--node-path ', 'node path') .arguments('vault name(s)') .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); const nodePath = utils_1.determineNodePath(options.nodePath); + const client = await utils_1.getAgentClient(nodePath); for (const vaultName of options.args.values()) { - await client.newVault(nodePath, vaultName); + const request = new pb.StringMessage(); + request.setS(vaultName); + const res = (await utils_1.promisifyGrpc(client.newVault.bind(client))(request)); utils_1.pkLogger(`vault created at '${nodePath}/${vaultName}'`, utils_1.PKMessageType.SUCCESS); } })); @@ -7134,13 +7491,16 @@ function makePullVaultCommand() { .requiredOption('-pk, --public-key ', 'public key file path of the peer who has the vault') .requiredOption('-vn, --vault-name ', 'name of the vault to be cloned') .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); const nodePath = utils_1.determineNodePath(options.nodePath); + const client = await utils_1.getAgentClient(nodePath); const vaultName = options.vaultName; // read in public key const publicKey = fs_1.default.readFileSync(options.publicKey).toString(); - const successful = await client.pullVault(nodePath, vaultName, publicKey.toString()); - utils_1.pkLogger(`vault '${vaultName}' pulled ${successful ? 'un-' : ''}successfully`, utils_1.PKMessageType.SUCCESS); + const request = new pb.VaultPathMessage(); + request.setPublicKey(publicKey.toString()); + request.setVaultName(vaultName); + const res = (await utils_1.promisifyGrpc(client.pullVault.bind(client))(request)); + utils_1.pkLogger(`vault '${vaultName}' pulled ${res.getB() ? 'un-' : ''}successfully`, utils_1.PKMessageType.SUCCESS); })); } function makeDeleteVaultCommand() { @@ -7152,16 +7512,18 @@ function makeDeleteVaultCommand() { .arguments('name of vault to remove') .action(utils_1.actionRunner(async (options) => { var _a; - const client = Polykey_1.PolykeyAgent.connectToAgent(); const nodePath = utils_1.determineNodePath(options.nodePath); + const client = await utils_1.getAgentClient(nodePath); const verbose = (_a = options.verbose) !== null && _a !== void 0 ? _a : false; const vaultNames = options.args.values(); if (!vaultNames) { throw Error('error: did not receive any vault name'); } for (const vaultName of vaultNames) { - const successful = await client.destroyVault(nodePath, vaultName); - utils_1.pkLogger(`vault '${vaultName}' destroyed ${successful ? 'un-' : ''}successfully`, utils_1.PKMessageType.SUCCESS); + const request = new pb.StringMessage(); + request.setS(vaultName); + const res = (await utils_1.promisifyGrpc(client.deleteVault.bind(client))(request)); + utils_1.pkLogger(`vault '${vaultName}' deleted ${res.getB() ? 'un-' : ''}successfully`, utils_1.PKMessageType.SUCCESS); } })); } @@ -7178,7 +7540,7 @@ exports.default = makeVaultsCommand; /***/ }), -/* 75 */ +/* 83 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7186,12 +7548,19 @@ exports.default = makeVaultsCommand; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; Object.defineProperty(exports, "__esModule", { value: true }); -const process_1 = __importDefault(__webpack_require__(28)); +const process_1 = __importDefault(__webpack_require__(29)); const commander_1 = __importDefault(__webpack_require__(2)); const child_process_1 = __webpack_require__(30); -const Polykey_1 = __webpack_require__(4); -const utils_1 = __webpack_require__(6); +const pb = __importStar(__webpack_require__(3)); +const utils_1 = __webpack_require__(4); const pathRegex = /^([a-zA-Z0-9_ -]+)(?::)([a-zA-Z0-9_ -]+)(?:=)?([a-zA-Z_][a-zA-Z0-9_]+)?$/; function makeListSecretsCommand() { return new commander_1.default.Command('list') @@ -7202,8 +7571,8 @@ function makeListSecretsCommand() { .arguments('vault name(s) to list') .action(utils_1.actionRunner(async (options) => { var _a; - const client = Polykey_1.PolykeyAgent.connectToAgent(); const nodePath = utils_1.determineNodePath(options.nodePath); + const client = await utils_1.getAgentClient(nodePath); const isVerbose = (_a = options.verbose) !== null && _a !== void 0 ? _a : false; const vaultNames = Array.from(options.args.values()); if (!vaultNames.length) { @@ -7211,7 +7580,10 @@ function makeListSecretsCommand() { } for (const vaultName of vaultNames) { // Get list of secrets from pk - const secretNames = await client.listSecrets(nodePath, vaultName); + const request = new pb.StringMessage(); + request.setS(vaultName); + const res = (await utils_1.promisifyGrpc(client.listSecrets.bind(client))(request)); + const secretNames = res.getSList(); // List secrets if (secretNames.length == 0 && isVerbose) { utils_1.pkLogger(`no secrets found for vault '${vaultName}'`, utils_1.PKMessageType.INFO); @@ -7236,8 +7608,8 @@ function makeNewSecretCommand() { .option('--verbose', 'increase verbosity level by one') .action(utils_1.actionRunner(async (options) => { var _a; - const client = Polykey_1.PolykeyAgent.connectToAgent(); const nodePath = utils_1.determineNodePath(options.nodePath); + const client = await utils_1.getAgentClient(nodePath); const isVerbose = (_a = options.verbose) !== null && _a !== void 0 ? _a : false; const secretPath = Array.from(options.args.values()); if (secretPath.length < 1 || (secretPath.length == 1 && !pathRegex.test(secretPath[0]))) { @@ -7250,8 +7622,14 @@ function makeNewSecretCommand() { const [_, vaultName, secretName] = firstEntry.match(pathRegex); try { // Add the secret - const successful = await client.createSecret(nodePath, vaultName, secretName, options.filePath); - utils_1.pkLogger(`secret '${secretName}' was ${successful ? '' : 'un-'}successfully added to vault '${vaultName}'`, utils_1.PKMessageType.SUCCESS); + const request = new pb.SecretContentMessage(); + const secretPath = new pb.SecretPathMessage(); + secretPath.setVaultName(vaultName); + secretPath.setSecretName(secretName); + request.setSecretPath(secretPath); + request.setSecretFilePath(options.filePath); + const res = (await utils_1.promisifyGrpc(client.newSecret.bind(client))(request)); + utils_1.pkLogger(`secret '${secretName}' was ${res.getB() ? '' : 'un-'}successfully added to vault '${vaultName}'`, utils_1.PKMessageType.SUCCESS); } catch (err) { throw Error(`Error when adding secret: ${err.message}`); @@ -7267,8 +7645,8 @@ function makeUpdateSecretCommand() { .option('--verbose', 'increase verbosity level by one') .action(utils_1.actionRunner(async (options) => { var _a; - const client = Polykey_1.PolykeyAgent.connectToAgent(); const nodePath = utils_1.determineNodePath(options.nodePath); + const client = await utils_1.getAgentClient(nodePath); const isVerbose = (_a = options.verbose) !== null && _a !== void 0 ? _a : false; const secretPath = Array.from(options.args.values()); if (secretPath.length < 1 || (secretPath.length == 1 && !pathRegex.test(secretPath[0]))) { @@ -7281,8 +7659,14 @@ function makeUpdateSecretCommand() { const [_, vaultName, secretName] = firstEntry.match(pathRegex); try { // Update the secret - const successful = await client.updateSecret(nodePath, vaultName, secretName, options.filePath); - utils_1.pkLogger(`secret '${secretName}' was ${successful ? '' : 'un-'}successfully updated in vault '${vaultName}'`, successful ? utils_1.PKMessageType.SUCCESS : utils_1.PKMessageType.WARNING); + const request = new pb.SecretContentMessage(); + const secretPath = new pb.SecretPathMessage(); + secretPath.setVaultName(vaultName); + secretPath.setSecretName(secretName); + request.setSecretPath(secretPath); + request.setSecretFilePath(options.filePath); + const res = (await utils_1.promisifyGrpc(client.updateSecret.bind(client))(request)); + utils_1.pkLogger(`secret '${secretName}' was ${res.getB() ? '' : 'un-'}successfully updated in vault '${vaultName}'`, res.getB() ? utils_1.PKMessageType.SUCCESS : utils_1.PKMessageType.WARNING); } catch (err) { throw Error(`Error when updating secret: ${err.message}`); @@ -7297,8 +7681,8 @@ function makeDeleteSecretCommand() { .option('--verbose', 'increase verbosity level by one') .action(utils_1.actionRunner(async (options) => { var _a; - const client = Polykey_1.PolykeyAgent.connectToAgent(); const nodePath = utils_1.determineNodePath(options.nodePath); + const client = await utils_1.getAgentClient(nodePath); const isVerbose = (_a = options.verbose) !== null && _a !== void 0 ? _a : false; const secretPath = Array.from(options.args.values()); if (secretPath.length < 1 || (secretPath.length == 1 && !pathRegex.test(secretPath[0]))) { @@ -7311,8 +7695,11 @@ function makeDeleteSecretCommand() { const [_, vaultName, secretName] = firstEntry.match(pathRegex); try { // Remove secret - const successful = await client.destroySecret(nodePath, vaultName, secretName); - utils_1.pkLogger(`secret '${secretName}' was ${successful ? '' : 'un-'}successfully removed from vault '${vaultName}'`, utils_1.PKMessageType.SUCCESS); + const request = new pb.SecretPathMessage(); + request.setVaultName(vaultName); + request.setSecretName(secretName); + const res = (await utils_1.promisifyGrpc(client.deleteSecret.bind(client))(request)); + utils_1.pkLogger(`secret '${secretName}' was ${res.getB() ? '' : 'un-'}successfully removed from vault '${vaultName}'`, utils_1.PKMessageType.SUCCESS); } catch (err) { throw Error(`Error when removing secret: ${err.message}`); @@ -7326,8 +7713,8 @@ function makeGetSecretCommand() { .option('-e, --env', 'wrap the secret in an environment variable declaration') .action(utils_1.actionRunner(async (options) => { var _a, _b; - const client = Polykey_1.PolykeyAgent.connectToAgent(); const nodePath = utils_1.determineNodePath(options.nodePath); + const client = await utils_1.getAgentClient(nodePath); const isEnv = (_a = options.env) !== null && _a !== void 0 ? _a : false; const isVerbose = (_b = options.verbose) !== null && _b !== void 0 ? _b : false; const secretPath = Array.from(options.args.values()); @@ -7341,9 +7728,13 @@ function makeGetSecretCommand() { const [_, vaultName, secretName] = firstEntry.match(pathRegex); try { // Retrieve secret - const secret = await client.getSecret(nodePath, vaultName, secretName); + const request = new pb.SecretPathMessage(); + request.setVaultName(vaultName); + request.setSecretName(secretName); + const res = (await utils_1.promisifyGrpc(client.getSecret.bind(client))(request)); + const secret = res.getS(); if (isEnv) { - utils_1.pkLogger(`export ${secretName.toUpperCase().replace('-', '_')}='${secret.toString()}'`, utils_1.PKMessageType.none); + utils_1.pkLogger(`export ${secretName.toUpperCase().replace('-', '_')}='${secret}'`, utils_1.PKMessageType.none); } else { utils_1.pkLogger(secret.toString(), utils_1.PKMessageType.none); @@ -7364,8 +7755,8 @@ function makeSecretEnvCommand() { .action(utils_1.actionRunner(async (cmd) => { var _a, _b; const options = cmd.opts(); - const client = Polykey_1.PolykeyAgent.connectToAgent(); const nodePath = utils_1.determineNodePath(options.nodePath); + const client = await utils_1.getAgentClient(nodePath); const isVerbose = (_a = options.verbose) !== null && _a !== void 0 ? _a : false; const command = options.command; const run = options.run; @@ -7390,8 +7781,12 @@ function makeSecretEnvCommand() { try { // Get all the secrets for (const obj of parsedPathList) { - const secret = await client.getSecret(nodePath, obj.vaultName, obj.secretName); - secretEnv[obj.variableName] = secret.toString(); + const request = new pb.SecretPathMessage(); + request.setVaultName(obj.vaultName); + request.setSecretName(obj.secretName); + const res = (await utils_1.promisifyGrpc(client.getSecret.bind(client))(request)); + const secret = res.getS(); + secretEnv[obj.variableName] = secret; } } catch (err) { @@ -7442,7 +7837,7 @@ exports.default = makeSecretsCommand; /***/ }), -/* 76 */ +/* 84 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7450,10 +7845,17 @@ exports.default = makeSecretsCommand; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; Object.defineProperty(exports, "__esModule", { value: true }); const commander_1 = __importDefault(__webpack_require__(2)); -const Polykey_1 = __webpack_require__(4); -const utils_1 = __webpack_require__(6); +const pb = __importStar(__webpack_require__(3)); +const utils_1 = __webpack_require__(4); function makeNewKeyCommand() { return new commander_1.default.Command('new') .description('derive a new symmetric key') @@ -7461,10 +7863,13 @@ function makeNewKeyCommand() { .requiredOption('-n, --key-name ', 'the name of the new key') .requiredOption('-p, --key-passphrase ', 'the passphrase for the new key') .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); const nodePath = utils_1.determineNodePath(options.nodePath); + const client = await utils_1.getAgentClient(nodePath); const keyName = options.keyName; - await client.deriveKey(nodePath, keyName, options.keyPassphrase); + const request = new pb.DeriveKeyMessage(); + request.setKeyName(keyName); + request.setPassphrase(options.keyPassphrase); + const res = (await utils_1.promisifyGrpc(client.deriveKey.bind(client))(request)); utils_1.pkLogger(`'${keyName}' was added to the Key Manager`, utils_1.PKMessageType.SUCCESS); })); } @@ -7474,11 +7879,13 @@ function makeDeleteKeyCommand() { .option('--node-path ', 'node path') .requiredOption('-n, --key-name ', 'the name of the symmetric key to be deleted') .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); const nodePath = utils_1.determineNodePath(options.nodePath); + const client = await utils_1.getAgentClient(nodePath); const keyName = options.keyName; - const successful = await client.deleteKey(nodePath, keyName); - utils_1.pkLogger(`key '${keyName}' was ${successful ? '' : 'un-'}successfully deleted`, successful ? utils_1.PKMessageType.SUCCESS : utils_1.PKMessageType.INFO); + const request = new pb.StringMessage(); + request.setS(keyName); + const res = (await utils_1.promisifyGrpc(client.deleteKey.bind(client))(request)); + utils_1.pkLogger(`key '${keyName}' was ${res.getB() ? '' : 'un-'}successfully deleted`, res.getB() ? utils_1.PKMessageType.SUCCESS : utils_1.PKMessageType.INFO); })); } function makeListKeysCommand() { @@ -7487,11 +7894,17 @@ function makeListKeysCommand() { .description('list all symmetric keys in the keynode') .option('--node-path ', 'node path') .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); const nodePath = utils_1.determineNodePath(options.nodePath); - const keyNames = await client.listKeys(nodePath); - for (const name of keyNames) { - utils_1.pkLogger(name, utils_1.PKMessageType.INFO); + const client = await utils_1.getAgentClient(nodePath); + const res = (await utils_1.promisifyGrpc(client.listKeys.bind(client))(new pb.EmptyMessage())); + const keyNames = res.getSList(); + if (keyNames === undefined || keyNames.length == 0) { + utils_1.pkLogger('no keys exist', utils_1.PKMessageType.INFO); + } + else { + keyNames.forEach((keyName, index) => { + utils_1.pkLogger(`${index + 1}: ${keyName}`, utils_1.PKMessageType.INFO); + }); } })); } @@ -7499,25 +7912,30 @@ function makeGetKeyCommand() { return new commander_1.default.Command('get') .description('get the contents of a specific symmetric key') .option('--node-path ', 'node path') - .requiredOption('-n, --key-name ', 'the name of the new key') + .requiredOption('-kn, --key-name ', 'the name of the new key') .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); const nodePath = utils_1.determineNodePath(options.nodePath); - const keyContent = await client.getKey(nodePath, options.keyName); - utils_1.pkLogger(keyContent, utils_1.PKMessageType.INFO); + const client = await utils_1.getAgentClient(nodePath); + const request = new pb.StringMessage(); + request.setS(options.keyName); + const res = (await utils_1.promisifyGrpc(client.getKey.bind(client))(request)); + utils_1.pkLogger(res.getS(), utils_1.PKMessageType.INFO); })); } function makeListPrimaryKeyPairCommand() { return new commander_1.default.Command('primary') .description('get the contents of the primary keypair') .option('--node-path ', 'node path') - .option('-p, --private-key', 'include private key') - .option('-j, --output-json', 'output in JSON format') + .option('-pk, --private-key', 'include private key') + .option('-oj, --output-json', 'output in JSON format') .action(utils_1.actionRunner(async (options) => { - const client = Polykey_1.PolykeyAgent.connectToAgent(); const nodePath = utils_1.determineNodePath(options.nodePath); + const client = await utils_1.getAgentClient(nodePath); const privateKey = options.privateKey; - const keypair = await client.getPrimaryKeyPair(nodePath, privateKey); + const request = new pb.BooleanMessage(); + request.setB(privateKey); + const res = (await utils_1.promisifyGrpc(client.getPrimaryKeyPair.bind(client))(request)); + const keypair = { publicKey: res.getPublicKey(), privateKey: res.getPrivateKey() }; if (options.outputJson) { utils_1.pkLogger(JSON.stringify(keypair), utils_1.PKMessageType.INFO); } @@ -7544,7 +7962,7 @@ exports.default = makeKeyManagerCommand; /***/ }), -/* 77 */ +/* 85 */ /***/ (function(module, exports) { module.exports = require("../package.json"); diff --git a/dist/browser-client.d.ts b/dist/browser-client.d.ts deleted file mode 100644 index 61501d1eca..0000000000 --- a/dist/browser-client.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/// -import { Duplex } from 'readable-stream'; -import PeerInfo, { Address } from '../peers/PeerInfo'; -import { agentInterface } from '../../proto/js/Agent'; -declare class PolykeyClient { - private getStream; - constructor(getStream: () => Duplex); - sendRequestToAgent(request: Uint8Array): Promise; - private handleAgentCommunication; - registerNode(path: string, passphrase: string): Promise; - newNode(path: string, userId: string, passphrase: string, nbits?: number): Promise; - listNodes(unlockedOnly?: boolean): Promise; - deriveKey(nodePath: string, keyName: string, passphrase: string): Promise; - deleteKey(nodePath: string, keyName: string): Promise; - listKeys(nodePath: string): Promise; - getKey(nodePath: string, keyName: string): Promise; - getPrimaryKeyPair(nodePath: string, includePrivateKey?: boolean): Promise<{ - publicKey: string; - privateKey: string; - }>; - signFile(nodePath: string, filePath: string, privateKeyPath?: string, passphrase?: string): Promise; - verifyFile(nodePath: string, filePath: string, publicKeyPath?: string): Promise; - encryptFile(nodePath: string, filePath: string, publicKeyPath?: string): Promise; - decryptFile(nodePath: string, filePath: string, privateKeyPath?: string, passphrase?: string): Promise; - listVaults(nodePath: string): Promise; - scanVaultNames(nodePath: string, publicKey: string): Promise; - newVault(nodePath: string, vaultName: string): Promise; - pullVault(nodePath: string, vaultName: string, publicKey: string): Promise; - destroyVault(nodePath: string, vaultName: string): Promise; - listSecrets(nodePath: string, vaultName: string): Promise; - createSecret(nodePath: string, vaultName: string, secretName: string, secret: string | Buffer): Promise; - destroySecret(nodePath: string, vaultName: string, secretName: string): Promise; - getSecret(nodePath: string, vaultName: string, secretName: string): Promise; - updateSecret(nodePath: string, vaultName: string, secretName: string, secret: string | Buffer): Promise; - addPeer(nodePath: string, publicKey?: string, peerAddress?: string, relayPublicKey?: string): Promise; - getPeerInfo(nodePath: string, current?: boolean, publicKey?: string): Promise; - pingPeer(nodePath: string, publicKey: string, timeout?: number): Promise; - findPeer(nodePath: string, publicKey: string, timeout?: number): Promise; - findSocialPeer(nodePath: string, handle: string, service: string, timeout?: number): Promise; - listPeers(nodePath: string): Promise; - toggleStealth(nodePath: string, active: boolean): Promise; - updatePeer(nodePath: string, publicKey?: string, currentNode?: boolean, peerHost?: string, peerPort?: number, relayPublicKey?: string): Promise; - requestRelay(nodePath: string, publicKey: string): Promise; - requestPunch(nodePath: string, publicKey: string): Promise
; - getAgentStatus(): Promise; - stopAgent(): Promise; -} -export default PolykeyClient; diff --git a/dist/browser-client.js b/dist/browser-client.js deleted file mode 100644 index 1b4eb54d01..0000000000 --- a/dist/browser-client.js +++ /dev/null @@ -1,13538 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["browser-client"] = factory(); - else - root["browser-client"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 1); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports) { - -module.exports = require("protobufjs/minimal"); - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(Buffer) { -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const PeerInfo_1 = __importStar(__webpack_require__(7)); -const Agent_1 = __webpack_require__(11); -class PolykeyClient { - constructor(getStream) { - this.getStream = getStream; - } - async sendRequestToAgent(request) { - const stream = this.getStream(); - const responseList = await new Promise((resolve, reject) => { - try { - const responseList = []; - stream.on('data', (data) => { - if (data instanceof Uint8Array) { - responseList.push(data); - } - else { - responseList.push(...data); - } - }); - stream.on('error', (err) => { - reject(err); - }); - stream.on('end', () => { - resolve(responseList); - }); - if (!stream.writableEnded) { - stream.write(request); - } - } - catch (err) { - reject(err); - } - }); - return responseList; - } - async handleAgentCommunication(type, nodePath, request) { - // Encode message and sent - const agentMessage = Agent_1.agentInterface.AgentMessage.encodeDelimited({ - type: type, - isResponse: false, - nodePath: nodePath, - subMessage: request, - }).finish(); - const responseList = await this.sendRequestToAgent(agentMessage); - const agentMessageList = []; - for (const response of responseList.values()) { - const { subMessage, type } = Agent_1.agentInterface.AgentMessage.decodeDelimited(response); - if (type == Agent_1.agentInterface.AgentMessageType.ERROR) { - const { error } = Agent_1.agentInterface.ErrorMessage.decodeDelimited(subMessage); - const reason = new Error(`Agent Error: ${error}`); - throw reason; - } - else { - agentMessageList.push(Agent_1.agentInterface.AgentMessage.decodeDelimited(response)); - } - } - return agentMessageList; - } - async registerNode(path, passphrase) { - var _a; - const registerNodeRequest = Agent_1.agentInterface.RegisterNodeRequestMessage.encodeDelimited({ passphrase }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.REGISTER_NODE, path, registerNodeRequest); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.REGISTER_NODE)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.RegisterNodeResponseMessage.decodeDelimited(subMessage); - return successful; - } - async newNode(path, userId, passphrase, nbits) { - var _a; - const newNodeRequest = Agent_1.agentInterface.NewNodeRequestMessage.encodeDelimited({ - userId, - passphrase, - nbits, - }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.NEW_NODE, path, newNodeRequest); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.NEW_NODE)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.NewNodeResponseMessage.decodeDelimited(subMessage); - return successful; - } - async listNodes(unlockedOnly = true) { - var _a; - const newNodeRequest = Agent_1.agentInterface.ListNodesRequestMessage.encodeDelimited({ unlockedOnly }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_NODES, undefined, newNodeRequest); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_NODES)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { nodes } = Agent_1.agentInterface.ListNodesResponseMessage.decodeDelimited(subMessage); - return nodes; - } - ///////////////////// - // Key commands // - ///////////////////// - async deriveKey(nodePath, keyName, passphrase) { - var _a; - const request = Agent_1.agentInterface.DeriveKeyRequestMessage.encodeDelimited({ keyName, passphrase }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DERIVE_KEY, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DERIVE_KEY)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.DeriveKeyResponseMessage.decodeDelimited(subMessage); - return successful; - } - async deleteKey(nodePath, keyName) { - var _a; - const request = Agent_1.agentInterface.DeleteKeyRequestMessage.encodeDelimited({ keyName }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DELETE_KEY, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DELETE_KEY)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.DeleteKeyResponseMessage.decodeDelimited(subMessage); - return successful; - } - async listKeys(nodePath) { - var _a; - const request = Agent_1.agentInterface.ListKeysRequestMessage.encodeDelimited({}).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_KEYS, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_KEYS)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { keyNames } = Agent_1.agentInterface.ListKeysResponseMessage.decodeDelimited(subMessage); - return keyNames; - } - async getKey(nodePath, keyName) { - var _a; - const request = Agent_1.agentInterface.GetKeyRequestMessage.encodeDelimited({ keyName }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.GET_KEY, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.GET_KEY)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { keyContent } = Agent_1.agentInterface.GetKeyResponseMessage.decodeDelimited(subMessage); - return keyContent; - } - async getPrimaryKeyPair(nodePath, includePrivateKey = false) { - var _a; - const request = Agent_1.agentInterface.GetPrimaryKeyPairRequestMessage.encodeDelimited({ includePrivateKey }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.GET_PRIMARY_KEYPAIR, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.GET_PRIMARY_KEYPAIR)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { publicKey, privateKey } = Agent_1.agentInterface.GetPrimaryKeyPairResponseMessage.decodeDelimited(subMessage); - return { publicKey, privateKey }; - } - ///////////////////// - // Crypto commands // - ///////////////////// - async signFile(nodePath, filePath, privateKeyPath, passphrase) { - var _a; - const request = Agent_1.agentInterface.SignFileRequestMessage.encodeDelimited({ - filePath, - privateKeyPath, - passphrase, - }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.SIGN_FILE, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.SIGN_FILE)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { signaturePath } = Agent_1.agentInterface.SignFileResponseMessage.decodeDelimited(subMessage); - return signaturePath; - } - async verifyFile(nodePath, filePath, publicKeyPath) { - var _a; - const request = Agent_1.agentInterface.VerifyFileRequestMessage.encodeDelimited({ filePath, publicKeyPath }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.VERIFY_FILE, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.VERIFY_FILE)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { verified } = Agent_1.agentInterface.VerifyFileResponseMessage.decodeDelimited(subMessage); - return verified; - } - async encryptFile(nodePath, filePath, publicKeyPath) { - var _a; - const request = Agent_1.agentInterface.EncryptFileRequestMessage.encodeDelimited({ filePath, publicKeyPath }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.ENCRYPT_FILE, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.ENCRYPT_FILE)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { encryptedPath } = Agent_1.agentInterface.EncryptFileResponseMessage.decodeDelimited(subMessage); - return encryptedPath; - } - async decryptFile(nodePath, filePath, privateKeyPath, passphrase) { - var _a; - const request = Agent_1.agentInterface.DecryptFileRequestMessage.encodeDelimited({ - filePath, - privateKeyPath, - passphrase, - }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DECRYPT_FILE, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DECRYPT_FILE)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { decryptedPath } = Agent_1.agentInterface.DecryptFileResponseMessage.decodeDelimited(subMessage); - return decryptedPath; - } - ////////////////////// - // Vault Operations // - ////////////////////// - async listVaults(nodePath) { - var _a; - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_VAULTS, nodePath); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_VAULTS)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { vaultNames } = Agent_1.agentInterface.ListVaultsResponseMessage.decodeDelimited(subMessage); - return vaultNames; - } - async scanVaultNames(nodePath, publicKey) { - var _a; - const request = Agent_1.agentInterface.ScanVaultNamesRequestMessage.encodeDelimited({ publicKey }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.SCAN_VAULT_NAMES, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.SCAN_VAULT_NAMES)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { vaultNames } = Agent_1.agentInterface.ScanVaultNamesResponseMessage.decodeDelimited(subMessage); - return vaultNames; - } - async newVault(nodePath, vaultName) { - var _a; - const request = Agent_1.agentInterface.NewVaultRequestMessage.encodeDelimited({ vaultName }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.NEW_VAULT, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.NEW_VAULT)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.NewVaultResponseMessage.decodeDelimited(subMessage); - return successful; - } - async pullVault(nodePath, vaultName, publicKey) { - var _a; - const request = Agent_1.agentInterface.PullVaultRequestMessage.encodeDelimited({ vaultName, publicKey }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.PULL_VAULT, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.PULL_VAULT)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.PullVaultResponseMessage.decodeDelimited(subMessage); - return successful; - } - async destroyVault(nodePath, vaultName) { - var _a; - const request = Agent_1.agentInterface.DestroyVaultRequestMessage.encodeDelimited({ vaultName }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DESTROY_VAULT, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DESTROY_VAULT)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.DestroyVaultResponseMessage.decodeDelimited(subMessage); - return successful; - } - /////////////////////// - // Secret Operations // - /////////////////////// - async listSecrets(nodePath, vaultName) { - var _a; - const request = Agent_1.agentInterface.ListSecretsRequestMessage.encodeDelimited({ vaultName }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_SECRETS, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_SECRETS)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { secretNames } = Agent_1.agentInterface.ListSecretsResponseMessage.decodeDelimited(subMessage); - return secretNames; - } - async createSecret(nodePath, vaultName, secretName, secret) { - var _a; - let request; - if (typeof secret == 'string') { - request = Agent_1.agentInterface.CreateSecretRequestMessage.encodeDelimited({ - vaultName, - secretName, - secretPath: secret, - }).finish(); - } - else { - request = Agent_1.agentInterface.CreateSecretRequestMessage.encodeDelimited({ - vaultName, - secretName, - secretContent: secret, - }).finish(); - } - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.CREATE_SECRET, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.CREATE_SECRET)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.CreateSecretResponseMessage.decodeDelimited(subMessage); - return successful; - } - async destroySecret(nodePath, vaultName, secretName) { - var _a; - const request = Agent_1.agentInterface.DestroySecretRequestMessage.encodeDelimited({ vaultName, secretName }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DESTROY_SECRET, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DESTROY_SECRET)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.DestroySecretResponseMessage.decodeDelimited(subMessage); - return successful; - } - async getSecret(nodePath, vaultName, secretName) { - var _a; - const request = Agent_1.agentInterface.GetSecretRequestMessage.encodeDelimited({ vaultName, secretName }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.GET_SECRET, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.GET_SECRET)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { secret } = Agent_1.agentInterface.GetSecretResponseMessage.decodeDelimited(subMessage); - return Buffer.from(secret); - } - async updateSecret(nodePath, vaultName, secretName, secret) { - var _a; - let request; - if (typeof secret == 'string') { - request = Agent_1.agentInterface.UpdateSecretRequestMessage.encodeDelimited({ - vaultName, - secretName, - secretPath: secret, - }).finish(); - } - else { - request = Agent_1.agentInterface.UpdateSecretRequestMessage.encodeDelimited({ - vaultName, - secretName, - secretContent: secret, - }).finish(); - } - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.UPDATE_SECRET, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.UPDATE_SECRET)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.UpdateSecretResponseMessage.decodeDelimited(subMessage); - return successful; - } - ///////////////////// - // Peer Operations // - ///////////////////// - async addPeer(nodePath, publicKey, peerAddress, relayPublicKey) { - var _a; - const request = Agent_1.agentInterface.AddPeerRequestMessage.encodeDelimited({ - publicKey, - peerAddress, - relayPublicKey, - }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.ADD_PEER, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.ADD_PEER)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.AddPeerResponseMessage.decodeDelimited(subMessage); - return successful; - } - async getPeerInfo(nodePath, current = false, publicKey) { - var _a; - const request = Agent_1.agentInterface.PeerInfoRequestMessage.encodeDelimited({ current, publicKey }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.GET_PEER_INFO, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.GET_PEER_INFO)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { publicKey: responsePublicKey, peerAddress, relayPublicKey, } = Agent_1.agentInterface.PeerInfoResponseMessage.decodeDelimited(subMessage); - return new PeerInfo_1.default(responsePublicKey, peerAddress, relayPublicKey); - } - async pingPeer(nodePath, publicKey, timeout) { - var _a; - const request = Agent_1.agentInterface.PingPeerRequestMessage.encodeDelimited({ publicKey, timeout }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.PING_PEER, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.PING_PEER)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.PingPeerResponseMessage.decodeDelimited(subMessage); - return successful; - } - async findPeer(nodePath, publicKey, timeout) { - var _a; - const request = Agent_1.agentInterface.FindPeerRequestMessage.encodeDelimited({ publicKey, timeout }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.FIND_PEER, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.FIND_PEER)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.FindPeerResponseMessage.decodeDelimited(subMessage); - return successful; - } - async findSocialPeer(nodePath, handle, service, timeout) { - var _a; - const request = Agent_1.agentInterface.FindSocialPeerRequestMessage.encodeDelimited({ handle, service, timeout }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.FIND_SOCIAL_PEER, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.FIND_SOCIAL_PEER)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.FindSocialPeerResponseMessage.decodeDelimited(subMessage); - return successful; - } - async listPeers(nodePath) { - var _a; - const request = Agent_1.agentInterface.ListPeersRequestMessage.encodeDelimited({}).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_PEERS, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_PEERS)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { publicKeys } = Agent_1.agentInterface.ListPeersResponseMessage.decodeDelimited(subMessage); - return publicKeys; - } - async toggleStealth(nodePath, active) { - var _a; - const request = Agent_1.agentInterface.ToggleStealthRequestMessage.encodeDelimited({ active }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.TOGGLE_STEALTH, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.TOGGLE_STEALTH)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.ToggleStealthResponseMessage.decodeDelimited(subMessage); - return successful; - } - async updatePeer(nodePath, publicKey, currentNode, peerHost, peerPort, relayPublicKey) { - var _a; - const request = Agent_1.agentInterface.UpdatePeerInfoRequestMessage.encodeDelimited({ - publicKey, - currentNode, - peerHost, - peerPort, - relayPublicKey, - }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.UPDATE_PEER_INFO, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.UPDATE_PEER_INFO)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.UpdatePeerInfoResponseMessage.decodeDelimited(subMessage); - return successful; - } - async requestRelay(nodePath, publicKey) { - var _a; - const request = Agent_1.agentInterface.RequestRelayRequestMessage.encodeDelimited({ publicKey }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.REQUEST_RELAY, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.REQUEST_RELAY)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.RequestRelayResponseMessage.decodeDelimited(subMessage); - return successful; - } - async requestPunch(nodePath, publicKey) { - var _a; - const request = Agent_1.agentInterface.RequestPunchRequestMessage.encodeDelimited({ publicKey }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.REQUEST_PUNCH, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.REQUEST_PUNCH)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { address } = Agent_1.agentInterface.RequestPunchResponseMessage.decodeDelimited(subMessage); - return PeerInfo_1.Address.parse(address); - } - /////////////////// - // Agent control // - /////////////////// - async getAgentStatus() { - var _a; - try { - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.STATUS); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.STATUS)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { status } = Agent_1.agentInterface.AgentStatusResponseMessage.decodeDelimited(subMessage); - return status; - } - catch (err) { - if (err.toString().match(/ECONNRESET|ENOENT|ECONNRESET/)) { - return Agent_1.agentInterface.AgentStatusType.OFFLINE; - } - throw err; - } - } - async stopAgent() { - try { - // Tell it to start shutting and wait for response - await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.STOP_AGENT); - return true; - } - catch (err) { - return (await this.getAgentStatus()) != Agent_1.agentInterface.AgentStatusType.ONLINE; - } - } -} -exports.default = PolykeyClient; - -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(2).Buffer)) - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(global) {/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -/* eslint-disable no-proto */ - - - -var base64 = __webpack_require__(4) -var ieee754 = __webpack_require__(5) -var isArray = __webpack_require__(6) - -exports.Buffer = Buffer -exports.SlowBuffer = SlowBuffer -exports.INSPECT_MAX_BYTES = 50 - -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Use Object implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * Due to various browser bugs, sometimes the Object implementation will be used even - * when the browser supports typed arrays. - * - * Note: - * - * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, - * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. - * - * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. - * - * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of - * incorrect length in some situations. - - * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they - * get the Object implementation, which is slower but behaves correctly. - */ -Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined - ? global.TYPED_ARRAY_SUPPORT - : typedArraySupport() - -/* - * Export kMaxLength after typed array support is determined. - */ -exports.kMaxLength = kMaxLength() - -function typedArraySupport () { - try { - var arr = new Uint8Array(1) - arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }} - return arr.foo() === 42 && // typed array instances can be augmented - typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` - arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` - } catch (e) { - return false - } -} - -function kMaxLength () { - return Buffer.TYPED_ARRAY_SUPPORT - ? 0x7fffffff - : 0x3fffffff -} - -function createBuffer (that, length) { - if (kMaxLength() < length) { - throw new RangeError('Invalid typed array length') - } - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = new Uint8Array(length) - that.__proto__ = Buffer.prototype - } else { - // Fallback: Return an object instance of the Buffer class - if (that === null) { - that = new Buffer(length) - } - that.length = length - } - - return that -} - -/** - * The Buffer constructor returns instances of `Uint8Array` that have their - * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of - * `Uint8Array`, so the returned instances will have all the node `Buffer` methods - * and the `Uint8Array` methods. Square bracket notation works as expected -- it - * returns a single octet. - * - * The `Uint8Array` prototype remains unmodified. - */ - -function Buffer (arg, encodingOrOffset, length) { - if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { - return new Buffer(arg, encodingOrOffset, length) - } - - // Common case. - if (typeof arg === 'number') { - if (typeof encodingOrOffset === 'string') { - throw new Error( - 'If encoding is specified then the first argument must be a string' - ) - } - return allocUnsafe(this, arg) - } - return from(this, arg, encodingOrOffset, length) -} - -Buffer.poolSize = 8192 // not used by this implementation - -// TODO: Legacy, not needed anymore. Remove in next major version. -Buffer._augment = function (arr) { - arr.__proto__ = Buffer.prototype - return arr -} - -function from (that, value, encodingOrOffset, length) { - if (typeof value === 'number') { - throw new TypeError('"value" argument must not be a number') - } - - if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { - return fromArrayBuffer(that, value, encodingOrOffset, length) - } - - if (typeof value === 'string') { - return fromString(that, value, encodingOrOffset) - } - - return fromObject(that, value) -} - -/** - * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError - * if value is a number. - * Buffer.from(str[, encoding]) - * Buffer.from(array) - * Buffer.from(buffer) - * Buffer.from(arrayBuffer[, byteOffset[, length]]) - **/ -Buffer.from = function (value, encodingOrOffset, length) { - return from(null, value, encodingOrOffset, length) -} - -if (Buffer.TYPED_ARRAY_SUPPORT) { - Buffer.prototype.__proto__ = Uint8Array.prototype - Buffer.__proto__ = Uint8Array - if (typeof Symbol !== 'undefined' && Symbol.species && - Buffer[Symbol.species] === Buffer) { - // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 - Object.defineProperty(Buffer, Symbol.species, { - value: null, - configurable: true - }) - } -} - -function assertSize (size) { - if (typeof size !== 'number') { - throw new TypeError('"size" argument must be a number') - } else if (size < 0) { - throw new RangeError('"size" argument must not be negative') - } -} - -function alloc (that, size, fill, encoding) { - assertSize(size) - if (size <= 0) { - return createBuffer(that, size) - } - if (fill !== undefined) { - // Only pay attention to encoding if it's a string. This - // prevents accidentally sending in a number that would - // be interpretted as a start offset. - return typeof encoding === 'string' - ? createBuffer(that, size).fill(fill, encoding) - : createBuffer(that, size).fill(fill) - } - return createBuffer(that, size) -} - -/** - * Creates a new filled Buffer instance. - * alloc(size[, fill[, encoding]]) - **/ -Buffer.alloc = function (size, fill, encoding) { - return alloc(null, size, fill, encoding) -} - -function allocUnsafe (that, size) { - assertSize(size) - that = createBuffer(that, size < 0 ? 0 : checked(size) | 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) { - for (var i = 0; i < size; ++i) { - that[i] = 0 - } - } - return that -} - -/** - * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. - * */ -Buffer.allocUnsafe = function (size) { - return allocUnsafe(null, size) -} -/** - * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. - */ -Buffer.allocUnsafeSlow = function (size) { - return allocUnsafe(null, size) -} - -function fromString (that, string, encoding) { - if (typeof encoding !== 'string' || encoding === '') { - encoding = 'utf8' - } - - if (!Buffer.isEncoding(encoding)) { - throw new TypeError('"encoding" must be a valid string encoding') - } - - var length = byteLength(string, encoding) | 0 - that = createBuffer(that, length) - - var actual = that.write(string, encoding) - - if (actual !== length) { - // Writing a hex string, for example, that contains invalid characters will - // cause everything after the first invalid character to be ignored. (e.g. - // 'abxxcd' will be treated as 'ab') - that = that.slice(0, actual) - } - - return that -} - -function fromArrayLike (that, array) { - var length = array.length < 0 ? 0 : checked(array.length) | 0 - that = createBuffer(that, length) - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -function fromArrayBuffer (that, array, byteOffset, length) { - array.byteLength // this throws if `array` is not a valid ArrayBuffer - - if (byteOffset < 0 || array.byteLength < byteOffset) { - throw new RangeError('\'offset\' is out of bounds') - } - - if (array.byteLength < byteOffset + (length || 0)) { - throw new RangeError('\'length\' is out of bounds') - } - - if (byteOffset === undefined && length === undefined) { - array = new Uint8Array(array) - } else if (length === undefined) { - array = new Uint8Array(array, byteOffset) - } else { - array = new Uint8Array(array, byteOffset, length) - } - - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = array - that.__proto__ = Buffer.prototype - } else { - // Fallback: Return an object instance of the Buffer class - that = fromArrayLike(that, array) - } - return that -} - -function fromObject (that, obj) { - if (Buffer.isBuffer(obj)) { - var len = checked(obj.length) | 0 - that = createBuffer(that, len) - - if (that.length === 0) { - return that - } - - obj.copy(that, 0, 0, len) - return that - } - - if (obj) { - if ((typeof ArrayBuffer !== 'undefined' && - obj.buffer instanceof ArrayBuffer) || 'length' in obj) { - if (typeof obj.length !== 'number' || isnan(obj.length)) { - return createBuffer(that, 0) - } - return fromArrayLike(that, obj) - } - - if (obj.type === 'Buffer' && isArray(obj.data)) { - return fromArrayLike(that, obj.data) - } - } - - throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') -} - -function checked (length) { - // Note: cannot use `length < kMaxLength()` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= kMaxLength()) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + kMaxLength().toString(16) + ' bytes') - } - return length | 0 -} - -function SlowBuffer (length) { - if (+length != length) { // eslint-disable-line eqeqeq - length = 0 - } - return Buffer.alloc(+length) -} - -Buffer.isBuffer = function isBuffer (b) { - return !!(b != null && b._isBuffer) -} - -Buffer.compare = function compare (a, b) { - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - throw new TypeError('Arguments must be Buffers') - } - - if (a === b) return 0 - - var x = a.length - var y = b.length - - for (var i = 0, len = Math.min(x, y); i < len; ++i) { - if (a[i] !== b[i]) { - x = a[i] - y = b[i] - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'latin1': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } -} - -Buffer.concat = function concat (list, length) { - if (!isArray(list)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - - if (list.length === 0) { - return Buffer.alloc(0) - } - - var i - if (length === undefined) { - length = 0 - for (i = 0; i < list.length; ++i) { - length += list[i].length - } - } - - var buffer = Buffer.allocUnsafe(length) - var pos = 0 - for (i = 0; i < list.length; ++i) { - var buf = list[i] - if (!Buffer.isBuffer(buf)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - buf.copy(buffer, pos) - pos += buf.length - } - return buffer -} - -function byteLength (string, encoding) { - if (Buffer.isBuffer(string)) { - return string.length - } - if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && - (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { - return string.byteLength - } - if (typeof string !== 'string') { - string = '' + string - } - - var len = string.length - if (len === 0) return 0 - - // Use a for loop to avoid recursion - var loweredCase = false - for (;;) { - switch (encoding) { - case 'ascii': - case 'latin1': - case 'binary': - return len - case 'utf8': - case 'utf-8': - case undefined: - return utf8ToBytes(string).length - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2 - case 'hex': - return len >>> 1 - case 'base64': - return base64ToBytes(string).length - default: - if (loweredCase) return utf8ToBytes(string).length // assume utf8 - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} -Buffer.byteLength = byteLength - -function slowToString (encoding, start, end) { - var loweredCase = false - - // No need to verify that "this.length <= MAX_UINT32" since it's a read-only - // property of a typed array. - - // This behaves neither like String nor Uint8Array in that we set start/end - // to their upper/lower bounds if the value passed is out of range. - // undefined is handled specially as per ECMA-262 6th Edition, - // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. - if (start === undefined || start < 0) { - start = 0 - } - // Return early if start > this.length. Done here to prevent potential uint32 - // coercion fail below. - if (start > this.length) { - return '' - } - - if (end === undefined || end > this.length) { - end = this.length - } - - if (end <= 0) { - return '' - } - - // Force coersion to uint32. This will also coerce falsey/NaN values to 0. - end >>>= 0 - start >>>= 0 - - if (end <= start) { - return '' - } - - if (!encoding) encoding = 'utf8' - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) - - case 'ascii': - return asciiSlice(this, start, end) - - case 'latin1': - case 'binary': - return latin1Slice(this, start, end) - - case 'base64': - return base64Slice(this, start, end) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase() - loweredCase = true - } - } -} - -// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect -// Buffer instances. -Buffer.prototype._isBuffer = true - -function swap (b, n, m) { - var i = b[n] - b[n] = b[m] - b[m] = i -} - -Buffer.prototype.swap16 = function swap16 () { - var len = this.length - if (len % 2 !== 0) { - throw new RangeError('Buffer size must be a multiple of 16-bits') - } - for (var i = 0; i < len; i += 2) { - swap(this, i, i + 1) - } - return this -} - -Buffer.prototype.swap32 = function swap32 () { - var len = this.length - if (len % 4 !== 0) { - throw new RangeError('Buffer size must be a multiple of 32-bits') - } - for (var i = 0; i < len; i += 4) { - swap(this, i, i + 3) - swap(this, i + 1, i + 2) - } - return this -} - -Buffer.prototype.swap64 = function swap64 () { - var len = this.length - if (len % 8 !== 0) { - throw new RangeError('Buffer size must be a multiple of 64-bits') - } - for (var i = 0; i < len; i += 8) { - swap(this, i, i + 7) - swap(this, i + 1, i + 6) - swap(this, i + 2, i + 5) - swap(this, i + 3, i + 4) - } - return this -} - -Buffer.prototype.toString = function toString () { - var length = this.length | 0 - if (length === 0) return '' - if (arguments.length === 0) return utf8Slice(this, 0, length) - return slowToString.apply(this, arguments) -} - -Buffer.prototype.equals = function equals (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 -} - -Buffer.prototype.inspect = function inspect () { - var str = '' - var max = exports.INSPECT_MAX_BYTES - if (this.length > 0) { - str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') - if (this.length > max) str += ' ... ' - } - return '' -} - -Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { - if (!Buffer.isBuffer(target)) { - throw new TypeError('Argument must be a Buffer') - } - - if (start === undefined) { - start = 0 - } - if (end === undefined) { - end = target ? target.length : 0 - } - if (thisStart === undefined) { - thisStart = 0 - } - if (thisEnd === undefined) { - thisEnd = this.length - } - - if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { - throw new RangeError('out of range index') - } - - if (thisStart >= thisEnd && start >= end) { - return 0 - } - if (thisStart >= thisEnd) { - return -1 - } - if (start >= end) { - return 1 - } - - start >>>= 0 - end >>>= 0 - thisStart >>>= 0 - thisEnd >>>= 0 - - if (this === target) return 0 - - var x = thisEnd - thisStart - var y = end - start - var len = Math.min(x, y) - - var thisCopy = this.slice(thisStart, thisEnd) - var targetCopy = target.slice(start, end) - - for (var i = 0; i < len; ++i) { - if (thisCopy[i] !== targetCopy[i]) { - x = thisCopy[i] - y = targetCopy[i] - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, -// OR the last index of `val` in `buffer` at offset <= `byteOffset`. -// -// Arguments: -// - buffer - a Buffer to search -// - val - a string, Buffer, or number -// - byteOffset - an index into `buffer`; will be clamped to an int32 -// - encoding - an optional encoding, relevant is val is a string -// - dir - true for indexOf, false for lastIndexOf -function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { - // Empty buffer means no match - if (buffer.length === 0) return -1 - - // Normalize byteOffset - if (typeof byteOffset === 'string') { - encoding = byteOffset - byteOffset = 0 - } else if (byteOffset > 0x7fffffff) { - byteOffset = 0x7fffffff - } else if (byteOffset < -0x80000000) { - byteOffset = -0x80000000 - } - byteOffset = +byteOffset // Coerce to Number. - if (isNaN(byteOffset)) { - // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer - byteOffset = dir ? 0 : (buffer.length - 1) - } - - // Normalize byteOffset: negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = buffer.length + byteOffset - if (byteOffset >= buffer.length) { - if (dir) return -1 - else byteOffset = buffer.length - 1 - } else if (byteOffset < 0) { - if (dir) byteOffset = 0 - else return -1 - } - - // Normalize val - if (typeof val === 'string') { - val = Buffer.from(val, encoding) - } - - // Finally, search either indexOf (if dir is true) or lastIndexOf - if (Buffer.isBuffer(val)) { - // Special case: looking for empty string/buffer always fails - if (val.length === 0) { - return -1 - } - return arrayIndexOf(buffer, val, byteOffset, encoding, dir) - } else if (typeof val === 'number') { - val = val & 0xFF // Search for a byte value [0-255] - if (Buffer.TYPED_ARRAY_SUPPORT && - typeof Uint8Array.prototype.indexOf === 'function') { - if (dir) { - return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) - } else { - return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) - } - } - return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) - } - - throw new TypeError('val must be string, number or Buffer') -} - -function arrayIndexOf (arr, val, byteOffset, encoding, dir) { - var indexSize = 1 - var arrLength = arr.length - var valLength = val.length - - if (encoding !== undefined) { - encoding = String(encoding).toLowerCase() - if (encoding === 'ucs2' || encoding === 'ucs-2' || - encoding === 'utf16le' || encoding === 'utf-16le') { - if (arr.length < 2 || val.length < 2) { - return -1 - } - indexSize = 2 - arrLength /= 2 - valLength /= 2 - byteOffset /= 2 - } - } - - function read (buf, i) { - if (indexSize === 1) { - return buf[i] - } else { - return buf.readUInt16BE(i * indexSize) - } - } - - var i - if (dir) { - var foundIndex = -1 - for (i = byteOffset; i < arrLength; i++) { - if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { - if (foundIndex === -1) foundIndex = i - if (i - foundIndex + 1 === valLength) return foundIndex * indexSize - } else { - if (foundIndex !== -1) i -= i - foundIndex - foundIndex = -1 - } - } - } else { - if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength - for (i = byteOffset; i >= 0; i--) { - var found = true - for (var j = 0; j < valLength; j++) { - if (read(arr, i + j) !== read(val, j)) { - found = false - break - } - } - if (found) return i - } - } - - return -1 -} - -Buffer.prototype.includes = function includes (val, byteOffset, encoding) { - return this.indexOf(val, byteOffset, encoding) !== -1 -} - -Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, true) -} - -Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, false) -} - -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0 - var remaining = buf.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining - } - } - - // must be an even number of digits - var strLen = string.length - if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') - - if (length > strLen / 2) { - length = strLen / 2 - } - for (var i = 0; i < length; ++i) { - var parsed = parseInt(string.substr(i * 2, 2), 16) - if (isNaN(parsed)) return i - buf[offset + i] = parsed - } - return i -} - -function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) -} - -function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) -} - -function latin1Write (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) -} - -function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) -} - -function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -} - -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8' - length = this.length - offset = 0 - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset - length = this.length - offset = 0 - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset | 0 - if (isFinite(length)) { - length = length | 0 - if (encoding === undefined) encoding = 'utf8' - } else { - encoding = length - length = undefined - } - // legacy write(string, encoding, offset, length) - remove in v0.13 - } else { - throw new Error( - 'Buffer.write(string, encoding, offset[, length]) is no longer supported' - ) - } - - var remaining = this.length - offset - if (length === undefined || length > remaining) length = remaining - - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('Attempt to write outside buffer bounds') - } - - if (!encoding) encoding = 'utf8' - - var loweredCase = false - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length) - - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length) - - case 'ascii': - return asciiWrite(this, string, offset, length) - - case 'latin1': - case 'binary': - return latin1Write(this, string, offset, length) - - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} - -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } -} - -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf) - } else { - return base64.fromByteArray(buf.slice(start, end)) - } -} - -function utf8Slice (buf, start, end) { - end = Math.min(buf.length, end) - var res = [] - - var i = start - while (i < end) { - var firstByte = buf[i] - var codePoint = null - var bytesPerSequence = (firstByte > 0xEF) ? 4 - : (firstByte > 0xDF) ? 3 - : (firstByte > 0xBF) ? 2 - : 1 - - if (i + bytesPerSequence <= end) { - var secondByte, thirdByte, fourthByte, tempCodePoint - - switch (bytesPerSequence) { - case 1: - if (firstByte < 0x80) { - codePoint = firstByte - } - break - case 2: - secondByte = buf[i + 1] - if ((secondByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) - if (tempCodePoint > 0x7F) { - codePoint = tempCodePoint - } - } - break - case 3: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) - if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { - codePoint = tempCodePoint - } - } - break - case 4: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - fourthByte = buf[i + 3] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) - if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { - codePoint = tempCodePoint - } - } - } - } - - if (codePoint === null) { - // we did not generate a valid codePoint so insert a - // replacement char (U+FFFD) and advance only 1 byte - codePoint = 0xFFFD - bytesPerSequence = 1 - } else if (codePoint > 0xFFFF) { - // encode to utf16 (surrogate pair dance) - codePoint -= 0x10000 - res.push(codePoint >>> 10 & 0x3FF | 0xD800) - codePoint = 0xDC00 | codePoint & 0x3FF - } - - res.push(codePoint) - i += bytesPerSequence - } - - return decodeCodePointsArray(res) -} - -// Based on http://stackoverflow.com/a/22747272/680742, the browser with -// the lowest limit is Chrome, with 0x10000 args. -// We go 1 magnitude less, for safety -var MAX_ARGUMENTS_LENGTH = 0x1000 - -function decodeCodePointsArray (codePoints) { - var len = codePoints.length - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints) // avoid extra slice() - } - - // Decode in chunks to avoid "call stack size exceeded". - var res = '' - var i = 0 - while (i < len) { - res += String.fromCharCode.apply( - String, - codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) - ) - } - return res -} - -function asciiSlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i] & 0x7F) - } - return ret -} - -function latin1Slice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i]) - } - return ret -} - -function hexSlice (buf, start, end) { - var len = buf.length - - if (!start || start < 0) start = 0 - if (!end || end < 0 || end > len) end = len - - var out = '' - for (var i = start; i < end; ++i) { - out += toHex(buf[i]) - } - return out -} - -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end) - var res = '' - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) - } - return res -} - -Buffer.prototype.slice = function slice (start, end) { - var len = this.length - start = ~~start - end = end === undefined ? len : ~~end - - if (start < 0) { - start += len - if (start < 0) start = 0 - } else if (start > len) { - start = len - } - - if (end < 0) { - end += len - if (end < 0) end = 0 - } else if (end > len) { - end = len - } - - if (end < start) end = start - - var newBuf - if (Buffer.TYPED_ARRAY_SUPPORT) { - newBuf = this.subarray(start, end) - newBuf.__proto__ = Buffer.prototype - } else { - var sliceLen = end - start - newBuf = new Buffer(sliceLen, undefined) - for (var i = 0; i < sliceLen; ++i) { - newBuf[i] = this[i + start] - } - } - - return newBuf -} - -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} - -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - - return val -} - -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - checkOffset(offset, byteLength, this.length) - } - - var val = this[offset + --byteLength] - var mul = 1 - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul - } - - return val -} - -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - return this[offset] -} - -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return this[offset] | (this[offset + 1] << 8) -} - -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return (this[offset] << 8) | this[offset + 1] -} - -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -} - -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -} - -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var i = byteLength - var mul = 1 - var val = this[offset + --i] - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -} - -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset] | (this[offset + 1] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset + 1] | (this[offset] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -} - -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -} - -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, true, 23, 4) -} - -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, false, 23, 4) -} - -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, true, 52, 8) -} - -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, false, 52, 8) -} - -function checkInt (buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') - if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') - if (offset + ext > buf.length) throw new RangeError('Index out of range') -} - -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - var mul = 1 - var i = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - var i = byteLength - 1 - var mul = 1 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - this[offset] = (value & 0xff) - return offset + 1 -} - -function objectWriteUInt16 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { - buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> - (littleEndian ? i : 1 - i) * 8 - } -} - -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -function objectWriteUInt32 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffffffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { - buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff - } -} - -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset + 3] = (value >>> 24) - this[offset + 2] = (value >>> 16) - this[offset + 1] = (value >>> 8) - this[offset] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = 0 - var mul = 1 - var sub = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = byteLength - 1 - var mul = 1 - var sub = 0 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - if (value < 0) value = 0xff + value + 1 - this[offset] = (value & 0xff) - return offset + 1 -} - -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - this[offset + 2] = (value >>> 16) - this[offset + 3] = (value >>> 24) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (value < 0) value = 0xffffffff + value + 1 - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (offset + ext > buf.length) throw new RangeError('Index out of range') - if (offset < 0) throw new RangeError('Index out of range') -} - -function writeFloat (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) - } - ieee754.write(buf, value, offset, littleEndian, 23, 4) - return offset + 4 -} - -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -} - -function writeDouble (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) - } - ieee754.write(buf, value, offset, littleEndian, 52, 8) - return offset + 8 -} - -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -} - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, targetStart, start, end) { - if (!start) start = 0 - if (!end && end !== 0) end = this.length - if (targetStart >= target.length) targetStart = target.length - if (!targetStart) targetStart = 0 - if (end > 0 && end < start) end = start - - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 - - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') - if (end < 0) throw new RangeError('sourceEnd out of bounds') - - // Are we oob? - if (end > this.length) end = this.length - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start - } - - var len = end - start - var i - - if (this === target && start < targetStart && targetStart < end) { - // descending copy from end - for (i = len - 1; i >= 0; --i) { - target[i + targetStart] = this[i + start] - } - } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { - // ascending copy from start - for (i = 0; i < len; ++i) { - target[i + targetStart] = this[i + start] - } - } else { - Uint8Array.prototype.set.call( - target, - this.subarray(start, start + len), - targetStart - ) - } - - return len -} - -// Usage: -// buffer.fill(number[, offset[, end]]) -// buffer.fill(buffer[, offset[, end]]) -// buffer.fill(string[, offset[, end]][, encoding]) -Buffer.prototype.fill = function fill (val, start, end, encoding) { - // Handle string cases: - if (typeof val === 'string') { - if (typeof start === 'string') { - encoding = start - start = 0 - end = this.length - } else if (typeof end === 'string') { - encoding = end - end = this.length - } - if (val.length === 1) { - var code = val.charCodeAt(0) - if (code < 256) { - val = code - } - } - if (encoding !== undefined && typeof encoding !== 'string') { - throw new TypeError('encoding must be a string') - } - if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) - } - } else if (typeof val === 'number') { - val = val & 255 - } - - // Invalid ranges are not set to a default, so can range check early. - if (start < 0 || this.length < start || this.length < end) { - throw new RangeError('Out of range index') - } - - if (end <= start) { - return this - } - - start = start >>> 0 - end = end === undefined ? this.length : end >>> 0 - - if (!val) val = 0 - - var i - if (typeof val === 'number') { - for (i = start; i < end; ++i) { - this[i] = val - } - } else { - var bytes = Buffer.isBuffer(val) - ? val - : utf8ToBytes(new Buffer(val, encoding).toString()) - var len = bytes.length - for (i = 0; i < end - start; ++i) { - this[i + start] = bytes[i % len] - } - } - - return this -} - -// HELPER FUNCTIONS -// ================ - -var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g - -function base64clean (str) { - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim(str).replace(INVALID_BASE64_RE, '') - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '=' - } - return str -} - -function stringtrim (str) { - if (str.trim) return str.trim() - return str.replace(/^\s+|\s+$/g, '') -} - -function toHex (n) { - if (n < 16) return '0' + n.toString(16) - return n.toString(16) -} - -function utf8ToBytes (string, units) { - units = units || Infinity - var codePoint - var length = string.length - var leadSurrogate = null - var bytes = [] - - for (var i = 0; i < length; ++i) { - codePoint = string.charCodeAt(i) - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } - - // valid lead - leadSurrogate = codePoint - - continue - } - - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = codePoint - continue - } - - // valid surrogate pair - codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - } - - leadSurrogate = null - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint) - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else { - throw new Error('Invalid code point') - } - } - - return bytes -} - -function asciiToBytes (str) { - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF) - } - return byteArray -} - -function utf16leToBytes (str, units) { - var c, hi, lo - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - if ((units -= 2) < 0) break - - c = str.charCodeAt(i) - hi = c >> 8 - lo = c % 256 - byteArray.push(lo) - byteArray.push(hi) - } - - return byteArray -} - -function base64ToBytes (str) { - return base64.toByteArray(base64clean(str)) -} - -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; ++i) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i] - } - return i -} - -function isnan (val) { - return val !== val // eslint-disable-line no-self-compare -} - -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(3))) - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || new Function("return this")(); -} catch (e) { - // This works if the window reference is available - if (typeof window === "object") g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - -module.exports = require("base64-js"); - -/***/ }), -/* 5 */ -/***/ (function(module, exports) { - -module.exports = require("ieee754"); - -/***/ }), -/* 6 */ -/***/ (function(module, exports) { - -module.exports = require("isarray"); - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const Peer_1 = __webpack_require__(8); -const utils_1 = __webpack_require__(9); -class Address { - constructor(host, port) { - const parsedAddress = Address.parseHelper(`${host}:${port}`); - this.host = parsedAddress.host; - this.port = parsedAddress.port; - } - updateHost(host) { - if (host != undefined && host != '') { - this.host = host; - } - } - updatePort(port) { - if (port != undefined && port != 0) { - this.port = port; - } - } - /** - * Create an address object from a address string - * @param addressString Address string in the format of `${this.ip}:${this.port}` - */ - static parse(addressString) { - const { host, port } = Address.parseHelper(addressString); - return new Address(host, port); - } - /** - * Create an address object from a net.AddressInfo - * @param addressInfo AddressInfo of desired address - */ - static fromAddressInfo(addressInfo) { - const host = addressInfo.address == '::' ? 'localhost' : addressInfo.address; - return new Address(host, addressInfo.port); - } - /** - * Convert address into string of format `${this.host}:${this.port}` - */ - toString() { - return `${this.host}:${this.port}`; - } - static parseHelper(addressString) { - var _a; - if (!addressString || addressString == '') { - throw Error(`cannot parse empty or undefined string`); - } - if (!Address.AddressRegex.test(addressString)) { - throw Error(`cannot parse address string: '${addressString}'`); - } - // parse using regex - const components = (_a = addressString.match(Address.AddressRegex)) === null || _a === void 0 ? void 0 : _a.slice(1, 3); - const host = components[0]; - const port = parseInt(components[1]); - return { host, port }; - } -} -exports.Address = Address; -/** - * Parses an address string in the format of `host:port` with the help of regex - */ -Address.AddressRegex = /^([a-zA-Z.]+|(?:[0-9]{1,3}\.){3}[0-9]{1,3})(?::)([0-9]{1,5})$/; -class PeerInfo { - constructor(publicKey, connectedAddress, relayPublicKey) { - this.publicKey = PeerInfo.formatPublicKey(publicKey); - if (connectedAddress) { - const addr = Address.parse(connectedAddress); - this.peerAddress = addr; - } - if (relayPublicKey) { - this.relayPublicKey = PeerInfo.formatPublicKey(relayPublicKey); - } - } - static formatPublicKey(str) { - const startString = '-----BEGIN PGP PUBLIC KEY BLOCK-----'; - const endString = '-----END PGP PUBLIC KEY BLOCK-----'; - return str.slice(str.indexOf(startString), str.indexOf(endString) + endString.length); - } - deepCopy() { - var _a; - return new PeerInfo(this.publicKey, (_a = this.peerAddress) === null || _a === void 0 ? void 0 : _a.toString(), this.relayPublicKey); - } - toStringB64() { - var _a; - const message = Peer_1.peerInterface.PeerInfoMessage.encodeDelimited({ - publicKey: this.publicKey, - peerAddress: (_a = this.peerAddress) === null || _a === void 0 ? void 0 : _a.toString(), - relayPublicKey: this.relayPublicKey, - }).finish(); - return utils_1.protobufToString(message); - } - static parseB64(str) { - const message = utils_1.stringToProtobuf(str); - const decoded = Peer_1.peerInterface.PeerInfoMessage.decodeDelimited(message); - return new PeerInfo(decoded.publicKey, decoded.peerAddress, decoded.relayPublicKey); - } -} -exports.default = PeerInfo; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ - - -var $protobuf = __webpack_require__(0); - -// Common aliases -var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; - -// Exported root namespace -var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); - -$root.peerInterface = (function() { - - /** - * Namespace peerInterface. - * @exports peerInterface - * @namespace - */ - var peerInterface = {}; - - peerInterface.Peer = (function() { - - /** - * Constructs a new Peer service. - * @memberof peerInterface - * @classdesc Represents a Peer - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Peer(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Peer.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Peer; - - /** - * Creates new Peer service using the specified rpc implementation. - * @function create - * @memberof peerInterface.Peer - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Peer} RPC service. Useful where requests and/or responses are streamed. - */ - Peer.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link peerInterface.Peer#messagePeer}. - * @memberof peerInterface.Peer - * @typedef MessagePeerCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {peerInterface.PeerMessage} [response] PeerMessage - */ - - /** - * Calls MessagePeer. - * @function messagePeer - * @memberof peerInterface.Peer - * @instance - * @param {peerInterface.IPeerMessage} request PeerMessage message or plain object - * @param {peerInterface.Peer.MessagePeerCallback} callback Node-style callback called with the error, if any, and PeerMessage - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Peer.prototype.messagePeer = function messagePeer(request, callback) { - return this.rpcCall(messagePeer, $root.peerInterface.PeerMessage, $root.peerInterface.PeerMessage, request, callback); - }, "name", { value: "MessagePeer" }); - - /** - * Calls MessagePeer. - * @function messagePeer - * @memberof peerInterface.Peer - * @instance - * @param {peerInterface.IPeerMessage} request PeerMessage message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Peer; - })(); - - peerInterface.PeerMessage = (function() { - - /** - * Properties of a PeerMessage. - * @memberof peerInterface - * @interface IPeerMessage - * @property {string|null} [publicKey] PeerMessage publicKey - * @property {peerInterface.SubServiceType|null} [type] PeerMessage type - * @property {string|null} [subMessage] PeerMessage subMessage - */ - - /** - * Constructs a new PeerMessage. - * @memberof peerInterface - * @classdesc Represents a PeerMessage. - * @implements IPeerMessage - * @constructor - * @param {peerInterface.IPeerMessage=} [p] Properties to set - */ - function PeerMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * PeerMessage publicKey. - * @member {string} publicKey - * @memberof peerInterface.PeerMessage - * @instance - */ - PeerMessage.prototype.publicKey = ""; - - /** - * PeerMessage type. - * @member {peerInterface.SubServiceType} type - * @memberof peerInterface.PeerMessage - * @instance - */ - PeerMessage.prototype.type = 0; - - /** - * PeerMessage subMessage. - * @member {string} subMessage - * @memberof peerInterface.PeerMessage - * @instance - */ - PeerMessage.prototype.subMessage = ""; - - /** - * Creates a new PeerMessage instance using the specified properties. - * @function create - * @memberof peerInterface.PeerMessage - * @static - * @param {peerInterface.IPeerMessage=} [properties] Properties to set - * @returns {peerInterface.PeerMessage} PeerMessage instance - */ - PeerMessage.create = function create(properties) { - return new PeerMessage(properties); - }; - - /** - * Encodes the specified PeerMessage message. Does not implicitly {@link peerInterface.PeerMessage.verify|verify} messages. - * @function encode - * @memberof peerInterface.PeerMessage - * @static - * @param {peerInterface.IPeerMessage} m PeerMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PeerMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); - if (m.type != null && Object.hasOwnProperty.call(m, "type")) - w.uint32(16).int32(m.type); - if (m.subMessage != null && Object.hasOwnProperty.call(m, "subMessage")) - w.uint32(26).string(m.subMessage); - return w; - }; - - /** - * Encodes the specified PeerMessage message, length delimited. Does not implicitly {@link peerInterface.PeerMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof peerInterface.PeerMessage - * @static - * @param {peerInterface.IPeerMessage} message PeerMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PeerMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PeerMessage message from the specified reader or buffer. - * @function decode - * @memberof peerInterface.PeerMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {peerInterface.PeerMessage} PeerMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PeerMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.PeerMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.publicKey = r.string(); - break; - case 2: - m.type = r.int32(); - break; - case 3: - m.subMessage = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a PeerMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof peerInterface.PeerMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {peerInterface.PeerMessage} PeerMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PeerMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return PeerMessage; - })(); - - /** - * SubServiceType enum. - * @name peerInterface.SubServiceType - * @enum {number} - * @property {number} PING_PEER=0 PING_PEER value - * @property {number} GIT=1 GIT value - * @property {number} NAT_TRAVERSAL=2 NAT_TRAVERSAL value - */ - peerInterface.SubServiceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PING_PEER"] = 0; - values[valuesById[1] = "GIT"] = 1; - values[valuesById[2] = "NAT_TRAVERSAL"] = 2; - return values; - })(); - - peerInterface.PingPeerMessage = (function() { - - /** - * Properties of a PingPeerMessage. - * @memberof peerInterface - * @interface IPingPeerMessage - * @property {string|null} [publicKey] PingPeerMessage publicKey - * @property {string|null} [challenge] PingPeerMessage challenge - * @property {peerInterface.IPeerInfoMessage|null} [peerInfo] PingPeerMessage peerInfo - */ - - /** - * Constructs a new PingPeerMessage. - * @memberof peerInterface - * @classdesc Represents a PingPeerMessage. - * @implements IPingPeerMessage - * @constructor - * @param {peerInterface.IPingPeerMessage=} [p] Properties to set - */ - function PingPeerMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * PingPeerMessage publicKey. - * @member {string} publicKey - * @memberof peerInterface.PingPeerMessage - * @instance - */ - PingPeerMessage.prototype.publicKey = ""; - - /** - * PingPeerMessage challenge. - * @member {string} challenge - * @memberof peerInterface.PingPeerMessage - * @instance - */ - PingPeerMessage.prototype.challenge = ""; - - /** - * PingPeerMessage peerInfo. - * @member {peerInterface.IPeerInfoMessage|null|undefined} peerInfo - * @memberof peerInterface.PingPeerMessage - * @instance - */ - PingPeerMessage.prototype.peerInfo = null; - - /** - * Creates a new PingPeerMessage instance using the specified properties. - * @function create - * @memberof peerInterface.PingPeerMessage - * @static - * @param {peerInterface.IPingPeerMessage=} [properties] Properties to set - * @returns {peerInterface.PingPeerMessage} PingPeerMessage instance - */ - PingPeerMessage.create = function create(properties) { - return new PingPeerMessage(properties); - }; - - /** - * Encodes the specified PingPeerMessage message. Does not implicitly {@link peerInterface.PingPeerMessage.verify|verify} messages. - * @function encode - * @memberof peerInterface.PingPeerMessage - * @static - * @param {peerInterface.IPingPeerMessage} m PingPeerMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PingPeerMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); - if (m.challenge != null && Object.hasOwnProperty.call(m, "challenge")) - w.uint32(18).string(m.challenge); - if (m.peerInfo != null && Object.hasOwnProperty.call(m, "peerInfo")) - $root.peerInterface.PeerInfoMessage.encode(m.peerInfo, w.uint32(26).fork()).ldelim(); - return w; - }; - - /** - * Encodes the specified PingPeerMessage message, length delimited. Does not implicitly {@link peerInterface.PingPeerMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof peerInterface.PingPeerMessage - * @static - * @param {peerInterface.IPingPeerMessage} message PingPeerMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PingPeerMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PingPeerMessage message from the specified reader or buffer. - * @function decode - * @memberof peerInterface.PingPeerMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {peerInterface.PingPeerMessage} PingPeerMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PingPeerMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.PingPeerMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.publicKey = r.string(); - break; - case 2: - m.challenge = r.string(); - break; - case 3: - m.peerInfo = $root.peerInterface.PeerInfoMessage.decode(r, r.uint32()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a PingPeerMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof peerInterface.PingPeerMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {peerInterface.PingPeerMessage} PingPeerMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PingPeerMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return PingPeerMessage; - })(); - - peerInterface.PeerInfoMessage = (function() { - - /** - * Properties of a PeerInfoMessage. - * @memberof peerInterface - * @interface IPeerInfoMessage - * @property {string|null} [publicKey] PeerInfoMessage publicKey - * @property {string|null} [peerAddress] PeerInfoMessage peerAddress - * @property {string|null} [relayPublicKey] PeerInfoMessage relayPublicKey - */ - - /** - * Constructs a new PeerInfoMessage. - * @memberof peerInterface - * @classdesc Represents a PeerInfoMessage. - * @implements IPeerInfoMessage - * @constructor - * @param {peerInterface.IPeerInfoMessage=} [p] Properties to set - */ - function PeerInfoMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * PeerInfoMessage publicKey. - * @member {string} publicKey - * @memberof peerInterface.PeerInfoMessage - * @instance - */ - PeerInfoMessage.prototype.publicKey = ""; - - /** - * PeerInfoMessage peerAddress. - * @member {string} peerAddress - * @memberof peerInterface.PeerInfoMessage - * @instance - */ - PeerInfoMessage.prototype.peerAddress = ""; - - /** - * PeerInfoMessage relayPublicKey. - * @member {string} relayPublicKey - * @memberof peerInterface.PeerInfoMessage - * @instance - */ - PeerInfoMessage.prototype.relayPublicKey = ""; - - /** - * Creates a new PeerInfoMessage instance using the specified properties. - * @function create - * @memberof peerInterface.PeerInfoMessage - * @static - * @param {peerInterface.IPeerInfoMessage=} [properties] Properties to set - * @returns {peerInterface.PeerInfoMessage} PeerInfoMessage instance - */ - PeerInfoMessage.create = function create(properties) { - return new PeerInfoMessage(properties); - }; - - /** - * Encodes the specified PeerInfoMessage message. Does not implicitly {@link peerInterface.PeerInfoMessage.verify|verify} messages. - * @function encode - * @memberof peerInterface.PeerInfoMessage - * @static - * @param {peerInterface.IPeerInfoMessage} m PeerInfoMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PeerInfoMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); - if (m.peerAddress != null && Object.hasOwnProperty.call(m, "peerAddress")) - w.uint32(18).string(m.peerAddress); - if (m.relayPublicKey != null && Object.hasOwnProperty.call(m, "relayPublicKey")) - w.uint32(26).string(m.relayPublicKey); - return w; - }; - - /** - * Encodes the specified PeerInfoMessage message, length delimited. Does not implicitly {@link peerInterface.PeerInfoMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof peerInterface.PeerInfoMessage - * @static - * @param {peerInterface.IPeerInfoMessage} message PeerInfoMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PeerInfoMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PeerInfoMessage message from the specified reader or buffer. - * @function decode - * @memberof peerInterface.PeerInfoMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {peerInterface.PeerInfoMessage} PeerInfoMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PeerInfoMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.PeerInfoMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.publicKey = r.string(); - break; - case 2: - m.peerAddress = r.string(); - break; - case 3: - m.relayPublicKey = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a PeerInfoMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof peerInterface.PeerInfoMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {peerInterface.PeerInfoMessage} PeerInfoMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PeerInfoMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return PeerInfoMessage; - })(); - - peerInterface.PeerInfoListMessage = (function() { - - /** - * Properties of a PeerInfoListMessage. - * @memberof peerInterface - * @interface IPeerInfoListMessage - * @property {Array.|null} [peerInfoList] PeerInfoListMessage peerInfoList - */ - - /** - * Constructs a new PeerInfoListMessage. - * @memberof peerInterface - * @classdesc Represents a PeerInfoListMessage. - * @implements IPeerInfoListMessage - * @constructor - * @param {peerInterface.IPeerInfoListMessage=} [p] Properties to set - */ - function PeerInfoListMessage(p) { - this.peerInfoList = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * PeerInfoListMessage peerInfoList. - * @member {Array.} peerInfoList - * @memberof peerInterface.PeerInfoListMessage - * @instance - */ - PeerInfoListMessage.prototype.peerInfoList = $util.emptyArray; - - /** - * Creates a new PeerInfoListMessage instance using the specified properties. - * @function create - * @memberof peerInterface.PeerInfoListMessage - * @static - * @param {peerInterface.IPeerInfoListMessage=} [properties] Properties to set - * @returns {peerInterface.PeerInfoListMessage} PeerInfoListMessage instance - */ - PeerInfoListMessage.create = function create(properties) { - return new PeerInfoListMessage(properties); - }; - - /** - * Encodes the specified PeerInfoListMessage message. Does not implicitly {@link peerInterface.PeerInfoListMessage.verify|verify} messages. - * @function encode - * @memberof peerInterface.PeerInfoListMessage - * @static - * @param {peerInterface.IPeerInfoListMessage} m PeerInfoListMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PeerInfoListMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.peerInfoList != null && m.peerInfoList.length) { - for (var i = 0; i < m.peerInfoList.length; ++i) - $root.peerInterface.PeerInfoMessage.encode(m.peerInfoList[i], w.uint32(10).fork()).ldelim(); - } - return w; - }; - - /** - * Encodes the specified PeerInfoListMessage message, length delimited. Does not implicitly {@link peerInterface.PeerInfoListMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof peerInterface.PeerInfoListMessage - * @static - * @param {peerInterface.IPeerInfoListMessage} message PeerInfoListMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PeerInfoListMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PeerInfoListMessage message from the specified reader or buffer. - * @function decode - * @memberof peerInterface.PeerInfoListMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {peerInterface.PeerInfoListMessage} PeerInfoListMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PeerInfoListMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.PeerInfoListMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.peerInfoList && m.peerInfoList.length)) - m.peerInfoList = []; - m.peerInfoList.push($root.peerInterface.PeerInfoMessage.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a PeerInfoListMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof peerInterface.PeerInfoListMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {peerInterface.PeerInfoListMessage} PeerInfoListMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PeerInfoListMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return PeerInfoListMessage; - })(); - - peerInterface.ErrorMessage = (function() { - - /** - * Properties of an ErrorMessage. - * @memberof peerInterface - * @interface IErrorMessage - * @property {string|null} [error] ErrorMessage error - */ - - /** - * Constructs a new ErrorMessage. - * @memberof peerInterface - * @classdesc Represents an ErrorMessage. - * @implements IErrorMessage - * @constructor - * @param {peerInterface.IErrorMessage=} [p] Properties to set - */ - function ErrorMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * ErrorMessage error. - * @member {string} error - * @memberof peerInterface.ErrorMessage - * @instance - */ - ErrorMessage.prototype.error = ""; - - /** - * Creates a new ErrorMessage instance using the specified properties. - * @function create - * @memberof peerInterface.ErrorMessage - * @static - * @param {peerInterface.IErrorMessage=} [properties] Properties to set - * @returns {peerInterface.ErrorMessage} ErrorMessage instance - */ - ErrorMessage.create = function create(properties) { - return new ErrorMessage(properties); - }; - - /** - * Encodes the specified ErrorMessage message. Does not implicitly {@link peerInterface.ErrorMessage.verify|verify} messages. - * @function encode - * @memberof peerInterface.ErrorMessage - * @static - * @param {peerInterface.IErrorMessage} m ErrorMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ErrorMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.error != null && Object.hasOwnProperty.call(m, "error")) - w.uint32(10).string(m.error); - return w; - }; - - /** - * Encodes the specified ErrorMessage message, length delimited. Does not implicitly {@link peerInterface.ErrorMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof peerInterface.ErrorMessage - * @static - * @param {peerInterface.IErrorMessage} message ErrorMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ErrorMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ErrorMessage message from the specified reader or buffer. - * @function decode - * @memberof peerInterface.ErrorMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {peerInterface.ErrorMessage} ErrorMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ErrorMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.ErrorMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.error = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes an ErrorMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof peerInterface.ErrorMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {peerInterface.ErrorMessage} ErrorMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ErrorMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ErrorMessage; - })(); - - /** - * NatMessageType enum. - * @name peerInterface.NatMessageType - * @enum {number} - * @property {number} ERROR=0 ERROR value - * @property {number} RELAY_CONNECTION=1 RELAY_CONNECTION value - * @property {number} PEER_CONNECTION=2 PEER_CONNECTION value - * @property {number} UDP_ADDRESS=3 UDP_ADDRESS value - * @property {number} PEER_UDP_ADDRESS=4 PEER_UDP_ADDRESS value - */ - peerInterface.NatMessageType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ERROR"] = 0; - values[valuesById[1] = "RELAY_CONNECTION"] = 1; - values[valuesById[2] = "PEER_CONNECTION"] = 2; - values[valuesById[3] = "UDP_ADDRESS"] = 3; - values[valuesById[4] = "PEER_UDP_ADDRESS"] = 4; - return values; - })(); - - peerInterface.NatMessage = (function() { - - /** - * Properties of a NatMessage. - * @memberof peerInterface - * @interface INatMessage - * @property {peerInterface.NatMessageType|null} [type] NatMessage type - * @property {boolean|null} [isResponse] NatMessage isResponse - * @property {Uint8Array|null} [subMessage] NatMessage subMessage - */ - - /** - * Constructs a new NatMessage. - * @memberof peerInterface - * @classdesc Represents a NatMessage. - * @implements INatMessage - * @constructor - * @param {peerInterface.INatMessage=} [p] Properties to set - */ - function NatMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * NatMessage type. - * @member {peerInterface.NatMessageType} type - * @memberof peerInterface.NatMessage - * @instance - */ - NatMessage.prototype.type = 0; - - /** - * NatMessage isResponse. - * @member {boolean} isResponse - * @memberof peerInterface.NatMessage - * @instance - */ - NatMessage.prototype.isResponse = false; - - /** - * NatMessage subMessage. - * @member {Uint8Array} subMessage - * @memberof peerInterface.NatMessage - * @instance - */ - NatMessage.prototype.subMessage = $util.newBuffer([]); - - /** - * Creates a new NatMessage instance using the specified properties. - * @function create - * @memberof peerInterface.NatMessage - * @static - * @param {peerInterface.INatMessage=} [properties] Properties to set - * @returns {peerInterface.NatMessage} NatMessage instance - */ - NatMessage.create = function create(properties) { - return new NatMessage(properties); - }; - - /** - * Encodes the specified NatMessage message. Does not implicitly {@link peerInterface.NatMessage.verify|verify} messages. - * @function encode - * @memberof peerInterface.NatMessage - * @static - * @param {peerInterface.INatMessage} m NatMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NatMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.type != null && Object.hasOwnProperty.call(m, "type")) - w.uint32(8).int32(m.type); - if (m.isResponse != null && Object.hasOwnProperty.call(m, "isResponse")) - w.uint32(16).bool(m.isResponse); - if (m.subMessage != null && Object.hasOwnProperty.call(m, "subMessage")) - w.uint32(26).bytes(m.subMessage); - return w; - }; - - /** - * Encodes the specified NatMessage message, length delimited. Does not implicitly {@link peerInterface.NatMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof peerInterface.NatMessage - * @static - * @param {peerInterface.INatMessage} message NatMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NatMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NatMessage message from the specified reader or buffer. - * @function decode - * @memberof peerInterface.NatMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {peerInterface.NatMessage} NatMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NatMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.NatMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.type = r.int32(); - break; - case 2: - m.isResponse = r.bool(); - break; - case 3: - m.subMessage = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a NatMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof peerInterface.NatMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {peerInterface.NatMessage} NatMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NatMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return NatMessage; - })(); - - peerInterface.RelayConnectionRequest = (function() { - - /** - * Properties of a RelayConnectionRequest. - * @memberof peerInterface - * @interface IRelayConnectionRequest - * @property {string|null} [publicKey] RelayConnectionRequest publicKey - */ - - /** - * Constructs a new RelayConnectionRequest. - * @memberof peerInterface - * @classdesc Represents a RelayConnectionRequest. - * @implements IRelayConnectionRequest - * @constructor - * @param {peerInterface.IRelayConnectionRequest=} [p] Properties to set - */ - function RelayConnectionRequest(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * RelayConnectionRequest publicKey. - * @member {string} publicKey - * @memberof peerInterface.RelayConnectionRequest - * @instance - */ - RelayConnectionRequest.prototype.publicKey = ""; - - /** - * Creates a new RelayConnectionRequest instance using the specified properties. - * @function create - * @memberof peerInterface.RelayConnectionRequest - * @static - * @param {peerInterface.IRelayConnectionRequest=} [properties] Properties to set - * @returns {peerInterface.RelayConnectionRequest} RelayConnectionRequest instance - */ - RelayConnectionRequest.create = function create(properties) { - return new RelayConnectionRequest(properties); - }; - - /** - * Encodes the specified RelayConnectionRequest message. Does not implicitly {@link peerInterface.RelayConnectionRequest.verify|verify} messages. - * @function encode - * @memberof peerInterface.RelayConnectionRequest - * @static - * @param {peerInterface.IRelayConnectionRequest} m RelayConnectionRequest message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RelayConnectionRequest.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); - return w; - }; - - /** - * Encodes the specified RelayConnectionRequest message, length delimited. Does not implicitly {@link peerInterface.RelayConnectionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof peerInterface.RelayConnectionRequest - * @static - * @param {peerInterface.IRelayConnectionRequest} message RelayConnectionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RelayConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RelayConnectionRequest message from the specified reader or buffer. - * @function decode - * @memberof peerInterface.RelayConnectionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {peerInterface.RelayConnectionRequest} RelayConnectionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RelayConnectionRequest.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.RelayConnectionRequest(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.publicKey = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a RelayConnectionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof peerInterface.RelayConnectionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {peerInterface.RelayConnectionRequest} RelayConnectionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RelayConnectionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return RelayConnectionRequest; - })(); - - peerInterface.RelayConnectionResponse = (function() { - - /** - * Properties of a RelayConnectionResponse. - * @memberof peerInterface - * @interface IRelayConnectionResponse - * @property {string|null} [serverAddress] RelayConnectionResponse serverAddress - */ - - /** - * Constructs a new RelayConnectionResponse. - * @memberof peerInterface - * @classdesc Represents a RelayConnectionResponse. - * @implements IRelayConnectionResponse - * @constructor - * @param {peerInterface.IRelayConnectionResponse=} [p] Properties to set - */ - function RelayConnectionResponse(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * RelayConnectionResponse serverAddress. - * @member {string} serverAddress - * @memberof peerInterface.RelayConnectionResponse - * @instance - */ - RelayConnectionResponse.prototype.serverAddress = ""; - - /** - * Creates a new RelayConnectionResponse instance using the specified properties. - * @function create - * @memberof peerInterface.RelayConnectionResponse - * @static - * @param {peerInterface.IRelayConnectionResponse=} [properties] Properties to set - * @returns {peerInterface.RelayConnectionResponse} RelayConnectionResponse instance - */ - RelayConnectionResponse.create = function create(properties) { - return new RelayConnectionResponse(properties); - }; - - /** - * Encodes the specified RelayConnectionResponse message. Does not implicitly {@link peerInterface.RelayConnectionResponse.verify|verify} messages. - * @function encode - * @memberof peerInterface.RelayConnectionResponse - * @static - * @param {peerInterface.IRelayConnectionResponse} m RelayConnectionResponse message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RelayConnectionResponse.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.serverAddress != null && Object.hasOwnProperty.call(m, "serverAddress")) - w.uint32(10).string(m.serverAddress); - return w; - }; - - /** - * Encodes the specified RelayConnectionResponse message, length delimited. Does not implicitly {@link peerInterface.RelayConnectionResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof peerInterface.RelayConnectionResponse - * @static - * @param {peerInterface.IRelayConnectionResponse} message RelayConnectionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RelayConnectionResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RelayConnectionResponse message from the specified reader or buffer. - * @function decode - * @memberof peerInterface.RelayConnectionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {peerInterface.RelayConnectionResponse} RelayConnectionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RelayConnectionResponse.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.RelayConnectionResponse(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.serverAddress = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a RelayConnectionResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof peerInterface.RelayConnectionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {peerInterface.RelayConnectionResponse} RelayConnectionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RelayConnectionResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return RelayConnectionResponse; - })(); - - peerInterface.PeerConnectionRequest = (function() { - - /** - * Properties of a PeerConnectionRequest. - * @memberof peerInterface - * @interface IPeerConnectionRequest - * @property {string|null} [publicKey] PeerConnectionRequest publicKey - */ - - /** - * Constructs a new PeerConnectionRequest. - * @memberof peerInterface - * @classdesc Represents a PeerConnectionRequest. - * @implements IPeerConnectionRequest - * @constructor - * @param {peerInterface.IPeerConnectionRequest=} [p] Properties to set - */ - function PeerConnectionRequest(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * PeerConnectionRequest publicKey. - * @member {string} publicKey - * @memberof peerInterface.PeerConnectionRequest - * @instance - */ - PeerConnectionRequest.prototype.publicKey = ""; - - /** - * Creates a new PeerConnectionRequest instance using the specified properties. - * @function create - * @memberof peerInterface.PeerConnectionRequest - * @static - * @param {peerInterface.IPeerConnectionRequest=} [properties] Properties to set - * @returns {peerInterface.PeerConnectionRequest} PeerConnectionRequest instance - */ - PeerConnectionRequest.create = function create(properties) { - return new PeerConnectionRequest(properties); - }; - - /** - * Encodes the specified PeerConnectionRequest message. Does not implicitly {@link peerInterface.PeerConnectionRequest.verify|verify} messages. - * @function encode - * @memberof peerInterface.PeerConnectionRequest - * @static - * @param {peerInterface.IPeerConnectionRequest} m PeerConnectionRequest message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PeerConnectionRequest.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); - return w; - }; - - /** - * Encodes the specified PeerConnectionRequest message, length delimited. Does not implicitly {@link peerInterface.PeerConnectionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof peerInterface.PeerConnectionRequest - * @static - * @param {peerInterface.IPeerConnectionRequest} message PeerConnectionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PeerConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PeerConnectionRequest message from the specified reader or buffer. - * @function decode - * @memberof peerInterface.PeerConnectionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {peerInterface.PeerConnectionRequest} PeerConnectionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PeerConnectionRequest.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.PeerConnectionRequest(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.publicKey = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a PeerConnectionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof peerInterface.PeerConnectionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {peerInterface.PeerConnectionRequest} PeerConnectionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PeerConnectionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return PeerConnectionRequest; - })(); - - peerInterface.PeerConnectionResponse = (function() { - - /** - * Properties of a PeerConnectionResponse. - * @memberof peerInterface - * @interface IPeerConnectionResponse - * @property {string|null} [peerAddress] PeerConnectionResponse peerAddress - */ - - /** - * Constructs a new PeerConnectionResponse. - * @memberof peerInterface - * @classdesc Represents a PeerConnectionResponse. - * @implements IPeerConnectionResponse - * @constructor - * @param {peerInterface.IPeerConnectionResponse=} [p] Properties to set - */ - function PeerConnectionResponse(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * PeerConnectionResponse peerAddress. - * @member {string} peerAddress - * @memberof peerInterface.PeerConnectionResponse - * @instance - */ - PeerConnectionResponse.prototype.peerAddress = ""; - - /** - * Creates a new PeerConnectionResponse instance using the specified properties. - * @function create - * @memberof peerInterface.PeerConnectionResponse - * @static - * @param {peerInterface.IPeerConnectionResponse=} [properties] Properties to set - * @returns {peerInterface.PeerConnectionResponse} PeerConnectionResponse instance - */ - PeerConnectionResponse.create = function create(properties) { - return new PeerConnectionResponse(properties); - }; - - /** - * Encodes the specified PeerConnectionResponse message. Does not implicitly {@link peerInterface.PeerConnectionResponse.verify|verify} messages. - * @function encode - * @memberof peerInterface.PeerConnectionResponse - * @static - * @param {peerInterface.IPeerConnectionResponse} m PeerConnectionResponse message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PeerConnectionResponse.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.peerAddress != null && Object.hasOwnProperty.call(m, "peerAddress")) - w.uint32(10).string(m.peerAddress); - return w; - }; - - /** - * Encodes the specified PeerConnectionResponse message, length delimited. Does not implicitly {@link peerInterface.PeerConnectionResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof peerInterface.PeerConnectionResponse - * @static - * @param {peerInterface.IPeerConnectionResponse} message PeerConnectionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PeerConnectionResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PeerConnectionResponse message from the specified reader or buffer. - * @function decode - * @memberof peerInterface.PeerConnectionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {peerInterface.PeerConnectionResponse} PeerConnectionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PeerConnectionResponse.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.PeerConnectionResponse(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.peerAddress = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a PeerConnectionResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof peerInterface.PeerConnectionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {peerInterface.PeerConnectionResponse} PeerConnectionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PeerConnectionResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return PeerConnectionResponse; - })(); - - peerInterface.UDPAddressResponse = (function() { - - /** - * Properties of a UDPAddressResponse. - * @memberof peerInterface - * @interface IUDPAddressResponse - * @property {string|null} [address] UDPAddressResponse address - */ - - /** - * Constructs a new UDPAddressResponse. - * @memberof peerInterface - * @classdesc Represents a UDPAddressResponse. - * @implements IUDPAddressResponse - * @constructor - * @param {peerInterface.IUDPAddressResponse=} [p] Properties to set - */ - function UDPAddressResponse(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * UDPAddressResponse address. - * @member {string} address - * @memberof peerInterface.UDPAddressResponse - * @instance - */ - UDPAddressResponse.prototype.address = ""; - - /** - * Creates a new UDPAddressResponse instance using the specified properties. - * @function create - * @memberof peerInterface.UDPAddressResponse - * @static - * @param {peerInterface.IUDPAddressResponse=} [properties] Properties to set - * @returns {peerInterface.UDPAddressResponse} UDPAddressResponse instance - */ - UDPAddressResponse.create = function create(properties) { - return new UDPAddressResponse(properties); - }; - - /** - * Encodes the specified UDPAddressResponse message. Does not implicitly {@link peerInterface.UDPAddressResponse.verify|verify} messages. - * @function encode - * @memberof peerInterface.UDPAddressResponse - * @static - * @param {peerInterface.IUDPAddressResponse} m UDPAddressResponse message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UDPAddressResponse.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.address != null && Object.hasOwnProperty.call(m, "address")) - w.uint32(10).string(m.address); - return w; - }; - - /** - * Encodes the specified UDPAddressResponse message, length delimited. Does not implicitly {@link peerInterface.UDPAddressResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof peerInterface.UDPAddressResponse - * @static - * @param {peerInterface.IUDPAddressResponse} message UDPAddressResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UDPAddressResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UDPAddressResponse message from the specified reader or buffer. - * @function decode - * @memberof peerInterface.UDPAddressResponse - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {peerInterface.UDPAddressResponse} UDPAddressResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UDPAddressResponse.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.UDPAddressResponse(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.address = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a UDPAddressResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof peerInterface.UDPAddressResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {peerInterface.UDPAddressResponse} UDPAddressResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UDPAddressResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return UDPAddressResponse; - })(); - - peerInterface.HolePunchRegisterRequest = (function() { - - /** - * Properties of a HolePunchRegisterRequest. - * @memberof peerInterface - * @interface IHolePunchRegisterRequest - * @property {string|null} [publicKey] HolePunchRegisterRequest publicKey - */ - - /** - * Constructs a new HolePunchRegisterRequest. - * @memberof peerInterface - * @classdesc Represents a HolePunchRegisterRequest. - * @implements IHolePunchRegisterRequest - * @constructor - * @param {peerInterface.IHolePunchRegisterRequest=} [p] Properties to set - */ - function HolePunchRegisterRequest(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * HolePunchRegisterRequest publicKey. - * @member {string} publicKey - * @memberof peerInterface.HolePunchRegisterRequest - * @instance - */ - HolePunchRegisterRequest.prototype.publicKey = ""; - - /** - * Creates a new HolePunchRegisterRequest instance using the specified properties. - * @function create - * @memberof peerInterface.HolePunchRegisterRequest - * @static - * @param {peerInterface.IHolePunchRegisterRequest=} [properties] Properties to set - * @returns {peerInterface.HolePunchRegisterRequest} HolePunchRegisterRequest instance - */ - HolePunchRegisterRequest.create = function create(properties) { - return new HolePunchRegisterRequest(properties); - }; - - /** - * Encodes the specified HolePunchRegisterRequest message. Does not implicitly {@link peerInterface.HolePunchRegisterRequest.verify|verify} messages. - * @function encode - * @memberof peerInterface.HolePunchRegisterRequest - * @static - * @param {peerInterface.IHolePunchRegisterRequest} m HolePunchRegisterRequest message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HolePunchRegisterRequest.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); - return w; - }; - - /** - * Encodes the specified HolePunchRegisterRequest message, length delimited. Does not implicitly {@link peerInterface.HolePunchRegisterRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof peerInterface.HolePunchRegisterRequest - * @static - * @param {peerInterface.IHolePunchRegisterRequest} message HolePunchRegisterRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HolePunchRegisterRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HolePunchRegisterRequest message from the specified reader or buffer. - * @function decode - * @memberof peerInterface.HolePunchRegisterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {peerInterface.HolePunchRegisterRequest} HolePunchRegisterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HolePunchRegisterRequest.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.HolePunchRegisterRequest(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.publicKey = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a HolePunchRegisterRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof peerInterface.HolePunchRegisterRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {peerInterface.HolePunchRegisterRequest} HolePunchRegisterRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HolePunchRegisterRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return HolePunchRegisterRequest; - })(); - - peerInterface.HolePunchRegisterResponse = (function() { - - /** - * Properties of a HolePunchRegisterResponse. - * @memberof peerInterface - * @interface IHolePunchRegisterResponse - * @property {string|null} [connectedAddress] HolePunchRegisterResponse connectedAddress - */ - - /** - * Constructs a new HolePunchRegisterResponse. - * @memberof peerInterface - * @classdesc Represents a HolePunchRegisterResponse. - * @implements IHolePunchRegisterResponse - * @constructor - * @param {peerInterface.IHolePunchRegisterResponse=} [p] Properties to set - */ - function HolePunchRegisterResponse(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * HolePunchRegisterResponse connectedAddress. - * @member {string} connectedAddress - * @memberof peerInterface.HolePunchRegisterResponse - * @instance - */ - HolePunchRegisterResponse.prototype.connectedAddress = ""; - - /** - * Creates a new HolePunchRegisterResponse instance using the specified properties. - * @function create - * @memberof peerInterface.HolePunchRegisterResponse - * @static - * @param {peerInterface.IHolePunchRegisterResponse=} [properties] Properties to set - * @returns {peerInterface.HolePunchRegisterResponse} HolePunchRegisterResponse instance - */ - HolePunchRegisterResponse.create = function create(properties) { - return new HolePunchRegisterResponse(properties); - }; - - /** - * Encodes the specified HolePunchRegisterResponse message. Does not implicitly {@link peerInterface.HolePunchRegisterResponse.verify|verify} messages. - * @function encode - * @memberof peerInterface.HolePunchRegisterResponse - * @static - * @param {peerInterface.IHolePunchRegisterResponse} m HolePunchRegisterResponse message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HolePunchRegisterResponse.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.connectedAddress != null && Object.hasOwnProperty.call(m, "connectedAddress")) - w.uint32(10).string(m.connectedAddress); - return w; - }; - - /** - * Encodes the specified HolePunchRegisterResponse message, length delimited. Does not implicitly {@link peerInterface.HolePunchRegisterResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof peerInterface.HolePunchRegisterResponse - * @static - * @param {peerInterface.IHolePunchRegisterResponse} message HolePunchRegisterResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HolePunchRegisterResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HolePunchRegisterResponse message from the specified reader or buffer. - * @function decode - * @memberof peerInterface.HolePunchRegisterResponse - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {peerInterface.HolePunchRegisterResponse} HolePunchRegisterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HolePunchRegisterResponse.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.HolePunchRegisterResponse(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.connectedAddress = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a HolePunchRegisterResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof peerInterface.HolePunchRegisterResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {peerInterface.HolePunchRegisterResponse} HolePunchRegisterResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HolePunchRegisterResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return HolePunchRegisterResponse; - })(); - - peerInterface.PeerUdpAddressRequest = (function() { - - /** - * Properties of a PeerUdpAddressRequest. - * @memberof peerInterface - * @interface IPeerUdpAddressRequest - * @property {string|null} [publicKey] PeerUdpAddressRequest publicKey - */ - - /** - * Constructs a new PeerUdpAddressRequest. - * @memberof peerInterface - * @classdesc Represents a PeerUdpAddressRequest. - * @implements IPeerUdpAddressRequest - * @constructor - * @param {peerInterface.IPeerUdpAddressRequest=} [p] Properties to set - */ - function PeerUdpAddressRequest(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * PeerUdpAddressRequest publicKey. - * @member {string} publicKey - * @memberof peerInterface.PeerUdpAddressRequest - * @instance - */ - PeerUdpAddressRequest.prototype.publicKey = ""; - - /** - * Creates a new PeerUdpAddressRequest instance using the specified properties. - * @function create - * @memberof peerInterface.PeerUdpAddressRequest - * @static - * @param {peerInterface.IPeerUdpAddressRequest=} [properties] Properties to set - * @returns {peerInterface.PeerUdpAddressRequest} PeerUdpAddressRequest instance - */ - PeerUdpAddressRequest.create = function create(properties) { - return new PeerUdpAddressRequest(properties); - }; - - /** - * Encodes the specified PeerUdpAddressRequest message. Does not implicitly {@link peerInterface.PeerUdpAddressRequest.verify|verify} messages. - * @function encode - * @memberof peerInterface.PeerUdpAddressRequest - * @static - * @param {peerInterface.IPeerUdpAddressRequest} m PeerUdpAddressRequest message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PeerUdpAddressRequest.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); - return w; - }; - - /** - * Encodes the specified PeerUdpAddressRequest message, length delimited. Does not implicitly {@link peerInterface.PeerUdpAddressRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof peerInterface.PeerUdpAddressRequest - * @static - * @param {peerInterface.IPeerUdpAddressRequest} message PeerUdpAddressRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PeerUdpAddressRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PeerUdpAddressRequest message from the specified reader or buffer. - * @function decode - * @memberof peerInterface.PeerUdpAddressRequest - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {peerInterface.PeerUdpAddressRequest} PeerUdpAddressRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PeerUdpAddressRequest.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.PeerUdpAddressRequest(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.publicKey = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a PeerUdpAddressRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof peerInterface.PeerUdpAddressRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {peerInterface.PeerUdpAddressRequest} PeerUdpAddressRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PeerUdpAddressRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return PeerUdpAddressRequest; - })(); - - peerInterface.PeerUdpAddressResponse = (function() { - - /** - * Properties of a PeerUdpAddressResponse. - * @memberof peerInterface - * @interface IPeerUdpAddressResponse - * @property {string|null} [address] PeerUdpAddressResponse address - */ - - /** - * Constructs a new PeerUdpAddressResponse. - * @memberof peerInterface - * @classdesc Represents a PeerUdpAddressResponse. - * @implements IPeerUdpAddressResponse - * @constructor - * @param {peerInterface.IPeerUdpAddressResponse=} [p] Properties to set - */ - function PeerUdpAddressResponse(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * PeerUdpAddressResponse address. - * @member {string} address - * @memberof peerInterface.PeerUdpAddressResponse - * @instance - */ - PeerUdpAddressResponse.prototype.address = ""; - - /** - * Creates a new PeerUdpAddressResponse instance using the specified properties. - * @function create - * @memberof peerInterface.PeerUdpAddressResponse - * @static - * @param {peerInterface.IPeerUdpAddressResponse=} [properties] Properties to set - * @returns {peerInterface.PeerUdpAddressResponse} PeerUdpAddressResponse instance - */ - PeerUdpAddressResponse.create = function create(properties) { - return new PeerUdpAddressResponse(properties); - }; - - /** - * Encodes the specified PeerUdpAddressResponse message. Does not implicitly {@link peerInterface.PeerUdpAddressResponse.verify|verify} messages. - * @function encode - * @memberof peerInterface.PeerUdpAddressResponse - * @static - * @param {peerInterface.IPeerUdpAddressResponse} m PeerUdpAddressResponse message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PeerUdpAddressResponse.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.address != null && Object.hasOwnProperty.call(m, "address")) - w.uint32(10).string(m.address); - return w; - }; - - /** - * Encodes the specified PeerUdpAddressResponse message, length delimited. Does not implicitly {@link peerInterface.PeerUdpAddressResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof peerInterface.PeerUdpAddressResponse - * @static - * @param {peerInterface.IPeerUdpAddressResponse} message PeerUdpAddressResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PeerUdpAddressResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PeerUdpAddressResponse message from the specified reader or buffer. - * @function decode - * @memberof peerInterface.PeerUdpAddressResponse - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {peerInterface.PeerUdpAddressResponse} PeerUdpAddressResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PeerUdpAddressResponse.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.PeerUdpAddressResponse(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.address = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a PeerUdpAddressResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof peerInterface.PeerUdpAddressResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {peerInterface.PeerUdpAddressResponse} PeerUdpAddressResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PeerUdpAddressResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return PeerUdpAddressResponse; - })(); - - return peerInterface; -})(); - -module.exports = $root; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const protobufjs = __importStar(__webpack_require__(10)); -/** - * Returns a 5 character long random string of lower case letters - */ -function randomString() { - return Math.random() - .toString(36) - .replace(/[^a-z]+/g, '') - .substr(0, 5); -} -exports.randomString = randomString; -/** - * Gets the first promise fulfiled - * @param promiseList List of promises - */ -async function promiseAny(promiseList) { - return await new Promise((resolve, reject) => { - const errorList = []; - for (const promise of promiseList) { - promise - .then((p) => { - resolve(p); - }) - .catch((_) => null); - promise.catch((error) => { - errorList.push(error); - // check if all have failed - if (errorList.length == promiseList.length) { - reject(errorList); - } - }); - } - }); -} -exports.promiseAny = promiseAny; -function protobufToString(message) { - return protobufjs.util.base64.encode(message, 0, message.length); -} -exports.protobufToString = protobufToString; -function stringToProtobuf(str) { - const buffer = protobufjs.util.newBuffer(protobufjs.util.base64.length(str)); - protobufjs.util.base64.decode(str, buffer, 0); - return buffer; -} -exports.stringToProtobuf = stringToProtobuf; -async function sleep(ms) { - await new Promise((resolve, reject) => { - setTimeout(() => resolve(), ms); - }); -} -exports.sleep = sleep; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports) { - -module.exports = require("protobufjs"); - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ - - -var $protobuf = __webpack_require__(0); - -// Common aliases -var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; - -// Exported root namespace -var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); - -$root.agentInterface = (function() { - - /** - * Namespace agentInterface. - * @exports agentInterface - * @namespace - */ - var agentInterface = {}; - - /** - * AgentMessageType enum. - * @name agentInterface.AgentMessageType - * @enum {number} - * @property {number} ERROR=0 ERROR value - * @property {number} STOP_AGENT=1 STOP_AGENT value - * @property {number} STATUS=2 STATUS value - * @property {number} REGISTER_NODE=3 REGISTER_NODE value - * @property {number} NEW_NODE=4 NEW_NODE value - * @property {number} LIST_NODES=5 LIST_NODES value - * @property {number} DERIVE_KEY=6 DERIVE_KEY value - * @property {number} SIGN_FILE=7 SIGN_FILE value - * @property {number} VERIFY_FILE=8 VERIFY_FILE value - * @property {number} LIST_VAULTS=9 LIST_VAULTS value - * @property {number} NEW_VAULT=10 NEW_VAULT value - * @property {number} DESTROY_VAULT=11 DESTROY_VAULT value - * @property {number} LIST_SECRETS=12 LIST_SECRETS value - * @property {number} CREATE_SECRET=13 CREATE_SECRET value - * @property {number} DESTROY_SECRET=14 DESTROY_SECRET value - * @property {number} GET_SECRET=15 GET_SECRET value - * @property {number} LIST_KEYS=16 LIST_KEYS value - * @property {number} GET_KEY=17 GET_KEY value - * @property {number} DELETE_KEY=18 DELETE_KEY value - * @property {number} ENCRYPT_FILE=19 ENCRYPT_FILE value - * @property {number} DECRYPT_FILE=20 DECRYPT_FILE value - * @property {number} GET_PRIMARY_KEYPAIR=21 GET_PRIMARY_KEYPAIR value - * @property {number} UPDATE_SECRET=22 UPDATE_SECRET value - * @property {number} GET_PEER_INFO=23 GET_PEER_INFO value - * @property {number} ADD_PEER=24 ADD_PEER value - * @property {number} PULL_VAULT=26 PULL_VAULT value - * @property {number} PING_PEER=27 PING_PEER value - * @property {number} FIND_PEER=28 FIND_PEER value - * @property {number} FIND_SOCIAL_PEER=29 FIND_SOCIAL_PEER value - * @property {number} LIST_PEERS=30 LIST_PEERS value - * @property {number} TOGGLE_STEALTH=31 TOGGLE_STEALTH value - * @property {number} UPDATE_PEER_INFO=32 UPDATE_PEER_INFO value - * @property {number} REQUEST_RELAY=33 REQUEST_RELAY value - * @property {number} REQUEST_PUNCH=34 REQUEST_PUNCH value - * @property {number} SCAN_VAULT_NAMES=35 SCAN_VAULT_NAMES value - */ - agentInterface.AgentMessageType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ERROR"] = 0; - values[valuesById[1] = "STOP_AGENT"] = 1; - values[valuesById[2] = "STATUS"] = 2; - values[valuesById[3] = "REGISTER_NODE"] = 3; - values[valuesById[4] = "NEW_NODE"] = 4; - values[valuesById[5] = "LIST_NODES"] = 5; - values[valuesById[6] = "DERIVE_KEY"] = 6; - values[valuesById[7] = "SIGN_FILE"] = 7; - values[valuesById[8] = "VERIFY_FILE"] = 8; - values[valuesById[9] = "LIST_VAULTS"] = 9; - values[valuesById[10] = "NEW_VAULT"] = 10; - values[valuesById[11] = "DESTROY_VAULT"] = 11; - values[valuesById[12] = "LIST_SECRETS"] = 12; - values[valuesById[13] = "CREATE_SECRET"] = 13; - values[valuesById[14] = "DESTROY_SECRET"] = 14; - values[valuesById[15] = "GET_SECRET"] = 15; - values[valuesById[16] = "LIST_KEYS"] = 16; - values[valuesById[17] = "GET_KEY"] = 17; - values[valuesById[18] = "DELETE_KEY"] = 18; - values[valuesById[19] = "ENCRYPT_FILE"] = 19; - values[valuesById[20] = "DECRYPT_FILE"] = 20; - values[valuesById[21] = "GET_PRIMARY_KEYPAIR"] = 21; - values[valuesById[22] = "UPDATE_SECRET"] = 22; - values[valuesById[23] = "GET_PEER_INFO"] = 23; - values[valuesById[24] = "ADD_PEER"] = 24; - values[valuesById[26] = "PULL_VAULT"] = 26; - values[valuesById[27] = "PING_PEER"] = 27; - values[valuesById[28] = "FIND_PEER"] = 28; - values[valuesById[29] = "FIND_SOCIAL_PEER"] = 29; - values[valuesById[30] = "LIST_PEERS"] = 30; - values[valuesById[31] = "TOGGLE_STEALTH"] = 31; - values[valuesById[32] = "UPDATE_PEER_INFO"] = 32; - values[valuesById[33] = "REQUEST_RELAY"] = 33; - values[valuesById[34] = "REQUEST_PUNCH"] = 34; - values[valuesById[35] = "SCAN_VAULT_NAMES"] = 35; - return values; - })(); - - agentInterface.AgentMessage = (function() { - - /** - * Properties of an AgentMessage. - * @memberof agentInterface - * @interface IAgentMessage - * @property {agentInterface.AgentMessageType|null} [type] AgentMessage type - * @property {boolean|null} [isResponse] AgentMessage isResponse - * @property {string|null} [nodePath] AgentMessage nodePath - * @property {Uint8Array|null} [subMessage] AgentMessage subMessage - */ - - /** - * Constructs a new AgentMessage. - * @memberof agentInterface - * @classdesc Represents an AgentMessage. - * @implements IAgentMessage - * @constructor - * @param {agentInterface.IAgentMessage=} [p] Properties to set - */ - function AgentMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * AgentMessage type. - * @member {agentInterface.AgentMessageType} type - * @memberof agentInterface.AgentMessage - * @instance - */ - AgentMessage.prototype.type = 0; - - /** - * AgentMessage isResponse. - * @member {boolean} isResponse - * @memberof agentInterface.AgentMessage - * @instance - */ - AgentMessage.prototype.isResponse = false; - - /** - * AgentMessage nodePath. - * @member {string} nodePath - * @memberof agentInterface.AgentMessage - * @instance - */ - AgentMessage.prototype.nodePath = ""; - - /** - * AgentMessage subMessage. - * @member {Uint8Array} subMessage - * @memberof agentInterface.AgentMessage - * @instance - */ - AgentMessage.prototype.subMessage = $util.newBuffer([]); - - /** - * Creates a new AgentMessage instance using the specified properties. - * @function create - * @memberof agentInterface.AgentMessage - * @static - * @param {agentInterface.IAgentMessage=} [properties] Properties to set - * @returns {agentInterface.AgentMessage} AgentMessage instance - */ - AgentMessage.create = function create(properties) { - return new AgentMessage(properties); - }; - - /** - * Encodes the specified AgentMessage message. Does not implicitly {@link agentInterface.AgentMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.AgentMessage - * @static - * @param {agentInterface.IAgentMessage} m AgentMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AgentMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.type != null && Object.hasOwnProperty.call(m, "type")) - w.uint32(8).int32(m.type); - if (m.isResponse != null && Object.hasOwnProperty.call(m, "isResponse")) - w.uint32(16).bool(m.isResponse); - if (m.nodePath != null && Object.hasOwnProperty.call(m, "nodePath")) - w.uint32(26).string(m.nodePath); - if (m.subMessage != null && Object.hasOwnProperty.call(m, "subMessage")) - w.uint32(34).bytes(m.subMessage); - return w; - }; - - /** - * Encodes the specified AgentMessage message, length delimited. Does not implicitly {@link agentInterface.AgentMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.AgentMessage - * @static - * @param {agentInterface.IAgentMessage} message AgentMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AgentMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AgentMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.AgentMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.AgentMessage} AgentMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AgentMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.AgentMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.type = r.int32(); - break; - case 2: - m.isResponse = r.bool(); - break; - case 3: - m.nodePath = r.string(); - break; - case 4: - m.subMessage = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes an AgentMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.AgentMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.AgentMessage} AgentMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AgentMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return AgentMessage; - })(); - - agentInterface.ErrorMessage = (function() { - - /** - * Properties of an ErrorMessage. - * @memberof agentInterface - * @interface IErrorMessage - * @property {string|null} [error] ErrorMessage error - */ - - /** - * Constructs a new ErrorMessage. - * @memberof agentInterface - * @classdesc Represents an ErrorMessage. - * @implements IErrorMessage - * @constructor - * @param {agentInterface.IErrorMessage=} [p] Properties to set - */ - function ErrorMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * ErrorMessage error. - * @member {string} error - * @memberof agentInterface.ErrorMessage - * @instance - */ - ErrorMessage.prototype.error = ""; - - /** - * Creates a new ErrorMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ErrorMessage - * @static - * @param {agentInterface.IErrorMessage=} [properties] Properties to set - * @returns {agentInterface.ErrorMessage} ErrorMessage instance - */ - ErrorMessage.create = function create(properties) { - return new ErrorMessage(properties); - }; - - /** - * Encodes the specified ErrorMessage message. Does not implicitly {@link agentInterface.ErrorMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ErrorMessage - * @static - * @param {agentInterface.IErrorMessage} m ErrorMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ErrorMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.error != null && Object.hasOwnProperty.call(m, "error")) - w.uint32(10).string(m.error); - return w; - }; - - /** - * Encodes the specified ErrorMessage message, length delimited. Does not implicitly {@link agentInterface.ErrorMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ErrorMessage - * @static - * @param {agentInterface.IErrorMessage} message ErrorMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ErrorMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ErrorMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ErrorMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ErrorMessage} ErrorMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ErrorMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ErrorMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.error = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes an ErrorMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ErrorMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ErrorMessage} ErrorMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ErrorMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ErrorMessage; - })(); - - /** - * AgentStatusType enum. - * @name agentInterface.AgentStatusType - * @enum {number} - * @property {number} ONLINE=0 ONLINE value - * @property {number} OFFLINE=1 OFFLINE value - * @property {number} ERRORED=2 ERRORED value - */ - agentInterface.AgentStatusType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ONLINE"] = 0; - values[valuesById[1] = "OFFLINE"] = 1; - values[valuesById[2] = "ERRORED"] = 2; - return values; - })(); - - agentInterface.AgentStatusResponseMessage = (function() { - - /** - * Properties of an AgentStatusResponseMessage. - * @memberof agentInterface - * @interface IAgentStatusResponseMessage - * @property {agentInterface.AgentStatusType|null} [status] AgentStatusResponseMessage status - */ - - /** - * Constructs a new AgentStatusResponseMessage. - * @memberof agentInterface - * @classdesc Represents an AgentStatusResponseMessage. - * @implements IAgentStatusResponseMessage - * @constructor - * @param {agentInterface.IAgentStatusResponseMessage=} [p] Properties to set - */ - function AgentStatusResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * AgentStatusResponseMessage status. - * @member {agentInterface.AgentStatusType} status - * @memberof agentInterface.AgentStatusResponseMessage - * @instance - */ - AgentStatusResponseMessage.prototype.status = 0; - - /** - * Creates a new AgentStatusResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.AgentStatusResponseMessage - * @static - * @param {agentInterface.IAgentStatusResponseMessage=} [properties] Properties to set - * @returns {agentInterface.AgentStatusResponseMessage} AgentStatusResponseMessage instance - */ - AgentStatusResponseMessage.create = function create(properties) { - return new AgentStatusResponseMessage(properties); - }; - - /** - * Encodes the specified AgentStatusResponseMessage message. Does not implicitly {@link agentInterface.AgentStatusResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.AgentStatusResponseMessage - * @static - * @param {agentInterface.IAgentStatusResponseMessage} m AgentStatusResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AgentStatusResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.status != null && Object.hasOwnProperty.call(m, "status")) - w.uint32(8).int32(m.status); - return w; - }; - - /** - * Encodes the specified AgentStatusResponseMessage message, length delimited. Does not implicitly {@link agentInterface.AgentStatusResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.AgentStatusResponseMessage - * @static - * @param {agentInterface.IAgentStatusResponseMessage} message AgentStatusResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AgentStatusResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AgentStatusResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.AgentStatusResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.AgentStatusResponseMessage} AgentStatusResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AgentStatusResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.AgentStatusResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.status = r.int32(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes an AgentStatusResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.AgentStatusResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.AgentStatusResponseMessage} AgentStatusResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AgentStatusResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return AgentStatusResponseMessage; - })(); - - agentInterface.RegisterNodeRequestMessage = (function() { - - /** - * Properties of a RegisterNodeRequestMessage. - * @memberof agentInterface - * @interface IRegisterNodeRequestMessage - * @property {string|null} [passphrase] RegisterNodeRequestMessage passphrase - */ - - /** - * Constructs a new RegisterNodeRequestMessage. - * @memberof agentInterface - * @classdesc Represents a RegisterNodeRequestMessage. - * @implements IRegisterNodeRequestMessage - * @constructor - * @param {agentInterface.IRegisterNodeRequestMessage=} [p] Properties to set - */ - function RegisterNodeRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * RegisterNodeRequestMessage passphrase. - * @member {string} passphrase - * @memberof agentInterface.RegisterNodeRequestMessage - * @instance - */ - RegisterNodeRequestMessage.prototype.passphrase = ""; - - /** - * Creates a new RegisterNodeRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.RegisterNodeRequestMessage - * @static - * @param {agentInterface.IRegisterNodeRequestMessage=} [properties] Properties to set - * @returns {agentInterface.RegisterNodeRequestMessage} RegisterNodeRequestMessage instance - */ - RegisterNodeRequestMessage.create = function create(properties) { - return new RegisterNodeRequestMessage(properties); - }; - - /** - * Encodes the specified RegisterNodeRequestMessage message. Does not implicitly {@link agentInterface.RegisterNodeRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.RegisterNodeRequestMessage - * @static - * @param {agentInterface.IRegisterNodeRequestMessage} m RegisterNodeRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RegisterNodeRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.passphrase != null && Object.hasOwnProperty.call(m, "passphrase")) - w.uint32(10).string(m.passphrase); - return w; - }; - - /** - * Encodes the specified RegisterNodeRequestMessage message, length delimited. Does not implicitly {@link agentInterface.RegisterNodeRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.RegisterNodeRequestMessage - * @static - * @param {agentInterface.IRegisterNodeRequestMessage} message RegisterNodeRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RegisterNodeRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RegisterNodeRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.RegisterNodeRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.RegisterNodeRequestMessage} RegisterNodeRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RegisterNodeRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.RegisterNodeRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.passphrase = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a RegisterNodeRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.RegisterNodeRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.RegisterNodeRequestMessage} RegisterNodeRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RegisterNodeRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return RegisterNodeRequestMessage; - })(); - - agentInterface.RegisterNodeResponseMessage = (function() { - - /** - * Properties of a RegisterNodeResponseMessage. - * @memberof agentInterface - * @interface IRegisterNodeResponseMessage - * @property {boolean|null} [successful] RegisterNodeResponseMessage successful - */ - - /** - * Constructs a new RegisterNodeResponseMessage. - * @memberof agentInterface - * @classdesc Represents a RegisterNodeResponseMessage. - * @implements IRegisterNodeResponseMessage - * @constructor - * @param {agentInterface.IRegisterNodeResponseMessage=} [p] Properties to set - */ - function RegisterNodeResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * RegisterNodeResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.RegisterNodeResponseMessage - * @instance - */ - RegisterNodeResponseMessage.prototype.successful = false; - - /** - * Creates a new RegisterNodeResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.RegisterNodeResponseMessage - * @static - * @param {agentInterface.IRegisterNodeResponseMessage=} [properties] Properties to set - * @returns {agentInterface.RegisterNodeResponseMessage} RegisterNodeResponseMessage instance - */ - RegisterNodeResponseMessage.create = function create(properties) { - return new RegisterNodeResponseMessage(properties); - }; - - /** - * Encodes the specified RegisterNodeResponseMessage message. Does not implicitly {@link agentInterface.RegisterNodeResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.RegisterNodeResponseMessage - * @static - * @param {agentInterface.IRegisterNodeResponseMessage} m RegisterNodeResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RegisterNodeResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified RegisterNodeResponseMessage message, length delimited. Does not implicitly {@link agentInterface.RegisterNodeResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.RegisterNodeResponseMessage - * @static - * @param {agentInterface.IRegisterNodeResponseMessage} message RegisterNodeResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RegisterNodeResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RegisterNodeResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.RegisterNodeResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.RegisterNodeResponseMessage} RegisterNodeResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RegisterNodeResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.RegisterNodeResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a RegisterNodeResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.RegisterNodeResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.RegisterNodeResponseMessage} RegisterNodeResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RegisterNodeResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return RegisterNodeResponseMessage; - })(); - - agentInterface.NewNodeRequestMessage = (function() { - - /** - * Properties of a NewNodeRequestMessage. - * @memberof agentInterface - * @interface INewNodeRequestMessage - * @property {string|null} [userId] NewNodeRequestMessage userId - * @property {string|null} [passphrase] NewNodeRequestMessage passphrase - * @property {number|null} [nbits] NewNodeRequestMessage nbits - */ - - /** - * Constructs a new NewNodeRequestMessage. - * @memberof agentInterface - * @classdesc Represents a NewNodeRequestMessage. - * @implements INewNodeRequestMessage - * @constructor - * @param {agentInterface.INewNodeRequestMessage=} [p] Properties to set - */ - function NewNodeRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * NewNodeRequestMessage userId. - * @member {string} userId - * @memberof agentInterface.NewNodeRequestMessage - * @instance - */ - NewNodeRequestMessage.prototype.userId = ""; - - /** - * NewNodeRequestMessage passphrase. - * @member {string} passphrase - * @memberof agentInterface.NewNodeRequestMessage - * @instance - */ - NewNodeRequestMessage.prototype.passphrase = ""; - - /** - * NewNodeRequestMessage nbits. - * @member {number} nbits - * @memberof agentInterface.NewNodeRequestMessage - * @instance - */ - NewNodeRequestMessage.prototype.nbits = 0; - - /** - * Creates a new NewNodeRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.NewNodeRequestMessage - * @static - * @param {agentInterface.INewNodeRequestMessage=} [properties] Properties to set - * @returns {agentInterface.NewNodeRequestMessage} NewNodeRequestMessage instance - */ - NewNodeRequestMessage.create = function create(properties) { - return new NewNodeRequestMessage(properties); - }; - - /** - * Encodes the specified NewNodeRequestMessage message. Does not implicitly {@link agentInterface.NewNodeRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.NewNodeRequestMessage - * @static - * @param {agentInterface.INewNodeRequestMessage} m NewNodeRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NewNodeRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.userId != null && Object.hasOwnProperty.call(m, "userId")) - w.uint32(10).string(m.userId); - if (m.passphrase != null && Object.hasOwnProperty.call(m, "passphrase")) - w.uint32(18).string(m.passphrase); - if (m.nbits != null && Object.hasOwnProperty.call(m, "nbits")) - w.uint32(24).int32(m.nbits); - return w; - }; - - /** - * Encodes the specified NewNodeRequestMessage message, length delimited. Does not implicitly {@link agentInterface.NewNodeRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.NewNodeRequestMessage - * @static - * @param {agentInterface.INewNodeRequestMessage} message NewNodeRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NewNodeRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NewNodeRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.NewNodeRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.NewNodeRequestMessage} NewNodeRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NewNodeRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.NewNodeRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.userId = r.string(); - break; - case 2: - m.passphrase = r.string(); - break; - case 3: - m.nbits = r.int32(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a NewNodeRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.NewNodeRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.NewNodeRequestMessage} NewNodeRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NewNodeRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return NewNodeRequestMessage; - })(); - - agentInterface.NewNodeResponseMessage = (function() { - - /** - * Properties of a NewNodeResponseMessage. - * @memberof agentInterface - * @interface INewNodeResponseMessage - * @property {boolean|null} [successful] NewNodeResponseMessage successful - */ - - /** - * Constructs a new NewNodeResponseMessage. - * @memberof agentInterface - * @classdesc Represents a NewNodeResponseMessage. - * @implements INewNodeResponseMessage - * @constructor - * @param {agentInterface.INewNodeResponseMessage=} [p] Properties to set - */ - function NewNodeResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * NewNodeResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.NewNodeResponseMessage - * @instance - */ - NewNodeResponseMessage.prototype.successful = false; - - /** - * Creates a new NewNodeResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.NewNodeResponseMessage - * @static - * @param {agentInterface.INewNodeResponseMessage=} [properties] Properties to set - * @returns {agentInterface.NewNodeResponseMessage} NewNodeResponseMessage instance - */ - NewNodeResponseMessage.create = function create(properties) { - return new NewNodeResponseMessage(properties); - }; - - /** - * Encodes the specified NewNodeResponseMessage message. Does not implicitly {@link agentInterface.NewNodeResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.NewNodeResponseMessage - * @static - * @param {agentInterface.INewNodeResponseMessage} m NewNodeResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NewNodeResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified NewNodeResponseMessage message, length delimited. Does not implicitly {@link agentInterface.NewNodeResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.NewNodeResponseMessage - * @static - * @param {agentInterface.INewNodeResponseMessage} message NewNodeResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NewNodeResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NewNodeResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.NewNodeResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.NewNodeResponseMessage} NewNodeResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NewNodeResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.NewNodeResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a NewNodeResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.NewNodeResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.NewNodeResponseMessage} NewNodeResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NewNodeResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return NewNodeResponseMessage; - })(); - - agentInterface.ListNodesRequestMessage = (function() { - - /** - * Properties of a ListNodesRequestMessage. - * @memberof agentInterface - * @interface IListNodesRequestMessage - * @property {boolean|null} [unlockedOnly] ListNodesRequestMessage unlockedOnly - */ - - /** - * Constructs a new ListNodesRequestMessage. - * @memberof agentInterface - * @classdesc Represents a ListNodesRequestMessage. - * @implements IListNodesRequestMessage - * @constructor - * @param {agentInterface.IListNodesRequestMessage=} [p] Properties to set - */ - function ListNodesRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * ListNodesRequestMessage unlockedOnly. - * @member {boolean} unlockedOnly - * @memberof agentInterface.ListNodesRequestMessage - * @instance - */ - ListNodesRequestMessage.prototype.unlockedOnly = false; - - /** - * Creates a new ListNodesRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ListNodesRequestMessage - * @static - * @param {agentInterface.IListNodesRequestMessage=} [properties] Properties to set - * @returns {agentInterface.ListNodesRequestMessage} ListNodesRequestMessage instance - */ - ListNodesRequestMessage.create = function create(properties) { - return new ListNodesRequestMessage(properties); - }; - - /** - * Encodes the specified ListNodesRequestMessage message. Does not implicitly {@link agentInterface.ListNodesRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ListNodesRequestMessage - * @static - * @param {agentInterface.IListNodesRequestMessage} m ListNodesRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListNodesRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.unlockedOnly != null && Object.hasOwnProperty.call(m, "unlockedOnly")) - w.uint32(8).bool(m.unlockedOnly); - return w; - }; - - /** - * Encodes the specified ListNodesRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ListNodesRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ListNodesRequestMessage - * @static - * @param {agentInterface.IListNodesRequestMessage} message ListNodesRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListNodesRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListNodesRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ListNodesRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ListNodesRequestMessage} ListNodesRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListNodesRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListNodesRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.unlockedOnly = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a ListNodesRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ListNodesRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ListNodesRequestMessage} ListNodesRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListNodesRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ListNodesRequestMessage; - })(); - - agentInterface.ListNodesResponseMessage = (function() { - - /** - * Properties of a ListNodesResponseMessage. - * @memberof agentInterface - * @interface IListNodesResponseMessage - * @property {Array.|null} [nodes] ListNodesResponseMessage nodes - */ - - /** - * Constructs a new ListNodesResponseMessage. - * @memberof agentInterface - * @classdesc Represents a ListNodesResponseMessage. - * @implements IListNodesResponseMessage - * @constructor - * @param {agentInterface.IListNodesResponseMessage=} [p] Properties to set - */ - function ListNodesResponseMessage(p) { - this.nodes = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * ListNodesResponseMessage nodes. - * @member {Array.} nodes - * @memberof agentInterface.ListNodesResponseMessage - * @instance - */ - ListNodesResponseMessage.prototype.nodes = $util.emptyArray; - - /** - * Creates a new ListNodesResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ListNodesResponseMessage - * @static - * @param {agentInterface.IListNodesResponseMessage=} [properties] Properties to set - * @returns {agentInterface.ListNodesResponseMessage} ListNodesResponseMessage instance - */ - ListNodesResponseMessage.create = function create(properties) { - return new ListNodesResponseMessage(properties); - }; - - /** - * Encodes the specified ListNodesResponseMessage message. Does not implicitly {@link agentInterface.ListNodesResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ListNodesResponseMessage - * @static - * @param {agentInterface.IListNodesResponseMessage} m ListNodesResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListNodesResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.nodes != null && m.nodes.length) { - for (var i = 0; i < m.nodes.length; ++i) - w.uint32(10).string(m.nodes[i]); - } - return w; - }; - - /** - * Encodes the specified ListNodesResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ListNodesResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ListNodesResponseMessage - * @static - * @param {agentInterface.IListNodesResponseMessage} message ListNodesResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListNodesResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListNodesResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ListNodesResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ListNodesResponseMessage} ListNodesResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListNodesResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListNodesResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.nodes && m.nodes.length)) - m.nodes = []; - m.nodes.push(r.string()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a ListNodesResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ListNodesResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ListNodesResponseMessage} ListNodesResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListNodesResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ListNodesResponseMessage; - })(); - - agentInterface.SignFileRequestMessage = (function() { - - /** - * Properties of a SignFileRequestMessage. - * @memberof agentInterface - * @interface ISignFileRequestMessage - * @property {string|null} [filePath] SignFileRequestMessage filePath - * @property {string|null} [privateKeyPath] SignFileRequestMessage privateKeyPath - * @property {string|null} [passphrase] SignFileRequestMessage passphrase - */ - - /** - * Constructs a new SignFileRequestMessage. - * @memberof agentInterface - * @classdesc Represents a SignFileRequestMessage. - * @implements ISignFileRequestMessage - * @constructor - * @param {agentInterface.ISignFileRequestMessage=} [p] Properties to set - */ - function SignFileRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * SignFileRequestMessage filePath. - * @member {string} filePath - * @memberof agentInterface.SignFileRequestMessage - * @instance - */ - SignFileRequestMessage.prototype.filePath = ""; - - /** - * SignFileRequestMessage privateKeyPath. - * @member {string} privateKeyPath - * @memberof agentInterface.SignFileRequestMessage - * @instance - */ - SignFileRequestMessage.prototype.privateKeyPath = ""; - - /** - * SignFileRequestMessage passphrase. - * @member {string} passphrase - * @memberof agentInterface.SignFileRequestMessage - * @instance - */ - SignFileRequestMessage.prototype.passphrase = ""; - - /** - * Creates a new SignFileRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.SignFileRequestMessage - * @static - * @param {agentInterface.ISignFileRequestMessage=} [properties] Properties to set - * @returns {agentInterface.SignFileRequestMessage} SignFileRequestMessage instance - */ - SignFileRequestMessage.create = function create(properties) { - return new SignFileRequestMessage(properties); - }; - - /** - * Encodes the specified SignFileRequestMessage message. Does not implicitly {@link agentInterface.SignFileRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.SignFileRequestMessage - * @static - * @param {agentInterface.ISignFileRequestMessage} m SignFileRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignFileRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.filePath != null && Object.hasOwnProperty.call(m, "filePath")) - w.uint32(10).string(m.filePath); - if (m.privateKeyPath != null && Object.hasOwnProperty.call(m, "privateKeyPath")) - w.uint32(18).string(m.privateKeyPath); - if (m.passphrase != null && Object.hasOwnProperty.call(m, "passphrase")) - w.uint32(26).string(m.passphrase); - return w; - }; - - /** - * Encodes the specified SignFileRequestMessage message, length delimited. Does not implicitly {@link agentInterface.SignFileRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.SignFileRequestMessage - * @static - * @param {agentInterface.ISignFileRequestMessage} message SignFileRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignFileRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SignFileRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.SignFileRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.SignFileRequestMessage} SignFileRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignFileRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.SignFileRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.filePath = r.string(); - break; - case 2: - m.privateKeyPath = r.string(); - break; - case 3: - m.passphrase = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a SignFileRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.SignFileRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.SignFileRequestMessage} SignFileRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignFileRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return SignFileRequestMessage; - })(); - - agentInterface.SignFileResponseMessage = (function() { - - /** - * Properties of a SignFileResponseMessage. - * @memberof agentInterface - * @interface ISignFileResponseMessage - * @property {string|null} [signaturePath] SignFileResponseMessage signaturePath - */ - - /** - * Constructs a new SignFileResponseMessage. - * @memberof agentInterface - * @classdesc Represents a SignFileResponseMessage. - * @implements ISignFileResponseMessage - * @constructor - * @param {agentInterface.ISignFileResponseMessage=} [p] Properties to set - */ - function SignFileResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * SignFileResponseMessage signaturePath. - * @member {string} signaturePath - * @memberof agentInterface.SignFileResponseMessage - * @instance - */ - SignFileResponseMessage.prototype.signaturePath = ""; - - /** - * Creates a new SignFileResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.SignFileResponseMessage - * @static - * @param {agentInterface.ISignFileResponseMessage=} [properties] Properties to set - * @returns {agentInterface.SignFileResponseMessage} SignFileResponseMessage instance - */ - SignFileResponseMessage.create = function create(properties) { - return new SignFileResponseMessage(properties); - }; - - /** - * Encodes the specified SignFileResponseMessage message. Does not implicitly {@link agentInterface.SignFileResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.SignFileResponseMessage - * @static - * @param {agentInterface.ISignFileResponseMessage} m SignFileResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignFileResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.signaturePath != null && Object.hasOwnProperty.call(m, "signaturePath")) - w.uint32(10).string(m.signaturePath); - return w; - }; - - /** - * Encodes the specified SignFileResponseMessage message, length delimited. Does not implicitly {@link agentInterface.SignFileResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.SignFileResponseMessage - * @static - * @param {agentInterface.ISignFileResponseMessage} message SignFileResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignFileResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SignFileResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.SignFileResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.SignFileResponseMessage} SignFileResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignFileResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.SignFileResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.signaturePath = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a SignFileResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.SignFileResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.SignFileResponseMessage} SignFileResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignFileResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return SignFileResponseMessage; - })(); - - agentInterface.VerifyFileRequestMessage = (function() { - - /** - * Properties of a VerifyFileRequestMessage. - * @memberof agentInterface - * @interface IVerifyFileRequestMessage - * @property {string|null} [filePath] VerifyFileRequestMessage filePath - * @property {string|null} [publicKeyPath] VerifyFileRequestMessage publicKeyPath - */ - - /** - * Constructs a new VerifyFileRequestMessage. - * @memberof agentInterface - * @classdesc Represents a VerifyFileRequestMessage. - * @implements IVerifyFileRequestMessage - * @constructor - * @param {agentInterface.IVerifyFileRequestMessage=} [p] Properties to set - */ - function VerifyFileRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * VerifyFileRequestMessage filePath. - * @member {string} filePath - * @memberof agentInterface.VerifyFileRequestMessage - * @instance - */ - VerifyFileRequestMessage.prototype.filePath = ""; - - /** - * VerifyFileRequestMessage publicKeyPath. - * @member {string} publicKeyPath - * @memberof agentInterface.VerifyFileRequestMessage - * @instance - */ - VerifyFileRequestMessage.prototype.publicKeyPath = ""; - - /** - * Creates a new VerifyFileRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.VerifyFileRequestMessage - * @static - * @param {agentInterface.IVerifyFileRequestMessage=} [properties] Properties to set - * @returns {agentInterface.VerifyFileRequestMessage} VerifyFileRequestMessage instance - */ - VerifyFileRequestMessage.create = function create(properties) { - return new VerifyFileRequestMessage(properties); - }; - - /** - * Encodes the specified VerifyFileRequestMessage message. Does not implicitly {@link agentInterface.VerifyFileRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.VerifyFileRequestMessage - * @static - * @param {agentInterface.IVerifyFileRequestMessage} m VerifyFileRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VerifyFileRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.filePath != null && Object.hasOwnProperty.call(m, "filePath")) - w.uint32(10).string(m.filePath); - if (m.publicKeyPath != null && Object.hasOwnProperty.call(m, "publicKeyPath")) - w.uint32(18).string(m.publicKeyPath); - return w; - }; - - /** - * Encodes the specified VerifyFileRequestMessage message, length delimited. Does not implicitly {@link agentInterface.VerifyFileRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.VerifyFileRequestMessage - * @static - * @param {agentInterface.IVerifyFileRequestMessage} message VerifyFileRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VerifyFileRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VerifyFileRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.VerifyFileRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.VerifyFileRequestMessage} VerifyFileRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VerifyFileRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.VerifyFileRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.filePath = r.string(); - break; - case 2: - m.publicKeyPath = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a VerifyFileRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.VerifyFileRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.VerifyFileRequestMessage} VerifyFileRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VerifyFileRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return VerifyFileRequestMessage; - })(); - - agentInterface.VerifyFileResponseMessage = (function() { - - /** - * Properties of a VerifyFileResponseMessage. - * @memberof agentInterface - * @interface IVerifyFileResponseMessage - * @property {boolean|null} [verified] VerifyFileResponseMessage verified - */ - - /** - * Constructs a new VerifyFileResponseMessage. - * @memberof agentInterface - * @classdesc Represents a VerifyFileResponseMessage. - * @implements IVerifyFileResponseMessage - * @constructor - * @param {agentInterface.IVerifyFileResponseMessage=} [p] Properties to set - */ - function VerifyFileResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * VerifyFileResponseMessage verified. - * @member {boolean} verified - * @memberof agentInterface.VerifyFileResponseMessage - * @instance - */ - VerifyFileResponseMessage.prototype.verified = false; - - /** - * Creates a new VerifyFileResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.VerifyFileResponseMessage - * @static - * @param {agentInterface.IVerifyFileResponseMessage=} [properties] Properties to set - * @returns {agentInterface.VerifyFileResponseMessage} VerifyFileResponseMessage instance - */ - VerifyFileResponseMessage.create = function create(properties) { - return new VerifyFileResponseMessage(properties); - }; - - /** - * Encodes the specified VerifyFileResponseMessage message. Does not implicitly {@link agentInterface.VerifyFileResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.VerifyFileResponseMessage - * @static - * @param {agentInterface.IVerifyFileResponseMessage} m VerifyFileResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VerifyFileResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.verified != null && Object.hasOwnProperty.call(m, "verified")) - w.uint32(8).bool(m.verified); - return w; - }; - - /** - * Encodes the specified VerifyFileResponseMessage message, length delimited. Does not implicitly {@link agentInterface.VerifyFileResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.VerifyFileResponseMessage - * @static - * @param {agentInterface.IVerifyFileResponseMessage} message VerifyFileResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VerifyFileResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VerifyFileResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.VerifyFileResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.VerifyFileResponseMessage} VerifyFileResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VerifyFileResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.VerifyFileResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.verified = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a VerifyFileResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.VerifyFileResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.VerifyFileResponseMessage} VerifyFileResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VerifyFileResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return VerifyFileResponseMessage; - })(); - - agentInterface.EncryptFileRequestMessage = (function() { - - /** - * Properties of an EncryptFileRequestMessage. - * @memberof agentInterface - * @interface IEncryptFileRequestMessage - * @property {string|null} [filePath] EncryptFileRequestMessage filePath - * @property {string|null} [publicKeyPath] EncryptFileRequestMessage publicKeyPath - */ - - /** - * Constructs a new EncryptFileRequestMessage. - * @memberof agentInterface - * @classdesc Represents an EncryptFileRequestMessage. - * @implements IEncryptFileRequestMessage - * @constructor - * @param {agentInterface.IEncryptFileRequestMessage=} [p] Properties to set - */ - function EncryptFileRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * EncryptFileRequestMessage filePath. - * @member {string} filePath - * @memberof agentInterface.EncryptFileRequestMessage - * @instance - */ - EncryptFileRequestMessage.prototype.filePath = ""; - - /** - * EncryptFileRequestMessage publicKeyPath. - * @member {string} publicKeyPath - * @memberof agentInterface.EncryptFileRequestMessage - * @instance - */ - EncryptFileRequestMessage.prototype.publicKeyPath = ""; - - /** - * Creates a new EncryptFileRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.EncryptFileRequestMessage - * @static - * @param {agentInterface.IEncryptFileRequestMessage=} [properties] Properties to set - * @returns {agentInterface.EncryptFileRequestMessage} EncryptFileRequestMessage instance - */ - EncryptFileRequestMessage.create = function create(properties) { - return new EncryptFileRequestMessage(properties); - }; - - /** - * Encodes the specified EncryptFileRequestMessage message. Does not implicitly {@link agentInterface.EncryptFileRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.EncryptFileRequestMessage - * @static - * @param {agentInterface.IEncryptFileRequestMessage} m EncryptFileRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EncryptFileRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.filePath != null && Object.hasOwnProperty.call(m, "filePath")) - w.uint32(10).string(m.filePath); - if (m.publicKeyPath != null && Object.hasOwnProperty.call(m, "publicKeyPath")) - w.uint32(18).string(m.publicKeyPath); - return w; - }; - - /** - * Encodes the specified EncryptFileRequestMessage message, length delimited. Does not implicitly {@link agentInterface.EncryptFileRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.EncryptFileRequestMessage - * @static - * @param {agentInterface.IEncryptFileRequestMessage} message EncryptFileRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EncryptFileRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EncryptFileRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.EncryptFileRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.EncryptFileRequestMessage} EncryptFileRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EncryptFileRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.EncryptFileRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.filePath = r.string(); - break; - case 2: - m.publicKeyPath = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes an EncryptFileRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.EncryptFileRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.EncryptFileRequestMessage} EncryptFileRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EncryptFileRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return EncryptFileRequestMessage; - })(); - - agentInterface.EncryptFileResponseMessage = (function() { - - /** - * Properties of an EncryptFileResponseMessage. - * @memberof agentInterface - * @interface IEncryptFileResponseMessage - * @property {string|null} [encryptedPath] EncryptFileResponseMessage encryptedPath - */ - - /** - * Constructs a new EncryptFileResponseMessage. - * @memberof agentInterface - * @classdesc Represents an EncryptFileResponseMessage. - * @implements IEncryptFileResponseMessage - * @constructor - * @param {agentInterface.IEncryptFileResponseMessage=} [p] Properties to set - */ - function EncryptFileResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * EncryptFileResponseMessage encryptedPath. - * @member {string} encryptedPath - * @memberof agentInterface.EncryptFileResponseMessage - * @instance - */ - EncryptFileResponseMessage.prototype.encryptedPath = ""; - - /** - * Creates a new EncryptFileResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.EncryptFileResponseMessage - * @static - * @param {agentInterface.IEncryptFileResponseMessage=} [properties] Properties to set - * @returns {agentInterface.EncryptFileResponseMessage} EncryptFileResponseMessage instance - */ - EncryptFileResponseMessage.create = function create(properties) { - return new EncryptFileResponseMessage(properties); - }; - - /** - * Encodes the specified EncryptFileResponseMessage message. Does not implicitly {@link agentInterface.EncryptFileResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.EncryptFileResponseMessage - * @static - * @param {agentInterface.IEncryptFileResponseMessage} m EncryptFileResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EncryptFileResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.encryptedPath != null && Object.hasOwnProperty.call(m, "encryptedPath")) - w.uint32(10).string(m.encryptedPath); - return w; - }; - - /** - * Encodes the specified EncryptFileResponseMessage message, length delimited. Does not implicitly {@link agentInterface.EncryptFileResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.EncryptFileResponseMessage - * @static - * @param {agentInterface.IEncryptFileResponseMessage} message EncryptFileResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EncryptFileResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EncryptFileResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.EncryptFileResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.EncryptFileResponseMessage} EncryptFileResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EncryptFileResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.EncryptFileResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.encryptedPath = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes an EncryptFileResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.EncryptFileResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.EncryptFileResponseMessage} EncryptFileResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EncryptFileResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return EncryptFileResponseMessage; - })(); - - agentInterface.DecryptFileRequestMessage = (function() { - - /** - * Properties of a DecryptFileRequestMessage. - * @memberof agentInterface - * @interface IDecryptFileRequestMessage - * @property {string|null} [filePath] DecryptFileRequestMessage filePath - * @property {string|null} [privateKeyPath] DecryptFileRequestMessage privateKeyPath - * @property {string|null} [passphrase] DecryptFileRequestMessage passphrase - */ - - /** - * Constructs a new DecryptFileRequestMessage. - * @memberof agentInterface - * @classdesc Represents a DecryptFileRequestMessage. - * @implements IDecryptFileRequestMessage - * @constructor - * @param {agentInterface.IDecryptFileRequestMessage=} [p] Properties to set - */ - function DecryptFileRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * DecryptFileRequestMessage filePath. - * @member {string} filePath - * @memberof agentInterface.DecryptFileRequestMessage - * @instance - */ - DecryptFileRequestMessage.prototype.filePath = ""; - - /** - * DecryptFileRequestMessage privateKeyPath. - * @member {string} privateKeyPath - * @memberof agentInterface.DecryptFileRequestMessage - * @instance - */ - DecryptFileRequestMessage.prototype.privateKeyPath = ""; - - /** - * DecryptFileRequestMessage passphrase. - * @member {string} passphrase - * @memberof agentInterface.DecryptFileRequestMessage - * @instance - */ - DecryptFileRequestMessage.prototype.passphrase = ""; - - /** - * Creates a new DecryptFileRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.DecryptFileRequestMessage - * @static - * @param {agentInterface.IDecryptFileRequestMessage=} [properties] Properties to set - * @returns {agentInterface.DecryptFileRequestMessage} DecryptFileRequestMessage instance - */ - DecryptFileRequestMessage.create = function create(properties) { - return new DecryptFileRequestMessage(properties); - }; - - /** - * Encodes the specified DecryptFileRequestMessage message. Does not implicitly {@link agentInterface.DecryptFileRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.DecryptFileRequestMessage - * @static - * @param {agentInterface.IDecryptFileRequestMessage} m DecryptFileRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DecryptFileRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.filePath != null && Object.hasOwnProperty.call(m, "filePath")) - w.uint32(10).string(m.filePath); - if (m.privateKeyPath != null && Object.hasOwnProperty.call(m, "privateKeyPath")) - w.uint32(18).string(m.privateKeyPath); - if (m.passphrase != null && Object.hasOwnProperty.call(m, "passphrase")) - w.uint32(26).string(m.passphrase); - return w; - }; - - /** - * Encodes the specified DecryptFileRequestMessage message, length delimited. Does not implicitly {@link agentInterface.DecryptFileRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.DecryptFileRequestMessage - * @static - * @param {agentInterface.IDecryptFileRequestMessage} message DecryptFileRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DecryptFileRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DecryptFileRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.DecryptFileRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.DecryptFileRequestMessage} DecryptFileRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DecryptFileRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DecryptFileRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.filePath = r.string(); - break; - case 2: - m.privateKeyPath = r.string(); - break; - case 3: - m.passphrase = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a DecryptFileRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.DecryptFileRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.DecryptFileRequestMessage} DecryptFileRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DecryptFileRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return DecryptFileRequestMessage; - })(); - - agentInterface.DecryptFileResponseMessage = (function() { - - /** - * Properties of a DecryptFileResponseMessage. - * @memberof agentInterface - * @interface IDecryptFileResponseMessage - * @property {string|null} [decryptedPath] DecryptFileResponseMessage decryptedPath - */ - - /** - * Constructs a new DecryptFileResponseMessage. - * @memberof agentInterface - * @classdesc Represents a DecryptFileResponseMessage. - * @implements IDecryptFileResponseMessage - * @constructor - * @param {agentInterface.IDecryptFileResponseMessage=} [p] Properties to set - */ - function DecryptFileResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * DecryptFileResponseMessage decryptedPath. - * @member {string} decryptedPath - * @memberof agentInterface.DecryptFileResponseMessage - * @instance - */ - DecryptFileResponseMessage.prototype.decryptedPath = ""; - - /** - * Creates a new DecryptFileResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.DecryptFileResponseMessage - * @static - * @param {agentInterface.IDecryptFileResponseMessage=} [properties] Properties to set - * @returns {agentInterface.DecryptFileResponseMessage} DecryptFileResponseMessage instance - */ - DecryptFileResponseMessage.create = function create(properties) { - return new DecryptFileResponseMessage(properties); - }; - - /** - * Encodes the specified DecryptFileResponseMessage message. Does not implicitly {@link agentInterface.DecryptFileResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.DecryptFileResponseMessage - * @static - * @param {agentInterface.IDecryptFileResponseMessage} m DecryptFileResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DecryptFileResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.decryptedPath != null && Object.hasOwnProperty.call(m, "decryptedPath")) - w.uint32(10).string(m.decryptedPath); - return w; - }; - - /** - * Encodes the specified DecryptFileResponseMessage message, length delimited. Does not implicitly {@link agentInterface.DecryptFileResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.DecryptFileResponseMessage - * @static - * @param {agentInterface.IDecryptFileResponseMessage} message DecryptFileResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DecryptFileResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DecryptFileResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.DecryptFileResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.DecryptFileResponseMessage} DecryptFileResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DecryptFileResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DecryptFileResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.decryptedPath = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a DecryptFileResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.DecryptFileResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.DecryptFileResponseMessage} DecryptFileResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DecryptFileResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return DecryptFileResponseMessage; - })(); - - agentInterface.ListVaultsRequestMessage = (function() { - - /** - * Properties of a ListVaultsRequestMessage. - * @memberof agentInterface - * @interface IListVaultsRequestMessage - */ - - /** - * Constructs a new ListVaultsRequestMessage. - * @memberof agentInterface - * @classdesc Represents a ListVaultsRequestMessage. - * @implements IListVaultsRequestMessage - * @constructor - * @param {agentInterface.IListVaultsRequestMessage=} [p] Properties to set - */ - function ListVaultsRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * Creates a new ListVaultsRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ListVaultsRequestMessage - * @static - * @param {agentInterface.IListVaultsRequestMessage=} [properties] Properties to set - * @returns {agentInterface.ListVaultsRequestMessage} ListVaultsRequestMessage instance - */ - ListVaultsRequestMessage.create = function create(properties) { - return new ListVaultsRequestMessage(properties); - }; - - /** - * Encodes the specified ListVaultsRequestMessage message. Does not implicitly {@link agentInterface.ListVaultsRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ListVaultsRequestMessage - * @static - * @param {agentInterface.IListVaultsRequestMessage} m ListVaultsRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVaultsRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - return w; - }; - - /** - * Encodes the specified ListVaultsRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ListVaultsRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ListVaultsRequestMessage - * @static - * @param {agentInterface.IListVaultsRequestMessage} message ListVaultsRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVaultsRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListVaultsRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ListVaultsRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ListVaultsRequestMessage} ListVaultsRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVaultsRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListVaultsRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a ListVaultsRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ListVaultsRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ListVaultsRequestMessage} ListVaultsRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVaultsRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ListVaultsRequestMessage; - })(); - - agentInterface.ListVaultsResponseMessage = (function() { - - /** - * Properties of a ListVaultsResponseMessage. - * @memberof agentInterface - * @interface IListVaultsResponseMessage - * @property {Array.|null} [vaultNames] ListVaultsResponseMessage vaultNames - */ - - /** - * Constructs a new ListVaultsResponseMessage. - * @memberof agentInterface - * @classdesc Represents a ListVaultsResponseMessage. - * @implements IListVaultsResponseMessage - * @constructor - * @param {agentInterface.IListVaultsResponseMessage=} [p] Properties to set - */ - function ListVaultsResponseMessage(p) { - this.vaultNames = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * ListVaultsResponseMessage vaultNames. - * @member {Array.} vaultNames - * @memberof agentInterface.ListVaultsResponseMessage - * @instance - */ - ListVaultsResponseMessage.prototype.vaultNames = $util.emptyArray; - - /** - * Creates a new ListVaultsResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ListVaultsResponseMessage - * @static - * @param {agentInterface.IListVaultsResponseMessage=} [properties] Properties to set - * @returns {agentInterface.ListVaultsResponseMessage} ListVaultsResponseMessage instance - */ - ListVaultsResponseMessage.create = function create(properties) { - return new ListVaultsResponseMessage(properties); - }; - - /** - * Encodes the specified ListVaultsResponseMessage message. Does not implicitly {@link agentInterface.ListVaultsResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ListVaultsResponseMessage - * @static - * @param {agentInterface.IListVaultsResponseMessage} m ListVaultsResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVaultsResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.vaultNames != null && m.vaultNames.length) { - for (var i = 0; i < m.vaultNames.length; ++i) - w.uint32(10).string(m.vaultNames[i]); - } - return w; - }; - - /** - * Encodes the specified ListVaultsResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ListVaultsResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ListVaultsResponseMessage - * @static - * @param {agentInterface.IListVaultsResponseMessage} message ListVaultsResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVaultsResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListVaultsResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ListVaultsResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ListVaultsResponseMessage} ListVaultsResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVaultsResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListVaultsResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.vaultNames && m.vaultNames.length)) - m.vaultNames = []; - m.vaultNames.push(r.string()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a ListVaultsResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ListVaultsResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ListVaultsResponseMessage} ListVaultsResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVaultsResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ListVaultsResponseMessage; - })(); - - agentInterface.ScanVaultNamesRequestMessage = (function() { - - /** - * Properties of a ScanVaultNamesRequestMessage. - * @memberof agentInterface - * @interface IScanVaultNamesRequestMessage - * @property {string|null} [publicKey] ScanVaultNamesRequestMessage publicKey - */ - - /** - * Constructs a new ScanVaultNamesRequestMessage. - * @memberof agentInterface - * @classdesc Represents a ScanVaultNamesRequestMessage. - * @implements IScanVaultNamesRequestMessage - * @constructor - * @param {agentInterface.IScanVaultNamesRequestMessage=} [p] Properties to set - */ - function ScanVaultNamesRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * ScanVaultNamesRequestMessage publicKey. - * @member {string} publicKey - * @memberof agentInterface.ScanVaultNamesRequestMessage - * @instance - */ - ScanVaultNamesRequestMessage.prototype.publicKey = ""; - - /** - * Creates a new ScanVaultNamesRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ScanVaultNamesRequestMessage - * @static - * @param {agentInterface.IScanVaultNamesRequestMessage=} [properties] Properties to set - * @returns {agentInterface.ScanVaultNamesRequestMessage} ScanVaultNamesRequestMessage instance - */ - ScanVaultNamesRequestMessage.create = function create(properties) { - return new ScanVaultNamesRequestMessage(properties); - }; - - /** - * Encodes the specified ScanVaultNamesRequestMessage message. Does not implicitly {@link agentInterface.ScanVaultNamesRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ScanVaultNamesRequestMessage - * @static - * @param {agentInterface.IScanVaultNamesRequestMessage} m ScanVaultNamesRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScanVaultNamesRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); - return w; - }; - - /** - * Encodes the specified ScanVaultNamesRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ScanVaultNamesRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ScanVaultNamesRequestMessage - * @static - * @param {agentInterface.IScanVaultNamesRequestMessage} message ScanVaultNamesRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScanVaultNamesRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ScanVaultNamesRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ScanVaultNamesRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ScanVaultNamesRequestMessage} ScanVaultNamesRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScanVaultNamesRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ScanVaultNamesRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.publicKey = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a ScanVaultNamesRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ScanVaultNamesRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ScanVaultNamesRequestMessage} ScanVaultNamesRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScanVaultNamesRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ScanVaultNamesRequestMessage; - })(); - - agentInterface.ScanVaultNamesResponseMessage = (function() { - - /** - * Properties of a ScanVaultNamesResponseMessage. - * @memberof agentInterface - * @interface IScanVaultNamesResponseMessage - * @property {Array.|null} [vaultNames] ScanVaultNamesResponseMessage vaultNames - */ - - /** - * Constructs a new ScanVaultNamesResponseMessage. - * @memberof agentInterface - * @classdesc Represents a ScanVaultNamesResponseMessage. - * @implements IScanVaultNamesResponseMessage - * @constructor - * @param {agentInterface.IScanVaultNamesResponseMessage=} [p] Properties to set - */ - function ScanVaultNamesResponseMessage(p) { - this.vaultNames = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * ScanVaultNamesResponseMessage vaultNames. - * @member {Array.} vaultNames - * @memberof agentInterface.ScanVaultNamesResponseMessage - * @instance - */ - ScanVaultNamesResponseMessage.prototype.vaultNames = $util.emptyArray; - - /** - * Creates a new ScanVaultNamesResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ScanVaultNamesResponseMessage - * @static - * @param {agentInterface.IScanVaultNamesResponseMessage=} [properties] Properties to set - * @returns {agentInterface.ScanVaultNamesResponseMessage} ScanVaultNamesResponseMessage instance - */ - ScanVaultNamesResponseMessage.create = function create(properties) { - return new ScanVaultNamesResponseMessage(properties); - }; - - /** - * Encodes the specified ScanVaultNamesResponseMessage message. Does not implicitly {@link agentInterface.ScanVaultNamesResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ScanVaultNamesResponseMessage - * @static - * @param {agentInterface.IScanVaultNamesResponseMessage} m ScanVaultNamesResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScanVaultNamesResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.vaultNames != null && m.vaultNames.length) { - for (var i = 0; i < m.vaultNames.length; ++i) - w.uint32(10).string(m.vaultNames[i]); - } - return w; - }; - - /** - * Encodes the specified ScanVaultNamesResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ScanVaultNamesResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ScanVaultNamesResponseMessage - * @static - * @param {agentInterface.IScanVaultNamesResponseMessage} message ScanVaultNamesResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScanVaultNamesResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ScanVaultNamesResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ScanVaultNamesResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ScanVaultNamesResponseMessage} ScanVaultNamesResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScanVaultNamesResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ScanVaultNamesResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.vaultNames && m.vaultNames.length)) - m.vaultNames = []; - m.vaultNames.push(r.string()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a ScanVaultNamesResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ScanVaultNamesResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ScanVaultNamesResponseMessage} ScanVaultNamesResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScanVaultNamesResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ScanVaultNamesResponseMessage; - })(); - - agentInterface.NewVaultRequestMessage = (function() { - - /** - * Properties of a NewVaultRequestMessage. - * @memberof agentInterface - * @interface INewVaultRequestMessage - * @property {string|null} [vaultName] NewVaultRequestMessage vaultName - */ - - /** - * Constructs a new NewVaultRequestMessage. - * @memberof agentInterface - * @classdesc Represents a NewVaultRequestMessage. - * @implements INewVaultRequestMessage - * @constructor - * @param {agentInterface.INewVaultRequestMessage=} [p] Properties to set - */ - function NewVaultRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * NewVaultRequestMessage vaultName. - * @member {string} vaultName - * @memberof agentInterface.NewVaultRequestMessage - * @instance - */ - NewVaultRequestMessage.prototype.vaultName = ""; - - /** - * Creates a new NewVaultRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.NewVaultRequestMessage - * @static - * @param {agentInterface.INewVaultRequestMessage=} [properties] Properties to set - * @returns {agentInterface.NewVaultRequestMessage} NewVaultRequestMessage instance - */ - NewVaultRequestMessage.create = function create(properties) { - return new NewVaultRequestMessage(properties); - }; - - /** - * Encodes the specified NewVaultRequestMessage message. Does not implicitly {@link agentInterface.NewVaultRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.NewVaultRequestMessage - * @static - * @param {agentInterface.INewVaultRequestMessage} m NewVaultRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NewVaultRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.vaultName != null && Object.hasOwnProperty.call(m, "vaultName")) - w.uint32(10).string(m.vaultName); - return w; - }; - - /** - * Encodes the specified NewVaultRequestMessage message, length delimited. Does not implicitly {@link agentInterface.NewVaultRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.NewVaultRequestMessage - * @static - * @param {agentInterface.INewVaultRequestMessage} message NewVaultRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NewVaultRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NewVaultRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.NewVaultRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.NewVaultRequestMessage} NewVaultRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NewVaultRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.NewVaultRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.vaultName = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a NewVaultRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.NewVaultRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.NewVaultRequestMessage} NewVaultRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NewVaultRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return NewVaultRequestMessage; - })(); - - agentInterface.NewVaultResponseMessage = (function() { - - /** - * Properties of a NewVaultResponseMessage. - * @memberof agentInterface - * @interface INewVaultResponseMessage - * @property {boolean|null} [successful] NewVaultResponseMessage successful - */ - - /** - * Constructs a new NewVaultResponseMessage. - * @memberof agentInterface - * @classdesc Represents a NewVaultResponseMessage. - * @implements INewVaultResponseMessage - * @constructor - * @param {agentInterface.INewVaultResponseMessage=} [p] Properties to set - */ - function NewVaultResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * NewVaultResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.NewVaultResponseMessage - * @instance - */ - NewVaultResponseMessage.prototype.successful = false; - - /** - * Creates a new NewVaultResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.NewVaultResponseMessage - * @static - * @param {agentInterface.INewVaultResponseMessage=} [properties] Properties to set - * @returns {agentInterface.NewVaultResponseMessage} NewVaultResponseMessage instance - */ - NewVaultResponseMessage.create = function create(properties) { - return new NewVaultResponseMessage(properties); - }; - - /** - * Encodes the specified NewVaultResponseMessage message. Does not implicitly {@link agentInterface.NewVaultResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.NewVaultResponseMessage - * @static - * @param {agentInterface.INewVaultResponseMessage} m NewVaultResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NewVaultResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified NewVaultResponseMessage message, length delimited. Does not implicitly {@link agentInterface.NewVaultResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.NewVaultResponseMessage - * @static - * @param {agentInterface.INewVaultResponseMessage} message NewVaultResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NewVaultResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NewVaultResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.NewVaultResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.NewVaultResponseMessage} NewVaultResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NewVaultResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.NewVaultResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a NewVaultResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.NewVaultResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.NewVaultResponseMessage} NewVaultResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NewVaultResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return NewVaultResponseMessage; - })(); - - agentInterface.PullVaultRequestMessage = (function() { - - /** - * Properties of a PullVaultRequestMessage. - * @memberof agentInterface - * @interface IPullVaultRequestMessage - * @property {string|null} [vaultName] PullVaultRequestMessage vaultName - * @property {string|null} [publicKey] PullVaultRequestMessage publicKey - */ - - /** - * Constructs a new PullVaultRequestMessage. - * @memberof agentInterface - * @classdesc Represents a PullVaultRequestMessage. - * @implements IPullVaultRequestMessage - * @constructor - * @param {agentInterface.IPullVaultRequestMessage=} [p] Properties to set - */ - function PullVaultRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * PullVaultRequestMessage vaultName. - * @member {string} vaultName - * @memberof agentInterface.PullVaultRequestMessage - * @instance - */ - PullVaultRequestMessage.prototype.vaultName = ""; - - /** - * PullVaultRequestMessage publicKey. - * @member {string} publicKey - * @memberof agentInterface.PullVaultRequestMessage - * @instance - */ - PullVaultRequestMessage.prototype.publicKey = ""; - - /** - * Creates a new PullVaultRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.PullVaultRequestMessage - * @static - * @param {agentInterface.IPullVaultRequestMessage=} [properties] Properties to set - * @returns {agentInterface.PullVaultRequestMessage} PullVaultRequestMessage instance - */ - PullVaultRequestMessage.create = function create(properties) { - return new PullVaultRequestMessage(properties); - }; - - /** - * Encodes the specified PullVaultRequestMessage message. Does not implicitly {@link agentInterface.PullVaultRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.PullVaultRequestMessage - * @static - * @param {agentInterface.IPullVaultRequestMessage} m PullVaultRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PullVaultRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.vaultName != null && Object.hasOwnProperty.call(m, "vaultName")) - w.uint32(10).string(m.vaultName); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(18).string(m.publicKey); - return w; - }; - - /** - * Encodes the specified PullVaultRequestMessage message, length delimited. Does not implicitly {@link agentInterface.PullVaultRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.PullVaultRequestMessage - * @static - * @param {agentInterface.IPullVaultRequestMessage} message PullVaultRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PullVaultRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PullVaultRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.PullVaultRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.PullVaultRequestMessage} PullVaultRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PullVaultRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.PullVaultRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.vaultName = r.string(); - break; - case 2: - m.publicKey = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a PullVaultRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.PullVaultRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.PullVaultRequestMessage} PullVaultRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PullVaultRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return PullVaultRequestMessage; - })(); - - agentInterface.PullVaultResponseMessage = (function() { - - /** - * Properties of a PullVaultResponseMessage. - * @memberof agentInterface - * @interface IPullVaultResponseMessage - * @property {boolean|null} [successful] PullVaultResponseMessage successful - */ - - /** - * Constructs a new PullVaultResponseMessage. - * @memberof agentInterface - * @classdesc Represents a PullVaultResponseMessage. - * @implements IPullVaultResponseMessage - * @constructor - * @param {agentInterface.IPullVaultResponseMessage=} [p] Properties to set - */ - function PullVaultResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * PullVaultResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.PullVaultResponseMessage - * @instance - */ - PullVaultResponseMessage.prototype.successful = false; - - /** - * Creates a new PullVaultResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.PullVaultResponseMessage - * @static - * @param {agentInterface.IPullVaultResponseMessage=} [properties] Properties to set - * @returns {agentInterface.PullVaultResponseMessage} PullVaultResponseMessage instance - */ - PullVaultResponseMessage.create = function create(properties) { - return new PullVaultResponseMessage(properties); - }; - - /** - * Encodes the specified PullVaultResponseMessage message. Does not implicitly {@link agentInterface.PullVaultResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.PullVaultResponseMessage - * @static - * @param {agentInterface.IPullVaultResponseMessage} m PullVaultResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PullVaultResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified PullVaultResponseMessage message, length delimited. Does not implicitly {@link agentInterface.PullVaultResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.PullVaultResponseMessage - * @static - * @param {agentInterface.IPullVaultResponseMessage} message PullVaultResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PullVaultResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PullVaultResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.PullVaultResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.PullVaultResponseMessage} PullVaultResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PullVaultResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.PullVaultResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a PullVaultResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.PullVaultResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.PullVaultResponseMessage} PullVaultResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PullVaultResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return PullVaultResponseMessage; - })(); - - agentInterface.DestroyVaultRequestMessage = (function() { - - /** - * Properties of a DestroyVaultRequestMessage. - * @memberof agentInterface - * @interface IDestroyVaultRequestMessage - * @property {string|null} [vaultName] DestroyVaultRequestMessage vaultName - */ - - /** - * Constructs a new DestroyVaultRequestMessage. - * @memberof agentInterface - * @classdesc Represents a DestroyVaultRequestMessage. - * @implements IDestroyVaultRequestMessage - * @constructor - * @param {agentInterface.IDestroyVaultRequestMessage=} [p] Properties to set - */ - function DestroyVaultRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * DestroyVaultRequestMessage vaultName. - * @member {string} vaultName - * @memberof agentInterface.DestroyVaultRequestMessage - * @instance - */ - DestroyVaultRequestMessage.prototype.vaultName = ""; - - /** - * Creates a new DestroyVaultRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.DestroyVaultRequestMessage - * @static - * @param {agentInterface.IDestroyVaultRequestMessage=} [properties] Properties to set - * @returns {agentInterface.DestroyVaultRequestMessage} DestroyVaultRequestMessage instance - */ - DestroyVaultRequestMessage.create = function create(properties) { - return new DestroyVaultRequestMessage(properties); - }; - - /** - * Encodes the specified DestroyVaultRequestMessage message. Does not implicitly {@link agentInterface.DestroyVaultRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.DestroyVaultRequestMessage - * @static - * @param {agentInterface.IDestroyVaultRequestMessage} m DestroyVaultRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DestroyVaultRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.vaultName != null && Object.hasOwnProperty.call(m, "vaultName")) - w.uint32(10).string(m.vaultName); - return w; - }; - - /** - * Encodes the specified DestroyVaultRequestMessage message, length delimited. Does not implicitly {@link agentInterface.DestroyVaultRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.DestroyVaultRequestMessage - * @static - * @param {agentInterface.IDestroyVaultRequestMessage} message DestroyVaultRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DestroyVaultRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DestroyVaultRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.DestroyVaultRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.DestroyVaultRequestMessage} DestroyVaultRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DestroyVaultRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DestroyVaultRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.vaultName = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a DestroyVaultRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.DestroyVaultRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.DestroyVaultRequestMessage} DestroyVaultRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DestroyVaultRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return DestroyVaultRequestMessage; - })(); - - agentInterface.DestroyVaultResponseMessage = (function() { - - /** - * Properties of a DestroyVaultResponseMessage. - * @memberof agentInterface - * @interface IDestroyVaultResponseMessage - * @property {boolean|null} [successful] DestroyVaultResponseMessage successful - */ - - /** - * Constructs a new DestroyVaultResponseMessage. - * @memberof agentInterface - * @classdesc Represents a DestroyVaultResponseMessage. - * @implements IDestroyVaultResponseMessage - * @constructor - * @param {agentInterface.IDestroyVaultResponseMessage=} [p] Properties to set - */ - function DestroyVaultResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * DestroyVaultResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.DestroyVaultResponseMessage - * @instance - */ - DestroyVaultResponseMessage.prototype.successful = false; - - /** - * Creates a new DestroyVaultResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.DestroyVaultResponseMessage - * @static - * @param {agentInterface.IDestroyVaultResponseMessage=} [properties] Properties to set - * @returns {agentInterface.DestroyVaultResponseMessage} DestroyVaultResponseMessage instance - */ - DestroyVaultResponseMessage.create = function create(properties) { - return new DestroyVaultResponseMessage(properties); - }; - - /** - * Encodes the specified DestroyVaultResponseMessage message. Does not implicitly {@link agentInterface.DestroyVaultResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.DestroyVaultResponseMessage - * @static - * @param {agentInterface.IDestroyVaultResponseMessage} m DestroyVaultResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DestroyVaultResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified DestroyVaultResponseMessage message, length delimited. Does not implicitly {@link agentInterface.DestroyVaultResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.DestroyVaultResponseMessage - * @static - * @param {agentInterface.IDestroyVaultResponseMessage} message DestroyVaultResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DestroyVaultResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DestroyVaultResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.DestroyVaultResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.DestroyVaultResponseMessage} DestroyVaultResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DestroyVaultResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DestroyVaultResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a DestroyVaultResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.DestroyVaultResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.DestroyVaultResponseMessage} DestroyVaultResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DestroyVaultResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return DestroyVaultResponseMessage; - })(); - - agentInterface.ListSecretsRequestMessage = (function() { - - /** - * Properties of a ListSecretsRequestMessage. - * @memberof agentInterface - * @interface IListSecretsRequestMessage - * @property {string|null} [vaultName] ListSecretsRequestMessage vaultName - */ - - /** - * Constructs a new ListSecretsRequestMessage. - * @memberof agentInterface - * @classdesc Represents a ListSecretsRequestMessage. - * @implements IListSecretsRequestMessage - * @constructor - * @param {agentInterface.IListSecretsRequestMessage=} [p] Properties to set - */ - function ListSecretsRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * ListSecretsRequestMessage vaultName. - * @member {string} vaultName - * @memberof agentInterface.ListSecretsRequestMessage - * @instance - */ - ListSecretsRequestMessage.prototype.vaultName = ""; - - /** - * Creates a new ListSecretsRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ListSecretsRequestMessage - * @static - * @param {agentInterface.IListSecretsRequestMessage=} [properties] Properties to set - * @returns {agentInterface.ListSecretsRequestMessage} ListSecretsRequestMessage instance - */ - ListSecretsRequestMessage.create = function create(properties) { - return new ListSecretsRequestMessage(properties); - }; - - /** - * Encodes the specified ListSecretsRequestMessage message. Does not implicitly {@link agentInterface.ListSecretsRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ListSecretsRequestMessage - * @static - * @param {agentInterface.IListSecretsRequestMessage} m ListSecretsRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSecretsRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.vaultName != null && Object.hasOwnProperty.call(m, "vaultName")) - w.uint32(10).string(m.vaultName); - return w; - }; - - /** - * Encodes the specified ListSecretsRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ListSecretsRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ListSecretsRequestMessage - * @static - * @param {agentInterface.IListSecretsRequestMessage} message ListSecretsRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSecretsRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListSecretsRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ListSecretsRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ListSecretsRequestMessage} ListSecretsRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSecretsRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListSecretsRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.vaultName = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a ListSecretsRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ListSecretsRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ListSecretsRequestMessage} ListSecretsRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSecretsRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ListSecretsRequestMessage; - })(); - - agentInterface.ListSecretsResponseMessage = (function() { - - /** - * Properties of a ListSecretsResponseMessage. - * @memberof agentInterface - * @interface IListSecretsResponseMessage - * @property {Array.|null} [secretNames] ListSecretsResponseMessage secretNames - */ - - /** - * Constructs a new ListSecretsResponseMessage. - * @memberof agentInterface - * @classdesc Represents a ListSecretsResponseMessage. - * @implements IListSecretsResponseMessage - * @constructor - * @param {agentInterface.IListSecretsResponseMessage=} [p] Properties to set - */ - function ListSecretsResponseMessage(p) { - this.secretNames = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * ListSecretsResponseMessage secretNames. - * @member {Array.} secretNames - * @memberof agentInterface.ListSecretsResponseMessage - * @instance - */ - ListSecretsResponseMessage.prototype.secretNames = $util.emptyArray; - - /** - * Creates a new ListSecretsResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ListSecretsResponseMessage - * @static - * @param {agentInterface.IListSecretsResponseMessage=} [properties] Properties to set - * @returns {agentInterface.ListSecretsResponseMessage} ListSecretsResponseMessage instance - */ - ListSecretsResponseMessage.create = function create(properties) { - return new ListSecretsResponseMessage(properties); - }; - - /** - * Encodes the specified ListSecretsResponseMessage message. Does not implicitly {@link agentInterface.ListSecretsResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ListSecretsResponseMessage - * @static - * @param {agentInterface.IListSecretsResponseMessage} m ListSecretsResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSecretsResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.secretNames != null && m.secretNames.length) { - for (var i = 0; i < m.secretNames.length; ++i) - w.uint32(10).string(m.secretNames[i]); - } - return w; - }; - - /** - * Encodes the specified ListSecretsResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ListSecretsResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ListSecretsResponseMessage - * @static - * @param {agentInterface.IListSecretsResponseMessage} message ListSecretsResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSecretsResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListSecretsResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ListSecretsResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ListSecretsResponseMessage} ListSecretsResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSecretsResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListSecretsResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.secretNames && m.secretNames.length)) - m.secretNames = []; - m.secretNames.push(r.string()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a ListSecretsResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ListSecretsResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ListSecretsResponseMessage} ListSecretsResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSecretsResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ListSecretsResponseMessage; - })(); - - agentInterface.CreateSecretRequestMessage = (function() { - - /** - * Properties of a CreateSecretRequestMessage. - * @memberof agentInterface - * @interface ICreateSecretRequestMessage - * @property {string|null} [vaultName] CreateSecretRequestMessage vaultName - * @property {string|null} [secretName] CreateSecretRequestMessage secretName - * @property {string|null} [secretPath] CreateSecretRequestMessage secretPath - * @property {Uint8Array|null} [secretContent] CreateSecretRequestMessage secretContent - */ - - /** - * Constructs a new CreateSecretRequestMessage. - * @memberof agentInterface - * @classdesc Represents a CreateSecretRequestMessage. - * @implements ICreateSecretRequestMessage - * @constructor - * @param {agentInterface.ICreateSecretRequestMessage=} [p] Properties to set - */ - function CreateSecretRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * CreateSecretRequestMessage vaultName. - * @member {string} vaultName - * @memberof agentInterface.CreateSecretRequestMessage - * @instance - */ - CreateSecretRequestMessage.prototype.vaultName = ""; - - /** - * CreateSecretRequestMessage secretName. - * @member {string} secretName - * @memberof agentInterface.CreateSecretRequestMessage - * @instance - */ - CreateSecretRequestMessage.prototype.secretName = ""; - - /** - * CreateSecretRequestMessage secretPath. - * @member {string} secretPath - * @memberof agentInterface.CreateSecretRequestMessage - * @instance - */ - CreateSecretRequestMessage.prototype.secretPath = ""; - - /** - * CreateSecretRequestMessage secretContent. - * @member {Uint8Array} secretContent - * @memberof agentInterface.CreateSecretRequestMessage - * @instance - */ - CreateSecretRequestMessage.prototype.secretContent = $util.newBuffer([]); - - /** - * Creates a new CreateSecretRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.CreateSecretRequestMessage - * @static - * @param {agentInterface.ICreateSecretRequestMessage=} [properties] Properties to set - * @returns {agentInterface.CreateSecretRequestMessage} CreateSecretRequestMessage instance - */ - CreateSecretRequestMessage.create = function create(properties) { - return new CreateSecretRequestMessage(properties); - }; - - /** - * Encodes the specified CreateSecretRequestMessage message. Does not implicitly {@link agentInterface.CreateSecretRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.CreateSecretRequestMessage - * @static - * @param {agentInterface.ICreateSecretRequestMessage} m CreateSecretRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateSecretRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.vaultName != null && Object.hasOwnProperty.call(m, "vaultName")) - w.uint32(10).string(m.vaultName); - if (m.secretName != null && Object.hasOwnProperty.call(m, "secretName")) - w.uint32(18).string(m.secretName); - if (m.secretPath != null && Object.hasOwnProperty.call(m, "secretPath")) - w.uint32(26).string(m.secretPath); - if (m.secretContent != null && Object.hasOwnProperty.call(m, "secretContent")) - w.uint32(34).bytes(m.secretContent); - return w; - }; - - /** - * Encodes the specified CreateSecretRequestMessage message, length delimited. Does not implicitly {@link agentInterface.CreateSecretRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.CreateSecretRequestMessage - * @static - * @param {agentInterface.ICreateSecretRequestMessage} message CreateSecretRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateSecretRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateSecretRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.CreateSecretRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.CreateSecretRequestMessage} CreateSecretRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateSecretRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.CreateSecretRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.vaultName = r.string(); - break; - case 2: - m.secretName = r.string(); - break; - case 3: - m.secretPath = r.string(); - break; - case 4: - m.secretContent = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a CreateSecretRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.CreateSecretRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.CreateSecretRequestMessage} CreateSecretRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateSecretRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return CreateSecretRequestMessage; - })(); - - agentInterface.CreateSecretResponseMessage = (function() { - - /** - * Properties of a CreateSecretResponseMessage. - * @memberof agentInterface - * @interface ICreateSecretResponseMessage - * @property {boolean|null} [successful] CreateSecretResponseMessage successful - */ - - /** - * Constructs a new CreateSecretResponseMessage. - * @memberof agentInterface - * @classdesc Represents a CreateSecretResponseMessage. - * @implements ICreateSecretResponseMessage - * @constructor - * @param {agentInterface.ICreateSecretResponseMessage=} [p] Properties to set - */ - function CreateSecretResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * CreateSecretResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.CreateSecretResponseMessage - * @instance - */ - CreateSecretResponseMessage.prototype.successful = false; - - /** - * Creates a new CreateSecretResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.CreateSecretResponseMessage - * @static - * @param {agentInterface.ICreateSecretResponseMessage=} [properties] Properties to set - * @returns {agentInterface.CreateSecretResponseMessage} CreateSecretResponseMessage instance - */ - CreateSecretResponseMessage.create = function create(properties) { - return new CreateSecretResponseMessage(properties); - }; - - /** - * Encodes the specified CreateSecretResponseMessage message. Does not implicitly {@link agentInterface.CreateSecretResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.CreateSecretResponseMessage - * @static - * @param {agentInterface.ICreateSecretResponseMessage} m CreateSecretResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateSecretResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified CreateSecretResponseMessage message, length delimited. Does not implicitly {@link agentInterface.CreateSecretResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.CreateSecretResponseMessage - * @static - * @param {agentInterface.ICreateSecretResponseMessage} message CreateSecretResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateSecretResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateSecretResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.CreateSecretResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.CreateSecretResponseMessage} CreateSecretResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateSecretResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.CreateSecretResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a CreateSecretResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.CreateSecretResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.CreateSecretResponseMessage} CreateSecretResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateSecretResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return CreateSecretResponseMessage; - })(); - - agentInterface.DestroySecretRequestMessage = (function() { - - /** - * Properties of a DestroySecretRequestMessage. - * @memberof agentInterface - * @interface IDestroySecretRequestMessage - * @property {string|null} [vaultName] DestroySecretRequestMessage vaultName - * @property {string|null} [secretName] DestroySecretRequestMessage secretName - */ - - /** - * Constructs a new DestroySecretRequestMessage. - * @memberof agentInterface - * @classdesc Represents a DestroySecretRequestMessage. - * @implements IDestroySecretRequestMessage - * @constructor - * @param {agentInterface.IDestroySecretRequestMessage=} [p] Properties to set - */ - function DestroySecretRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * DestroySecretRequestMessage vaultName. - * @member {string} vaultName - * @memberof agentInterface.DestroySecretRequestMessage - * @instance - */ - DestroySecretRequestMessage.prototype.vaultName = ""; - - /** - * DestroySecretRequestMessage secretName. - * @member {string} secretName - * @memberof agentInterface.DestroySecretRequestMessage - * @instance - */ - DestroySecretRequestMessage.prototype.secretName = ""; - - /** - * Creates a new DestroySecretRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.DestroySecretRequestMessage - * @static - * @param {agentInterface.IDestroySecretRequestMessage=} [properties] Properties to set - * @returns {agentInterface.DestroySecretRequestMessage} DestroySecretRequestMessage instance - */ - DestroySecretRequestMessage.create = function create(properties) { - return new DestroySecretRequestMessage(properties); - }; - - /** - * Encodes the specified DestroySecretRequestMessage message. Does not implicitly {@link agentInterface.DestroySecretRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.DestroySecretRequestMessage - * @static - * @param {agentInterface.IDestroySecretRequestMessage} m DestroySecretRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DestroySecretRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.vaultName != null && Object.hasOwnProperty.call(m, "vaultName")) - w.uint32(10).string(m.vaultName); - if (m.secretName != null && Object.hasOwnProperty.call(m, "secretName")) - w.uint32(18).string(m.secretName); - return w; - }; - - /** - * Encodes the specified DestroySecretRequestMessage message, length delimited. Does not implicitly {@link agentInterface.DestroySecretRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.DestroySecretRequestMessage - * @static - * @param {agentInterface.IDestroySecretRequestMessage} message DestroySecretRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DestroySecretRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DestroySecretRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.DestroySecretRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.DestroySecretRequestMessage} DestroySecretRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DestroySecretRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DestroySecretRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.vaultName = r.string(); - break; - case 2: - m.secretName = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a DestroySecretRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.DestroySecretRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.DestroySecretRequestMessage} DestroySecretRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DestroySecretRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return DestroySecretRequestMessage; - })(); - - agentInterface.DestroySecretResponseMessage = (function() { - - /** - * Properties of a DestroySecretResponseMessage. - * @memberof agentInterface - * @interface IDestroySecretResponseMessage - * @property {boolean|null} [successful] DestroySecretResponseMessage successful - */ - - /** - * Constructs a new DestroySecretResponseMessage. - * @memberof agentInterface - * @classdesc Represents a DestroySecretResponseMessage. - * @implements IDestroySecretResponseMessage - * @constructor - * @param {agentInterface.IDestroySecretResponseMessage=} [p] Properties to set - */ - function DestroySecretResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * DestroySecretResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.DestroySecretResponseMessage - * @instance - */ - DestroySecretResponseMessage.prototype.successful = false; - - /** - * Creates a new DestroySecretResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.DestroySecretResponseMessage - * @static - * @param {agentInterface.IDestroySecretResponseMessage=} [properties] Properties to set - * @returns {agentInterface.DestroySecretResponseMessage} DestroySecretResponseMessage instance - */ - DestroySecretResponseMessage.create = function create(properties) { - return new DestroySecretResponseMessage(properties); - }; - - /** - * Encodes the specified DestroySecretResponseMessage message. Does not implicitly {@link agentInterface.DestroySecretResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.DestroySecretResponseMessage - * @static - * @param {agentInterface.IDestroySecretResponseMessage} m DestroySecretResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DestroySecretResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified DestroySecretResponseMessage message, length delimited. Does not implicitly {@link agentInterface.DestroySecretResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.DestroySecretResponseMessage - * @static - * @param {agentInterface.IDestroySecretResponseMessage} message DestroySecretResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DestroySecretResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DestroySecretResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.DestroySecretResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.DestroySecretResponseMessage} DestroySecretResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DestroySecretResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DestroySecretResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a DestroySecretResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.DestroySecretResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.DestroySecretResponseMessage} DestroySecretResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DestroySecretResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return DestroySecretResponseMessage; - })(); - - agentInterface.GetSecretRequestMessage = (function() { - - /** - * Properties of a GetSecretRequestMessage. - * @memberof agentInterface - * @interface IGetSecretRequestMessage - * @property {string|null} [vaultName] GetSecretRequestMessage vaultName - * @property {string|null} [secretName] GetSecretRequestMessage secretName - */ - - /** - * Constructs a new GetSecretRequestMessage. - * @memberof agentInterface - * @classdesc Represents a GetSecretRequestMessage. - * @implements IGetSecretRequestMessage - * @constructor - * @param {agentInterface.IGetSecretRequestMessage=} [p] Properties to set - */ - function GetSecretRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * GetSecretRequestMessage vaultName. - * @member {string} vaultName - * @memberof agentInterface.GetSecretRequestMessage - * @instance - */ - GetSecretRequestMessage.prototype.vaultName = ""; - - /** - * GetSecretRequestMessage secretName. - * @member {string} secretName - * @memberof agentInterface.GetSecretRequestMessage - * @instance - */ - GetSecretRequestMessage.prototype.secretName = ""; - - /** - * Creates a new GetSecretRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.GetSecretRequestMessage - * @static - * @param {agentInterface.IGetSecretRequestMessage=} [properties] Properties to set - * @returns {agentInterface.GetSecretRequestMessage} GetSecretRequestMessage instance - */ - GetSecretRequestMessage.create = function create(properties) { - return new GetSecretRequestMessage(properties); - }; - - /** - * Encodes the specified GetSecretRequestMessage message. Does not implicitly {@link agentInterface.GetSecretRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.GetSecretRequestMessage - * @static - * @param {agentInterface.IGetSecretRequestMessage} m GetSecretRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSecretRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.vaultName != null && Object.hasOwnProperty.call(m, "vaultName")) - w.uint32(10).string(m.vaultName); - if (m.secretName != null && Object.hasOwnProperty.call(m, "secretName")) - w.uint32(18).string(m.secretName); - return w; - }; - - /** - * Encodes the specified GetSecretRequestMessage message, length delimited. Does not implicitly {@link agentInterface.GetSecretRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.GetSecretRequestMessage - * @static - * @param {agentInterface.IGetSecretRequestMessage} message GetSecretRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSecretRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetSecretRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.GetSecretRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.GetSecretRequestMessage} GetSecretRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSecretRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.GetSecretRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.vaultName = r.string(); - break; - case 2: - m.secretName = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a GetSecretRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.GetSecretRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.GetSecretRequestMessage} GetSecretRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSecretRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return GetSecretRequestMessage; - })(); - - agentInterface.GetSecretResponseMessage = (function() { - - /** - * Properties of a GetSecretResponseMessage. - * @memberof agentInterface - * @interface IGetSecretResponseMessage - * @property {Uint8Array|null} [secret] GetSecretResponseMessage secret - */ - - /** - * Constructs a new GetSecretResponseMessage. - * @memberof agentInterface - * @classdesc Represents a GetSecretResponseMessage. - * @implements IGetSecretResponseMessage - * @constructor - * @param {agentInterface.IGetSecretResponseMessage=} [p] Properties to set - */ - function GetSecretResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * GetSecretResponseMessage secret. - * @member {Uint8Array} secret - * @memberof agentInterface.GetSecretResponseMessage - * @instance - */ - GetSecretResponseMessage.prototype.secret = $util.newBuffer([]); - - /** - * Creates a new GetSecretResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.GetSecretResponseMessage - * @static - * @param {agentInterface.IGetSecretResponseMessage=} [properties] Properties to set - * @returns {agentInterface.GetSecretResponseMessage} GetSecretResponseMessage instance - */ - GetSecretResponseMessage.create = function create(properties) { - return new GetSecretResponseMessage(properties); - }; - - /** - * Encodes the specified GetSecretResponseMessage message. Does not implicitly {@link agentInterface.GetSecretResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.GetSecretResponseMessage - * @static - * @param {agentInterface.IGetSecretResponseMessage} m GetSecretResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSecretResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.secret != null && Object.hasOwnProperty.call(m, "secret")) - w.uint32(10).bytes(m.secret); - return w; - }; - - /** - * Encodes the specified GetSecretResponseMessage message, length delimited. Does not implicitly {@link agentInterface.GetSecretResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.GetSecretResponseMessage - * @static - * @param {agentInterface.IGetSecretResponseMessage} message GetSecretResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSecretResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetSecretResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.GetSecretResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.GetSecretResponseMessage} GetSecretResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSecretResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.GetSecretResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.secret = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a GetSecretResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.GetSecretResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.GetSecretResponseMessage} GetSecretResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSecretResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return GetSecretResponseMessage; - })(); - - agentInterface.DeriveKeyRequestMessage = (function() { - - /** - * Properties of a DeriveKeyRequestMessage. - * @memberof agentInterface - * @interface IDeriveKeyRequestMessage - * @property {string|null} [vaultName] DeriveKeyRequestMessage vaultName - * @property {string|null} [keyName] DeriveKeyRequestMessage keyName - * @property {string|null} [passphrase] DeriveKeyRequestMessage passphrase - */ - - /** - * Constructs a new DeriveKeyRequestMessage. - * @memberof agentInterface - * @classdesc Represents a DeriveKeyRequestMessage. - * @implements IDeriveKeyRequestMessage - * @constructor - * @param {agentInterface.IDeriveKeyRequestMessage=} [p] Properties to set - */ - function DeriveKeyRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * DeriveKeyRequestMessage vaultName. - * @member {string} vaultName - * @memberof agentInterface.DeriveKeyRequestMessage - * @instance - */ - DeriveKeyRequestMessage.prototype.vaultName = ""; - - /** - * DeriveKeyRequestMessage keyName. - * @member {string} keyName - * @memberof agentInterface.DeriveKeyRequestMessage - * @instance - */ - DeriveKeyRequestMessage.prototype.keyName = ""; - - /** - * DeriveKeyRequestMessage passphrase. - * @member {string} passphrase - * @memberof agentInterface.DeriveKeyRequestMessage - * @instance - */ - DeriveKeyRequestMessage.prototype.passphrase = ""; - - /** - * Creates a new DeriveKeyRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.DeriveKeyRequestMessage - * @static - * @param {agentInterface.IDeriveKeyRequestMessage=} [properties] Properties to set - * @returns {agentInterface.DeriveKeyRequestMessage} DeriveKeyRequestMessage instance - */ - DeriveKeyRequestMessage.create = function create(properties) { - return new DeriveKeyRequestMessage(properties); - }; - - /** - * Encodes the specified DeriveKeyRequestMessage message. Does not implicitly {@link agentInterface.DeriveKeyRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.DeriveKeyRequestMessage - * @static - * @param {agentInterface.IDeriveKeyRequestMessage} m DeriveKeyRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeriveKeyRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.vaultName != null && Object.hasOwnProperty.call(m, "vaultName")) - w.uint32(10).string(m.vaultName); - if (m.keyName != null && Object.hasOwnProperty.call(m, "keyName")) - w.uint32(18).string(m.keyName); - if (m.passphrase != null && Object.hasOwnProperty.call(m, "passphrase")) - w.uint32(26).string(m.passphrase); - return w; - }; - - /** - * Encodes the specified DeriveKeyRequestMessage message, length delimited. Does not implicitly {@link agentInterface.DeriveKeyRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.DeriveKeyRequestMessage - * @static - * @param {agentInterface.IDeriveKeyRequestMessage} message DeriveKeyRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeriveKeyRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeriveKeyRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.DeriveKeyRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.DeriveKeyRequestMessage} DeriveKeyRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeriveKeyRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DeriveKeyRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.vaultName = r.string(); - break; - case 2: - m.keyName = r.string(); - break; - case 3: - m.passphrase = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a DeriveKeyRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.DeriveKeyRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.DeriveKeyRequestMessage} DeriveKeyRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeriveKeyRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return DeriveKeyRequestMessage; - })(); - - agentInterface.DeriveKeyResponseMessage = (function() { - - /** - * Properties of a DeriveKeyResponseMessage. - * @memberof agentInterface - * @interface IDeriveKeyResponseMessage - * @property {boolean|null} [successful] DeriveKeyResponseMessage successful - */ - - /** - * Constructs a new DeriveKeyResponseMessage. - * @memberof agentInterface - * @classdesc Represents a DeriveKeyResponseMessage. - * @implements IDeriveKeyResponseMessage - * @constructor - * @param {agentInterface.IDeriveKeyResponseMessage=} [p] Properties to set - */ - function DeriveKeyResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * DeriveKeyResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.DeriveKeyResponseMessage - * @instance - */ - DeriveKeyResponseMessage.prototype.successful = false; - - /** - * Creates a new DeriveKeyResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.DeriveKeyResponseMessage - * @static - * @param {agentInterface.IDeriveKeyResponseMessage=} [properties] Properties to set - * @returns {agentInterface.DeriveKeyResponseMessage} DeriveKeyResponseMessage instance - */ - DeriveKeyResponseMessage.create = function create(properties) { - return new DeriveKeyResponseMessage(properties); - }; - - /** - * Encodes the specified DeriveKeyResponseMessage message. Does not implicitly {@link agentInterface.DeriveKeyResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.DeriveKeyResponseMessage - * @static - * @param {agentInterface.IDeriveKeyResponseMessage} m DeriveKeyResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeriveKeyResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified DeriveKeyResponseMessage message, length delimited. Does not implicitly {@link agentInterface.DeriveKeyResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.DeriveKeyResponseMessage - * @static - * @param {agentInterface.IDeriveKeyResponseMessage} message DeriveKeyResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeriveKeyResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeriveKeyResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.DeriveKeyResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.DeriveKeyResponseMessage} DeriveKeyResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeriveKeyResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DeriveKeyResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a DeriveKeyResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.DeriveKeyResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.DeriveKeyResponseMessage} DeriveKeyResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeriveKeyResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return DeriveKeyResponseMessage; - })(); - - agentInterface.ListKeysRequestMessage = (function() { - - /** - * Properties of a ListKeysRequestMessage. - * @memberof agentInterface - * @interface IListKeysRequestMessage - */ - - /** - * Constructs a new ListKeysRequestMessage. - * @memberof agentInterface - * @classdesc Represents a ListKeysRequestMessage. - * @implements IListKeysRequestMessage - * @constructor - * @param {agentInterface.IListKeysRequestMessage=} [p] Properties to set - */ - function ListKeysRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * Creates a new ListKeysRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ListKeysRequestMessage - * @static - * @param {agentInterface.IListKeysRequestMessage=} [properties] Properties to set - * @returns {agentInterface.ListKeysRequestMessage} ListKeysRequestMessage instance - */ - ListKeysRequestMessage.create = function create(properties) { - return new ListKeysRequestMessage(properties); - }; - - /** - * Encodes the specified ListKeysRequestMessage message. Does not implicitly {@link agentInterface.ListKeysRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ListKeysRequestMessage - * @static - * @param {agentInterface.IListKeysRequestMessage} m ListKeysRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListKeysRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - return w; - }; - - /** - * Encodes the specified ListKeysRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ListKeysRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ListKeysRequestMessage - * @static - * @param {agentInterface.IListKeysRequestMessage} message ListKeysRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListKeysRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListKeysRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ListKeysRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ListKeysRequestMessage} ListKeysRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListKeysRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListKeysRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a ListKeysRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ListKeysRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ListKeysRequestMessage} ListKeysRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListKeysRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ListKeysRequestMessage; - })(); - - agentInterface.ListKeysResponseMessage = (function() { - - /** - * Properties of a ListKeysResponseMessage. - * @memberof agentInterface - * @interface IListKeysResponseMessage - * @property {Array.|null} [keyNames] ListKeysResponseMessage keyNames - */ - - /** - * Constructs a new ListKeysResponseMessage. - * @memberof agentInterface - * @classdesc Represents a ListKeysResponseMessage. - * @implements IListKeysResponseMessage - * @constructor - * @param {agentInterface.IListKeysResponseMessage=} [p] Properties to set - */ - function ListKeysResponseMessage(p) { - this.keyNames = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * ListKeysResponseMessage keyNames. - * @member {Array.} keyNames - * @memberof agentInterface.ListKeysResponseMessage - * @instance - */ - ListKeysResponseMessage.prototype.keyNames = $util.emptyArray; - - /** - * Creates a new ListKeysResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ListKeysResponseMessage - * @static - * @param {agentInterface.IListKeysResponseMessage=} [properties] Properties to set - * @returns {agentInterface.ListKeysResponseMessage} ListKeysResponseMessage instance - */ - ListKeysResponseMessage.create = function create(properties) { - return new ListKeysResponseMessage(properties); - }; - - /** - * Encodes the specified ListKeysResponseMessage message. Does not implicitly {@link agentInterface.ListKeysResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ListKeysResponseMessage - * @static - * @param {agentInterface.IListKeysResponseMessage} m ListKeysResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListKeysResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.keyNames != null && m.keyNames.length) { - for (var i = 0; i < m.keyNames.length; ++i) - w.uint32(10).string(m.keyNames[i]); - } - return w; - }; - - /** - * Encodes the specified ListKeysResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ListKeysResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ListKeysResponseMessage - * @static - * @param {agentInterface.IListKeysResponseMessage} message ListKeysResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListKeysResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListKeysResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ListKeysResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ListKeysResponseMessage} ListKeysResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListKeysResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListKeysResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.keyNames && m.keyNames.length)) - m.keyNames = []; - m.keyNames.push(r.string()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a ListKeysResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ListKeysResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ListKeysResponseMessage} ListKeysResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListKeysResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ListKeysResponseMessage; - })(); - - agentInterface.GetKeyRequestMessage = (function() { - - /** - * Properties of a GetKeyRequestMessage. - * @memberof agentInterface - * @interface IGetKeyRequestMessage - * @property {string|null} [keyName] GetKeyRequestMessage keyName - */ - - /** - * Constructs a new GetKeyRequestMessage. - * @memberof agentInterface - * @classdesc Represents a GetKeyRequestMessage. - * @implements IGetKeyRequestMessage - * @constructor - * @param {agentInterface.IGetKeyRequestMessage=} [p] Properties to set - */ - function GetKeyRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * GetKeyRequestMessage keyName. - * @member {string} keyName - * @memberof agentInterface.GetKeyRequestMessage - * @instance - */ - GetKeyRequestMessage.prototype.keyName = ""; - - /** - * Creates a new GetKeyRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.GetKeyRequestMessage - * @static - * @param {agentInterface.IGetKeyRequestMessage=} [properties] Properties to set - * @returns {agentInterface.GetKeyRequestMessage} GetKeyRequestMessage instance - */ - GetKeyRequestMessage.create = function create(properties) { - return new GetKeyRequestMessage(properties); - }; - - /** - * Encodes the specified GetKeyRequestMessage message. Does not implicitly {@link agentInterface.GetKeyRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.GetKeyRequestMessage - * @static - * @param {agentInterface.IGetKeyRequestMessage} m GetKeyRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetKeyRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.keyName != null && Object.hasOwnProperty.call(m, "keyName")) - w.uint32(10).string(m.keyName); - return w; - }; - - /** - * Encodes the specified GetKeyRequestMessage message, length delimited. Does not implicitly {@link agentInterface.GetKeyRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.GetKeyRequestMessage - * @static - * @param {agentInterface.IGetKeyRequestMessage} message GetKeyRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetKeyRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetKeyRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.GetKeyRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.GetKeyRequestMessage} GetKeyRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetKeyRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.GetKeyRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.keyName = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a GetKeyRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.GetKeyRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.GetKeyRequestMessage} GetKeyRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetKeyRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return GetKeyRequestMessage; - })(); - - agentInterface.GetKeyResponseMessage = (function() { - - /** - * Properties of a GetKeyResponseMessage. - * @memberof agentInterface - * @interface IGetKeyResponseMessage - * @property {string|null} [keyName] GetKeyResponseMessage keyName - * @property {string|null} [keyContent] GetKeyResponseMessage keyContent - */ - - /** - * Constructs a new GetKeyResponseMessage. - * @memberof agentInterface - * @classdesc Represents a GetKeyResponseMessage. - * @implements IGetKeyResponseMessage - * @constructor - * @param {agentInterface.IGetKeyResponseMessage=} [p] Properties to set - */ - function GetKeyResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * GetKeyResponseMessage keyName. - * @member {string} keyName - * @memberof agentInterface.GetKeyResponseMessage - * @instance - */ - GetKeyResponseMessage.prototype.keyName = ""; - - /** - * GetKeyResponseMessage keyContent. - * @member {string} keyContent - * @memberof agentInterface.GetKeyResponseMessage - * @instance - */ - GetKeyResponseMessage.prototype.keyContent = ""; - - /** - * Creates a new GetKeyResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.GetKeyResponseMessage - * @static - * @param {agentInterface.IGetKeyResponseMessage=} [properties] Properties to set - * @returns {agentInterface.GetKeyResponseMessage} GetKeyResponseMessage instance - */ - GetKeyResponseMessage.create = function create(properties) { - return new GetKeyResponseMessage(properties); - }; - - /** - * Encodes the specified GetKeyResponseMessage message. Does not implicitly {@link agentInterface.GetKeyResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.GetKeyResponseMessage - * @static - * @param {agentInterface.IGetKeyResponseMessage} m GetKeyResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetKeyResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.keyName != null && Object.hasOwnProperty.call(m, "keyName")) - w.uint32(10).string(m.keyName); - if (m.keyContent != null && Object.hasOwnProperty.call(m, "keyContent")) - w.uint32(18).string(m.keyContent); - return w; - }; - - /** - * Encodes the specified GetKeyResponseMessage message, length delimited. Does not implicitly {@link agentInterface.GetKeyResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.GetKeyResponseMessage - * @static - * @param {agentInterface.IGetKeyResponseMessage} message GetKeyResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetKeyResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetKeyResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.GetKeyResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.GetKeyResponseMessage} GetKeyResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetKeyResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.GetKeyResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.keyName = r.string(); - break; - case 2: - m.keyContent = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a GetKeyResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.GetKeyResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.GetKeyResponseMessage} GetKeyResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetKeyResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return GetKeyResponseMessage; - })(); - - agentInterface.GetPrimaryKeyPairRequestMessage = (function() { - - /** - * Properties of a GetPrimaryKeyPairRequestMessage. - * @memberof agentInterface - * @interface IGetPrimaryKeyPairRequestMessage - * @property {boolean|null} [includePrivateKey] GetPrimaryKeyPairRequestMessage includePrivateKey - */ - - /** - * Constructs a new GetPrimaryKeyPairRequestMessage. - * @memberof agentInterface - * @classdesc Represents a GetPrimaryKeyPairRequestMessage. - * @implements IGetPrimaryKeyPairRequestMessage - * @constructor - * @param {agentInterface.IGetPrimaryKeyPairRequestMessage=} [p] Properties to set - */ - function GetPrimaryKeyPairRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * GetPrimaryKeyPairRequestMessage includePrivateKey. - * @member {boolean} includePrivateKey - * @memberof agentInterface.GetPrimaryKeyPairRequestMessage - * @instance - */ - GetPrimaryKeyPairRequestMessage.prototype.includePrivateKey = false; - - /** - * Creates a new GetPrimaryKeyPairRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.GetPrimaryKeyPairRequestMessage - * @static - * @param {agentInterface.IGetPrimaryKeyPairRequestMessage=} [properties] Properties to set - * @returns {agentInterface.GetPrimaryKeyPairRequestMessage} GetPrimaryKeyPairRequestMessage instance - */ - GetPrimaryKeyPairRequestMessage.create = function create(properties) { - return new GetPrimaryKeyPairRequestMessage(properties); - }; - - /** - * Encodes the specified GetPrimaryKeyPairRequestMessage message. Does not implicitly {@link agentInterface.GetPrimaryKeyPairRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.GetPrimaryKeyPairRequestMessage - * @static - * @param {agentInterface.IGetPrimaryKeyPairRequestMessage} m GetPrimaryKeyPairRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPrimaryKeyPairRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.includePrivateKey != null && Object.hasOwnProperty.call(m, "includePrivateKey")) - w.uint32(8).bool(m.includePrivateKey); - return w; - }; - - /** - * Encodes the specified GetPrimaryKeyPairRequestMessage message, length delimited. Does not implicitly {@link agentInterface.GetPrimaryKeyPairRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.GetPrimaryKeyPairRequestMessage - * @static - * @param {agentInterface.IGetPrimaryKeyPairRequestMessage} message GetPrimaryKeyPairRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPrimaryKeyPairRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetPrimaryKeyPairRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.GetPrimaryKeyPairRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.GetPrimaryKeyPairRequestMessage} GetPrimaryKeyPairRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPrimaryKeyPairRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.GetPrimaryKeyPairRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.includePrivateKey = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a GetPrimaryKeyPairRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.GetPrimaryKeyPairRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.GetPrimaryKeyPairRequestMessage} GetPrimaryKeyPairRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPrimaryKeyPairRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return GetPrimaryKeyPairRequestMessage; - })(); - - agentInterface.GetPrimaryKeyPairResponseMessage = (function() { - - /** - * Properties of a GetPrimaryKeyPairResponseMessage. - * @memberof agentInterface - * @interface IGetPrimaryKeyPairResponseMessage - * @property {string|null} [publicKey] GetPrimaryKeyPairResponseMessage publicKey - * @property {string|null} [privateKey] GetPrimaryKeyPairResponseMessage privateKey - */ - - /** - * Constructs a new GetPrimaryKeyPairResponseMessage. - * @memberof agentInterface - * @classdesc Represents a GetPrimaryKeyPairResponseMessage. - * @implements IGetPrimaryKeyPairResponseMessage - * @constructor - * @param {agentInterface.IGetPrimaryKeyPairResponseMessage=} [p] Properties to set - */ - function GetPrimaryKeyPairResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * GetPrimaryKeyPairResponseMessage publicKey. - * @member {string} publicKey - * @memberof agentInterface.GetPrimaryKeyPairResponseMessage - * @instance - */ - GetPrimaryKeyPairResponseMessage.prototype.publicKey = ""; - - /** - * GetPrimaryKeyPairResponseMessage privateKey. - * @member {string} privateKey - * @memberof agentInterface.GetPrimaryKeyPairResponseMessage - * @instance - */ - GetPrimaryKeyPairResponseMessage.prototype.privateKey = ""; - - /** - * Creates a new GetPrimaryKeyPairResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.GetPrimaryKeyPairResponseMessage - * @static - * @param {agentInterface.IGetPrimaryKeyPairResponseMessage=} [properties] Properties to set - * @returns {agentInterface.GetPrimaryKeyPairResponseMessage} GetPrimaryKeyPairResponseMessage instance - */ - GetPrimaryKeyPairResponseMessage.create = function create(properties) { - return new GetPrimaryKeyPairResponseMessage(properties); - }; - - /** - * Encodes the specified GetPrimaryKeyPairResponseMessage message. Does not implicitly {@link agentInterface.GetPrimaryKeyPairResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.GetPrimaryKeyPairResponseMessage - * @static - * @param {agentInterface.IGetPrimaryKeyPairResponseMessage} m GetPrimaryKeyPairResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPrimaryKeyPairResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); - if (m.privateKey != null && Object.hasOwnProperty.call(m, "privateKey")) - w.uint32(18).string(m.privateKey); - return w; - }; - - /** - * Encodes the specified GetPrimaryKeyPairResponseMessage message, length delimited. Does not implicitly {@link agentInterface.GetPrimaryKeyPairResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.GetPrimaryKeyPairResponseMessage - * @static - * @param {agentInterface.IGetPrimaryKeyPairResponseMessage} message GetPrimaryKeyPairResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPrimaryKeyPairResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetPrimaryKeyPairResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.GetPrimaryKeyPairResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.GetPrimaryKeyPairResponseMessage} GetPrimaryKeyPairResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPrimaryKeyPairResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.GetPrimaryKeyPairResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.publicKey = r.string(); - break; - case 2: - m.privateKey = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a GetPrimaryKeyPairResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.GetPrimaryKeyPairResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.GetPrimaryKeyPairResponseMessage} GetPrimaryKeyPairResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPrimaryKeyPairResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return GetPrimaryKeyPairResponseMessage; - })(); - - agentInterface.UpdateSecretRequestMessage = (function() { - - /** - * Properties of an UpdateSecretRequestMessage. - * @memberof agentInterface - * @interface IUpdateSecretRequestMessage - * @property {string|null} [vaultName] UpdateSecretRequestMessage vaultName - * @property {string|null} [secretName] UpdateSecretRequestMessage secretName - * @property {string|null} [secretPath] UpdateSecretRequestMessage secretPath - * @property {Uint8Array|null} [secretContent] UpdateSecretRequestMessage secretContent - */ - - /** - * Constructs a new UpdateSecretRequestMessage. - * @memberof agentInterface - * @classdesc Represents an UpdateSecretRequestMessage. - * @implements IUpdateSecretRequestMessage - * @constructor - * @param {agentInterface.IUpdateSecretRequestMessage=} [p] Properties to set - */ - function UpdateSecretRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * UpdateSecretRequestMessage vaultName. - * @member {string} vaultName - * @memberof agentInterface.UpdateSecretRequestMessage - * @instance - */ - UpdateSecretRequestMessage.prototype.vaultName = ""; - - /** - * UpdateSecretRequestMessage secretName. - * @member {string} secretName - * @memberof agentInterface.UpdateSecretRequestMessage - * @instance - */ - UpdateSecretRequestMessage.prototype.secretName = ""; - - /** - * UpdateSecretRequestMessage secretPath. - * @member {string} secretPath - * @memberof agentInterface.UpdateSecretRequestMessage - * @instance - */ - UpdateSecretRequestMessage.prototype.secretPath = ""; - - /** - * UpdateSecretRequestMessage secretContent. - * @member {Uint8Array} secretContent - * @memberof agentInterface.UpdateSecretRequestMessage - * @instance - */ - UpdateSecretRequestMessage.prototype.secretContent = $util.newBuffer([]); - - /** - * Creates a new UpdateSecretRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.UpdateSecretRequestMessage - * @static - * @param {agentInterface.IUpdateSecretRequestMessage=} [properties] Properties to set - * @returns {agentInterface.UpdateSecretRequestMessage} UpdateSecretRequestMessage instance - */ - UpdateSecretRequestMessage.create = function create(properties) { - return new UpdateSecretRequestMessage(properties); - }; - - /** - * Encodes the specified UpdateSecretRequestMessage message. Does not implicitly {@link agentInterface.UpdateSecretRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.UpdateSecretRequestMessage - * @static - * @param {agentInterface.IUpdateSecretRequestMessage} m UpdateSecretRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSecretRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.vaultName != null && Object.hasOwnProperty.call(m, "vaultName")) - w.uint32(10).string(m.vaultName); - if (m.secretName != null && Object.hasOwnProperty.call(m, "secretName")) - w.uint32(18).string(m.secretName); - if (m.secretPath != null && Object.hasOwnProperty.call(m, "secretPath")) - w.uint32(26).string(m.secretPath); - if (m.secretContent != null && Object.hasOwnProperty.call(m, "secretContent")) - w.uint32(34).bytes(m.secretContent); - return w; - }; - - /** - * Encodes the specified UpdateSecretRequestMessage message, length delimited. Does not implicitly {@link agentInterface.UpdateSecretRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.UpdateSecretRequestMessage - * @static - * @param {agentInterface.IUpdateSecretRequestMessage} message UpdateSecretRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSecretRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateSecretRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.UpdateSecretRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.UpdateSecretRequestMessage} UpdateSecretRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateSecretRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.UpdateSecretRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.vaultName = r.string(); - break; - case 2: - m.secretName = r.string(); - break; - case 3: - m.secretPath = r.string(); - break; - case 4: - m.secretContent = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes an UpdateSecretRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.UpdateSecretRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.UpdateSecretRequestMessage} UpdateSecretRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateSecretRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return UpdateSecretRequestMessage; - })(); - - agentInterface.UpdateSecretResponseMessage = (function() { - - /** - * Properties of an UpdateSecretResponseMessage. - * @memberof agentInterface - * @interface IUpdateSecretResponseMessage - * @property {boolean|null} [successful] UpdateSecretResponseMessage successful - */ - - /** - * Constructs a new UpdateSecretResponseMessage. - * @memberof agentInterface - * @classdesc Represents an UpdateSecretResponseMessage. - * @implements IUpdateSecretResponseMessage - * @constructor - * @param {agentInterface.IUpdateSecretResponseMessage=} [p] Properties to set - */ - function UpdateSecretResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * UpdateSecretResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.UpdateSecretResponseMessage - * @instance - */ - UpdateSecretResponseMessage.prototype.successful = false; - - /** - * Creates a new UpdateSecretResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.UpdateSecretResponseMessage - * @static - * @param {agentInterface.IUpdateSecretResponseMessage=} [properties] Properties to set - * @returns {agentInterface.UpdateSecretResponseMessage} UpdateSecretResponseMessage instance - */ - UpdateSecretResponseMessage.create = function create(properties) { - return new UpdateSecretResponseMessage(properties); - }; - - /** - * Encodes the specified UpdateSecretResponseMessage message. Does not implicitly {@link agentInterface.UpdateSecretResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.UpdateSecretResponseMessage - * @static - * @param {agentInterface.IUpdateSecretResponseMessage} m UpdateSecretResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSecretResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified UpdateSecretResponseMessage message, length delimited. Does not implicitly {@link agentInterface.UpdateSecretResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.UpdateSecretResponseMessage - * @static - * @param {agentInterface.IUpdateSecretResponseMessage} message UpdateSecretResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSecretResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateSecretResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.UpdateSecretResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.UpdateSecretResponseMessage} UpdateSecretResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateSecretResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.UpdateSecretResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes an UpdateSecretResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.UpdateSecretResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.UpdateSecretResponseMessage} UpdateSecretResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateSecretResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return UpdateSecretResponseMessage; - })(); - - agentInterface.DeleteKeyRequestMessage = (function() { - - /** - * Properties of a DeleteKeyRequestMessage. - * @memberof agentInterface - * @interface IDeleteKeyRequestMessage - * @property {string|null} [keyName] DeleteKeyRequestMessage keyName - */ - - /** - * Constructs a new DeleteKeyRequestMessage. - * @memberof agentInterface - * @classdesc Represents a DeleteKeyRequestMessage. - * @implements IDeleteKeyRequestMessage - * @constructor - * @param {agentInterface.IDeleteKeyRequestMessage=} [p] Properties to set - */ - function DeleteKeyRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * DeleteKeyRequestMessage keyName. - * @member {string} keyName - * @memberof agentInterface.DeleteKeyRequestMessage - * @instance - */ - DeleteKeyRequestMessage.prototype.keyName = ""; - - /** - * Creates a new DeleteKeyRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.DeleteKeyRequestMessage - * @static - * @param {agentInterface.IDeleteKeyRequestMessage=} [properties] Properties to set - * @returns {agentInterface.DeleteKeyRequestMessage} DeleteKeyRequestMessage instance - */ - DeleteKeyRequestMessage.create = function create(properties) { - return new DeleteKeyRequestMessage(properties); - }; - - /** - * Encodes the specified DeleteKeyRequestMessage message. Does not implicitly {@link agentInterface.DeleteKeyRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.DeleteKeyRequestMessage - * @static - * @param {agentInterface.IDeleteKeyRequestMessage} m DeleteKeyRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteKeyRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.keyName != null && Object.hasOwnProperty.call(m, "keyName")) - w.uint32(10).string(m.keyName); - return w; - }; - - /** - * Encodes the specified DeleteKeyRequestMessage message, length delimited. Does not implicitly {@link agentInterface.DeleteKeyRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.DeleteKeyRequestMessage - * @static - * @param {agentInterface.IDeleteKeyRequestMessage} message DeleteKeyRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteKeyRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteKeyRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.DeleteKeyRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.DeleteKeyRequestMessage} DeleteKeyRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteKeyRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DeleteKeyRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.keyName = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a DeleteKeyRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.DeleteKeyRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.DeleteKeyRequestMessage} DeleteKeyRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteKeyRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return DeleteKeyRequestMessage; - })(); - - agentInterface.DeleteKeyResponseMessage = (function() { - - /** - * Properties of a DeleteKeyResponseMessage. - * @memberof agentInterface - * @interface IDeleteKeyResponseMessage - * @property {boolean|null} [successful] DeleteKeyResponseMessage successful - */ - - /** - * Constructs a new DeleteKeyResponseMessage. - * @memberof agentInterface - * @classdesc Represents a DeleteKeyResponseMessage. - * @implements IDeleteKeyResponseMessage - * @constructor - * @param {agentInterface.IDeleteKeyResponseMessage=} [p] Properties to set - */ - function DeleteKeyResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * DeleteKeyResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.DeleteKeyResponseMessage - * @instance - */ - DeleteKeyResponseMessage.prototype.successful = false; - - /** - * Creates a new DeleteKeyResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.DeleteKeyResponseMessage - * @static - * @param {agentInterface.IDeleteKeyResponseMessage=} [properties] Properties to set - * @returns {agentInterface.DeleteKeyResponseMessage} DeleteKeyResponseMessage instance - */ - DeleteKeyResponseMessage.create = function create(properties) { - return new DeleteKeyResponseMessage(properties); - }; - - /** - * Encodes the specified DeleteKeyResponseMessage message. Does not implicitly {@link agentInterface.DeleteKeyResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.DeleteKeyResponseMessage - * @static - * @param {agentInterface.IDeleteKeyResponseMessage} m DeleteKeyResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteKeyResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified DeleteKeyResponseMessage message, length delimited. Does not implicitly {@link agentInterface.DeleteKeyResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.DeleteKeyResponseMessage - * @static - * @param {agentInterface.IDeleteKeyResponseMessage} message DeleteKeyResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteKeyResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteKeyResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.DeleteKeyResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.DeleteKeyResponseMessage} DeleteKeyResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteKeyResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DeleteKeyResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a DeleteKeyResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.DeleteKeyResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.DeleteKeyResponseMessage} DeleteKeyResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteKeyResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return DeleteKeyResponseMessage; - })(); - - agentInterface.PeerInfoRequestMessage = (function() { - - /** - * Properties of a PeerInfoRequestMessage. - * @memberof agentInterface - * @interface IPeerInfoRequestMessage - * @property {boolean|null} [current] PeerInfoRequestMessage current - * @property {string|null} [publicKey] PeerInfoRequestMessage publicKey - */ - - /** - * Constructs a new PeerInfoRequestMessage. - * @memberof agentInterface - * @classdesc Represents a PeerInfoRequestMessage. - * @implements IPeerInfoRequestMessage - * @constructor - * @param {agentInterface.IPeerInfoRequestMessage=} [p] Properties to set - */ - function PeerInfoRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * PeerInfoRequestMessage current. - * @member {boolean} current - * @memberof agentInterface.PeerInfoRequestMessage - * @instance - */ - PeerInfoRequestMessage.prototype.current = false; - - /** - * PeerInfoRequestMessage publicKey. - * @member {string} publicKey - * @memberof agentInterface.PeerInfoRequestMessage - * @instance - */ - PeerInfoRequestMessage.prototype.publicKey = ""; - - /** - * Creates a new PeerInfoRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.PeerInfoRequestMessage - * @static - * @param {agentInterface.IPeerInfoRequestMessage=} [properties] Properties to set - * @returns {agentInterface.PeerInfoRequestMessage} PeerInfoRequestMessage instance - */ - PeerInfoRequestMessage.create = function create(properties) { - return new PeerInfoRequestMessage(properties); - }; - - /** - * Encodes the specified PeerInfoRequestMessage message. Does not implicitly {@link agentInterface.PeerInfoRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.PeerInfoRequestMessage - * @static - * @param {agentInterface.IPeerInfoRequestMessage} m PeerInfoRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PeerInfoRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.current != null && Object.hasOwnProperty.call(m, "current")) - w.uint32(8).bool(m.current); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(18).string(m.publicKey); - return w; - }; - - /** - * Encodes the specified PeerInfoRequestMessage message, length delimited. Does not implicitly {@link agentInterface.PeerInfoRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.PeerInfoRequestMessage - * @static - * @param {agentInterface.IPeerInfoRequestMessage} message PeerInfoRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PeerInfoRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PeerInfoRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.PeerInfoRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.PeerInfoRequestMessage} PeerInfoRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PeerInfoRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.PeerInfoRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.current = r.bool(); - break; - case 2: - m.publicKey = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a PeerInfoRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.PeerInfoRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.PeerInfoRequestMessage} PeerInfoRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PeerInfoRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return PeerInfoRequestMessage; - })(); - - agentInterface.PeerInfoResponseMessage = (function() { - - /** - * Properties of a PeerInfoResponseMessage. - * @memberof agentInterface - * @interface IPeerInfoResponseMessage - * @property {string|null} [publicKey] PeerInfoResponseMessage publicKey - * @property {string|null} [peerAddress] PeerInfoResponseMessage peerAddress - * @property {string|null} [relayPublicKey] PeerInfoResponseMessage relayPublicKey - */ - - /** - * Constructs a new PeerInfoResponseMessage. - * @memberof agentInterface - * @classdesc Represents a PeerInfoResponseMessage. - * @implements IPeerInfoResponseMessage - * @constructor - * @param {agentInterface.IPeerInfoResponseMessage=} [p] Properties to set - */ - function PeerInfoResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * PeerInfoResponseMessage publicKey. - * @member {string} publicKey - * @memberof agentInterface.PeerInfoResponseMessage - * @instance - */ - PeerInfoResponseMessage.prototype.publicKey = ""; - - /** - * PeerInfoResponseMessage peerAddress. - * @member {string} peerAddress - * @memberof agentInterface.PeerInfoResponseMessage - * @instance - */ - PeerInfoResponseMessage.prototype.peerAddress = ""; - - /** - * PeerInfoResponseMessage relayPublicKey. - * @member {string} relayPublicKey - * @memberof agentInterface.PeerInfoResponseMessage - * @instance - */ - PeerInfoResponseMessage.prototype.relayPublicKey = ""; - - /** - * Creates a new PeerInfoResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.PeerInfoResponseMessage - * @static - * @param {agentInterface.IPeerInfoResponseMessage=} [properties] Properties to set - * @returns {agentInterface.PeerInfoResponseMessage} PeerInfoResponseMessage instance - */ - PeerInfoResponseMessage.create = function create(properties) { - return new PeerInfoResponseMessage(properties); - }; - - /** - * Encodes the specified PeerInfoResponseMessage message. Does not implicitly {@link agentInterface.PeerInfoResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.PeerInfoResponseMessage - * @static - * @param {agentInterface.IPeerInfoResponseMessage} m PeerInfoResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PeerInfoResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); - if (m.peerAddress != null && Object.hasOwnProperty.call(m, "peerAddress")) - w.uint32(18).string(m.peerAddress); - if (m.relayPublicKey != null && Object.hasOwnProperty.call(m, "relayPublicKey")) - w.uint32(26).string(m.relayPublicKey); - return w; - }; - - /** - * Encodes the specified PeerInfoResponseMessage message, length delimited. Does not implicitly {@link agentInterface.PeerInfoResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.PeerInfoResponseMessage - * @static - * @param {agentInterface.IPeerInfoResponseMessage} message PeerInfoResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PeerInfoResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PeerInfoResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.PeerInfoResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.PeerInfoResponseMessage} PeerInfoResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PeerInfoResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.PeerInfoResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.publicKey = r.string(); - break; - case 2: - m.peerAddress = r.string(); - break; - case 3: - m.relayPublicKey = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a PeerInfoResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.PeerInfoResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.PeerInfoResponseMessage} PeerInfoResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PeerInfoResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return PeerInfoResponseMessage; - })(); - - agentInterface.AddPeerRequestMessage = (function() { - - /** - * Properties of an AddPeerRequestMessage. - * @memberof agentInterface - * @interface IAddPeerRequestMessage - * @property {string|null} [publicKey] AddPeerRequestMessage publicKey - * @property {string|null} [peerAddress] AddPeerRequestMessage peerAddress - * @property {string|null} [relayPublicKey] AddPeerRequestMessage relayPublicKey - */ - - /** - * Constructs a new AddPeerRequestMessage. - * @memberof agentInterface - * @classdesc Represents an AddPeerRequestMessage. - * @implements IAddPeerRequestMessage - * @constructor - * @param {agentInterface.IAddPeerRequestMessage=} [p] Properties to set - */ - function AddPeerRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * AddPeerRequestMessage publicKey. - * @member {string} publicKey - * @memberof agentInterface.AddPeerRequestMessage - * @instance - */ - AddPeerRequestMessage.prototype.publicKey = ""; - - /** - * AddPeerRequestMessage peerAddress. - * @member {string} peerAddress - * @memberof agentInterface.AddPeerRequestMessage - * @instance - */ - AddPeerRequestMessage.prototype.peerAddress = ""; - - /** - * AddPeerRequestMessage relayPublicKey. - * @member {string} relayPublicKey - * @memberof agentInterface.AddPeerRequestMessage - * @instance - */ - AddPeerRequestMessage.prototype.relayPublicKey = ""; - - /** - * Creates a new AddPeerRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.AddPeerRequestMessage - * @static - * @param {agentInterface.IAddPeerRequestMessage=} [properties] Properties to set - * @returns {agentInterface.AddPeerRequestMessage} AddPeerRequestMessage instance - */ - AddPeerRequestMessage.create = function create(properties) { - return new AddPeerRequestMessage(properties); - }; - - /** - * Encodes the specified AddPeerRequestMessage message. Does not implicitly {@link agentInterface.AddPeerRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.AddPeerRequestMessage - * @static - * @param {agentInterface.IAddPeerRequestMessage} m AddPeerRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddPeerRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); - if (m.peerAddress != null && Object.hasOwnProperty.call(m, "peerAddress")) - w.uint32(18).string(m.peerAddress); - if (m.relayPublicKey != null && Object.hasOwnProperty.call(m, "relayPublicKey")) - w.uint32(26).string(m.relayPublicKey); - return w; - }; - - /** - * Encodes the specified AddPeerRequestMessage message, length delimited. Does not implicitly {@link agentInterface.AddPeerRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.AddPeerRequestMessage - * @static - * @param {agentInterface.IAddPeerRequestMessage} message AddPeerRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddPeerRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AddPeerRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.AddPeerRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.AddPeerRequestMessage} AddPeerRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddPeerRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.AddPeerRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.publicKey = r.string(); - break; - case 2: - m.peerAddress = r.string(); - break; - case 3: - m.relayPublicKey = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes an AddPeerRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.AddPeerRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.AddPeerRequestMessage} AddPeerRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddPeerRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return AddPeerRequestMessage; - })(); - - agentInterface.AddPeerResponseMessage = (function() { - - /** - * Properties of an AddPeerResponseMessage. - * @memberof agentInterface - * @interface IAddPeerResponseMessage - * @property {boolean|null} [successful] AddPeerResponseMessage successful - */ - - /** - * Constructs a new AddPeerResponseMessage. - * @memberof agentInterface - * @classdesc Represents an AddPeerResponseMessage. - * @implements IAddPeerResponseMessage - * @constructor - * @param {agentInterface.IAddPeerResponseMessage=} [p] Properties to set - */ - function AddPeerResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * AddPeerResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.AddPeerResponseMessage - * @instance - */ - AddPeerResponseMessage.prototype.successful = false; - - /** - * Creates a new AddPeerResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.AddPeerResponseMessage - * @static - * @param {agentInterface.IAddPeerResponseMessage=} [properties] Properties to set - * @returns {agentInterface.AddPeerResponseMessage} AddPeerResponseMessage instance - */ - AddPeerResponseMessage.create = function create(properties) { - return new AddPeerResponseMessage(properties); - }; - - /** - * Encodes the specified AddPeerResponseMessage message. Does not implicitly {@link agentInterface.AddPeerResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.AddPeerResponseMessage - * @static - * @param {agentInterface.IAddPeerResponseMessage} m AddPeerResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddPeerResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified AddPeerResponseMessage message, length delimited. Does not implicitly {@link agentInterface.AddPeerResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.AddPeerResponseMessage - * @static - * @param {agentInterface.IAddPeerResponseMessage} message AddPeerResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AddPeerResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AddPeerResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.AddPeerResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.AddPeerResponseMessage} AddPeerResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddPeerResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.AddPeerResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes an AddPeerResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.AddPeerResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.AddPeerResponseMessage} AddPeerResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AddPeerResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return AddPeerResponseMessage; - })(); - - agentInterface.PingPeerRequestMessage = (function() { - - /** - * Properties of a PingPeerRequestMessage. - * @memberof agentInterface - * @interface IPingPeerRequestMessage - * @property {string|null} [publicKey] PingPeerRequestMessage publicKey - * @property {number|null} [timeout] PingPeerRequestMessage timeout - */ - - /** - * Constructs a new PingPeerRequestMessage. - * @memberof agentInterface - * @classdesc Represents a PingPeerRequestMessage. - * @implements IPingPeerRequestMessage - * @constructor - * @param {agentInterface.IPingPeerRequestMessage=} [p] Properties to set - */ - function PingPeerRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * PingPeerRequestMessage publicKey. - * @member {string} publicKey - * @memberof agentInterface.PingPeerRequestMessage - * @instance - */ - PingPeerRequestMessage.prototype.publicKey = ""; - - /** - * PingPeerRequestMessage timeout. - * @member {number} timeout - * @memberof agentInterface.PingPeerRequestMessage - * @instance - */ - PingPeerRequestMessage.prototype.timeout = 0; - - /** - * Creates a new PingPeerRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.PingPeerRequestMessage - * @static - * @param {agentInterface.IPingPeerRequestMessage=} [properties] Properties to set - * @returns {agentInterface.PingPeerRequestMessage} PingPeerRequestMessage instance - */ - PingPeerRequestMessage.create = function create(properties) { - return new PingPeerRequestMessage(properties); - }; - - /** - * Encodes the specified PingPeerRequestMessage message. Does not implicitly {@link agentInterface.PingPeerRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.PingPeerRequestMessage - * @static - * @param {agentInterface.IPingPeerRequestMessage} m PingPeerRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PingPeerRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); - if (m.timeout != null && Object.hasOwnProperty.call(m, "timeout")) - w.uint32(16).int32(m.timeout); - return w; - }; - - /** - * Encodes the specified PingPeerRequestMessage message, length delimited. Does not implicitly {@link agentInterface.PingPeerRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.PingPeerRequestMessage - * @static - * @param {agentInterface.IPingPeerRequestMessage} message PingPeerRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PingPeerRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PingPeerRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.PingPeerRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.PingPeerRequestMessage} PingPeerRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PingPeerRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.PingPeerRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.publicKey = r.string(); - break; - case 2: - m.timeout = r.int32(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a PingPeerRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.PingPeerRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.PingPeerRequestMessage} PingPeerRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PingPeerRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return PingPeerRequestMessage; - })(); - - agentInterface.PingPeerResponseMessage = (function() { - - /** - * Properties of a PingPeerResponseMessage. - * @memberof agentInterface - * @interface IPingPeerResponseMessage - * @property {boolean|null} [successful] PingPeerResponseMessage successful - */ - - /** - * Constructs a new PingPeerResponseMessage. - * @memberof agentInterface - * @classdesc Represents a PingPeerResponseMessage. - * @implements IPingPeerResponseMessage - * @constructor - * @param {agentInterface.IPingPeerResponseMessage=} [p] Properties to set - */ - function PingPeerResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * PingPeerResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.PingPeerResponseMessage - * @instance - */ - PingPeerResponseMessage.prototype.successful = false; - - /** - * Creates a new PingPeerResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.PingPeerResponseMessage - * @static - * @param {agentInterface.IPingPeerResponseMessage=} [properties] Properties to set - * @returns {agentInterface.PingPeerResponseMessage} PingPeerResponseMessage instance - */ - PingPeerResponseMessage.create = function create(properties) { - return new PingPeerResponseMessage(properties); - }; - - /** - * Encodes the specified PingPeerResponseMessage message. Does not implicitly {@link agentInterface.PingPeerResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.PingPeerResponseMessage - * @static - * @param {agentInterface.IPingPeerResponseMessage} m PingPeerResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PingPeerResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified PingPeerResponseMessage message, length delimited. Does not implicitly {@link agentInterface.PingPeerResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.PingPeerResponseMessage - * @static - * @param {agentInterface.IPingPeerResponseMessage} message PingPeerResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PingPeerResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PingPeerResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.PingPeerResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.PingPeerResponseMessage} PingPeerResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PingPeerResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.PingPeerResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a PingPeerResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.PingPeerResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.PingPeerResponseMessage} PingPeerResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PingPeerResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return PingPeerResponseMessage; - })(); - - agentInterface.FindPeerRequestMessage = (function() { - - /** - * Properties of a FindPeerRequestMessage. - * @memberof agentInterface - * @interface IFindPeerRequestMessage - * @property {string|null} [publicKey] FindPeerRequestMessage publicKey - * @property {number|null} [timeout] FindPeerRequestMessage timeout - */ - - /** - * Constructs a new FindPeerRequestMessage. - * @memberof agentInterface - * @classdesc Represents a FindPeerRequestMessage. - * @implements IFindPeerRequestMessage - * @constructor - * @param {agentInterface.IFindPeerRequestMessage=} [p] Properties to set - */ - function FindPeerRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * FindPeerRequestMessage publicKey. - * @member {string} publicKey - * @memberof agentInterface.FindPeerRequestMessage - * @instance - */ - FindPeerRequestMessage.prototype.publicKey = ""; - - /** - * FindPeerRequestMessage timeout. - * @member {number} timeout - * @memberof agentInterface.FindPeerRequestMessage - * @instance - */ - FindPeerRequestMessage.prototype.timeout = 0; - - /** - * Creates a new FindPeerRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.FindPeerRequestMessage - * @static - * @param {agentInterface.IFindPeerRequestMessage=} [properties] Properties to set - * @returns {agentInterface.FindPeerRequestMessage} FindPeerRequestMessage instance - */ - FindPeerRequestMessage.create = function create(properties) { - return new FindPeerRequestMessage(properties); - }; - - /** - * Encodes the specified FindPeerRequestMessage message. Does not implicitly {@link agentInterface.FindPeerRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.FindPeerRequestMessage - * @static - * @param {agentInterface.IFindPeerRequestMessage} m FindPeerRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FindPeerRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); - if (m.timeout != null && Object.hasOwnProperty.call(m, "timeout")) - w.uint32(16).int32(m.timeout); - return w; - }; - - /** - * Encodes the specified FindPeerRequestMessage message, length delimited. Does not implicitly {@link agentInterface.FindPeerRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.FindPeerRequestMessage - * @static - * @param {agentInterface.IFindPeerRequestMessage} message FindPeerRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FindPeerRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FindPeerRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.FindPeerRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.FindPeerRequestMessage} FindPeerRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FindPeerRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.FindPeerRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.publicKey = r.string(); - break; - case 2: - m.timeout = r.int32(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a FindPeerRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.FindPeerRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.FindPeerRequestMessage} FindPeerRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FindPeerRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return FindPeerRequestMessage; - })(); - - agentInterface.FindPeerResponseMessage = (function() { - - /** - * Properties of a FindPeerResponseMessage. - * @memberof agentInterface - * @interface IFindPeerResponseMessage - * @property {boolean|null} [successful] FindPeerResponseMessage successful - */ - - /** - * Constructs a new FindPeerResponseMessage. - * @memberof agentInterface - * @classdesc Represents a FindPeerResponseMessage. - * @implements IFindPeerResponseMessage - * @constructor - * @param {agentInterface.IFindPeerResponseMessage=} [p] Properties to set - */ - function FindPeerResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * FindPeerResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.FindPeerResponseMessage - * @instance - */ - FindPeerResponseMessage.prototype.successful = false; - - /** - * Creates a new FindPeerResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.FindPeerResponseMessage - * @static - * @param {agentInterface.IFindPeerResponseMessage=} [properties] Properties to set - * @returns {agentInterface.FindPeerResponseMessage} FindPeerResponseMessage instance - */ - FindPeerResponseMessage.create = function create(properties) { - return new FindPeerResponseMessage(properties); - }; - - /** - * Encodes the specified FindPeerResponseMessage message. Does not implicitly {@link agentInterface.FindPeerResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.FindPeerResponseMessage - * @static - * @param {agentInterface.IFindPeerResponseMessage} m FindPeerResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FindPeerResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified FindPeerResponseMessage message, length delimited. Does not implicitly {@link agentInterface.FindPeerResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.FindPeerResponseMessage - * @static - * @param {agentInterface.IFindPeerResponseMessage} message FindPeerResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FindPeerResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FindPeerResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.FindPeerResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.FindPeerResponseMessage} FindPeerResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FindPeerResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.FindPeerResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a FindPeerResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.FindPeerResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.FindPeerResponseMessage} FindPeerResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FindPeerResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return FindPeerResponseMessage; - })(); - - agentInterface.FindSocialPeerRequestMessage = (function() { - - /** - * Properties of a FindSocialPeerRequestMessage. - * @memberof agentInterface - * @interface IFindSocialPeerRequestMessage - * @property {string|null} [handle] FindSocialPeerRequestMessage handle - * @property {string|null} [service] FindSocialPeerRequestMessage service - * @property {number|null} [timeout] FindSocialPeerRequestMessage timeout - */ - - /** - * Constructs a new FindSocialPeerRequestMessage. - * @memberof agentInterface - * @classdesc Represents a FindSocialPeerRequestMessage. - * @implements IFindSocialPeerRequestMessage - * @constructor - * @param {agentInterface.IFindSocialPeerRequestMessage=} [p] Properties to set - */ - function FindSocialPeerRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * FindSocialPeerRequestMessage handle. - * @member {string} handle - * @memberof agentInterface.FindSocialPeerRequestMessage - * @instance - */ - FindSocialPeerRequestMessage.prototype.handle = ""; - - /** - * FindSocialPeerRequestMessage service. - * @member {string} service - * @memberof agentInterface.FindSocialPeerRequestMessage - * @instance - */ - FindSocialPeerRequestMessage.prototype.service = ""; - - /** - * FindSocialPeerRequestMessage timeout. - * @member {number} timeout - * @memberof agentInterface.FindSocialPeerRequestMessage - * @instance - */ - FindSocialPeerRequestMessage.prototype.timeout = 0; - - /** - * Creates a new FindSocialPeerRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.FindSocialPeerRequestMessage - * @static - * @param {agentInterface.IFindSocialPeerRequestMessage=} [properties] Properties to set - * @returns {agentInterface.FindSocialPeerRequestMessage} FindSocialPeerRequestMessage instance - */ - FindSocialPeerRequestMessage.create = function create(properties) { - return new FindSocialPeerRequestMessage(properties); - }; - - /** - * Encodes the specified FindSocialPeerRequestMessage message. Does not implicitly {@link agentInterface.FindSocialPeerRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.FindSocialPeerRequestMessage - * @static - * @param {agentInterface.IFindSocialPeerRequestMessage} m FindSocialPeerRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FindSocialPeerRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.handle != null && Object.hasOwnProperty.call(m, "handle")) - w.uint32(10).string(m.handle); - if (m.service != null && Object.hasOwnProperty.call(m, "service")) - w.uint32(18).string(m.service); - if (m.timeout != null && Object.hasOwnProperty.call(m, "timeout")) - w.uint32(24).int32(m.timeout); - return w; - }; - - /** - * Encodes the specified FindSocialPeerRequestMessage message, length delimited. Does not implicitly {@link agentInterface.FindSocialPeerRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.FindSocialPeerRequestMessage - * @static - * @param {agentInterface.IFindSocialPeerRequestMessage} message FindSocialPeerRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FindSocialPeerRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FindSocialPeerRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.FindSocialPeerRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.FindSocialPeerRequestMessage} FindSocialPeerRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FindSocialPeerRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.FindSocialPeerRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.handle = r.string(); - break; - case 2: - m.service = r.string(); - break; - case 3: - m.timeout = r.int32(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a FindSocialPeerRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.FindSocialPeerRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.FindSocialPeerRequestMessage} FindSocialPeerRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FindSocialPeerRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return FindSocialPeerRequestMessage; - })(); - - agentInterface.FindSocialPeerResponseMessage = (function() { - - /** - * Properties of a FindSocialPeerResponseMessage. - * @memberof agentInterface - * @interface IFindSocialPeerResponseMessage - * @property {boolean|null} [successful] FindSocialPeerResponseMessage successful - */ - - /** - * Constructs a new FindSocialPeerResponseMessage. - * @memberof agentInterface - * @classdesc Represents a FindSocialPeerResponseMessage. - * @implements IFindSocialPeerResponseMessage - * @constructor - * @param {agentInterface.IFindSocialPeerResponseMessage=} [p] Properties to set - */ - function FindSocialPeerResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * FindSocialPeerResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.FindSocialPeerResponseMessage - * @instance - */ - FindSocialPeerResponseMessage.prototype.successful = false; - - /** - * Creates a new FindSocialPeerResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.FindSocialPeerResponseMessage - * @static - * @param {agentInterface.IFindSocialPeerResponseMessage=} [properties] Properties to set - * @returns {agentInterface.FindSocialPeerResponseMessage} FindSocialPeerResponseMessage instance - */ - FindSocialPeerResponseMessage.create = function create(properties) { - return new FindSocialPeerResponseMessage(properties); - }; - - /** - * Encodes the specified FindSocialPeerResponseMessage message. Does not implicitly {@link agentInterface.FindSocialPeerResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.FindSocialPeerResponseMessage - * @static - * @param {agentInterface.IFindSocialPeerResponseMessage} m FindSocialPeerResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FindSocialPeerResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified FindSocialPeerResponseMessage message, length delimited. Does not implicitly {@link agentInterface.FindSocialPeerResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.FindSocialPeerResponseMessage - * @static - * @param {agentInterface.IFindSocialPeerResponseMessage} message FindSocialPeerResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FindSocialPeerResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FindSocialPeerResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.FindSocialPeerResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.FindSocialPeerResponseMessage} FindSocialPeerResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FindSocialPeerResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.FindSocialPeerResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a FindSocialPeerResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.FindSocialPeerResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.FindSocialPeerResponseMessage} FindSocialPeerResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FindSocialPeerResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return FindSocialPeerResponseMessage; - })(); - - agentInterface.ListPeersRequestMessage = (function() { - - /** - * Properties of a ListPeersRequestMessage. - * @memberof agentInterface - * @interface IListPeersRequestMessage - */ - - /** - * Constructs a new ListPeersRequestMessage. - * @memberof agentInterface - * @classdesc Represents a ListPeersRequestMessage. - * @implements IListPeersRequestMessage - * @constructor - * @param {agentInterface.IListPeersRequestMessage=} [p] Properties to set - */ - function ListPeersRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * Creates a new ListPeersRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ListPeersRequestMessage - * @static - * @param {agentInterface.IListPeersRequestMessage=} [properties] Properties to set - * @returns {agentInterface.ListPeersRequestMessage} ListPeersRequestMessage instance - */ - ListPeersRequestMessage.create = function create(properties) { - return new ListPeersRequestMessage(properties); - }; - - /** - * Encodes the specified ListPeersRequestMessage message. Does not implicitly {@link agentInterface.ListPeersRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ListPeersRequestMessage - * @static - * @param {agentInterface.IListPeersRequestMessage} m ListPeersRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPeersRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - return w; - }; - - /** - * Encodes the specified ListPeersRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ListPeersRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ListPeersRequestMessage - * @static - * @param {agentInterface.IListPeersRequestMessage} message ListPeersRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPeersRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListPeersRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ListPeersRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ListPeersRequestMessage} ListPeersRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPeersRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListPeersRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a ListPeersRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ListPeersRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ListPeersRequestMessage} ListPeersRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPeersRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ListPeersRequestMessage; - })(); - - agentInterface.ListPeersResponseMessage = (function() { - - /** - * Properties of a ListPeersResponseMessage. - * @memberof agentInterface - * @interface IListPeersResponseMessage - * @property {Array.|null} [publicKeys] ListPeersResponseMessage publicKeys - */ - - /** - * Constructs a new ListPeersResponseMessage. - * @memberof agentInterface - * @classdesc Represents a ListPeersResponseMessage. - * @implements IListPeersResponseMessage - * @constructor - * @param {agentInterface.IListPeersResponseMessage=} [p] Properties to set - */ - function ListPeersResponseMessage(p) { - this.publicKeys = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * ListPeersResponseMessage publicKeys. - * @member {Array.} publicKeys - * @memberof agentInterface.ListPeersResponseMessage - * @instance - */ - ListPeersResponseMessage.prototype.publicKeys = $util.emptyArray; - - /** - * Creates a new ListPeersResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ListPeersResponseMessage - * @static - * @param {agentInterface.IListPeersResponseMessage=} [properties] Properties to set - * @returns {agentInterface.ListPeersResponseMessage} ListPeersResponseMessage instance - */ - ListPeersResponseMessage.create = function create(properties) { - return new ListPeersResponseMessage(properties); - }; - - /** - * Encodes the specified ListPeersResponseMessage message. Does not implicitly {@link agentInterface.ListPeersResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ListPeersResponseMessage - * @static - * @param {agentInterface.IListPeersResponseMessage} m ListPeersResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPeersResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.publicKeys != null && m.publicKeys.length) { - for (var i = 0; i < m.publicKeys.length; ++i) - w.uint32(10).string(m.publicKeys[i]); - } - return w; - }; - - /** - * Encodes the specified ListPeersResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ListPeersResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ListPeersResponseMessage - * @static - * @param {agentInterface.IListPeersResponseMessage} message ListPeersResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListPeersResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListPeersResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ListPeersResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ListPeersResponseMessage} ListPeersResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPeersResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListPeersResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.publicKeys && m.publicKeys.length)) - m.publicKeys = []; - m.publicKeys.push(r.string()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a ListPeersResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ListPeersResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ListPeersResponseMessage} ListPeersResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListPeersResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ListPeersResponseMessage; - })(); - - agentInterface.ToggleStealthRequestMessage = (function() { - - /** - * Properties of a ToggleStealthRequestMessage. - * @memberof agentInterface - * @interface IToggleStealthRequestMessage - * @property {boolean|null} [active] ToggleStealthRequestMessage active - */ - - /** - * Constructs a new ToggleStealthRequestMessage. - * @memberof agentInterface - * @classdesc Represents a ToggleStealthRequestMessage. - * @implements IToggleStealthRequestMessage - * @constructor - * @param {agentInterface.IToggleStealthRequestMessage=} [p] Properties to set - */ - function ToggleStealthRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * ToggleStealthRequestMessage active. - * @member {boolean} active - * @memberof agentInterface.ToggleStealthRequestMessage - * @instance - */ - ToggleStealthRequestMessage.prototype.active = false; - - /** - * Creates a new ToggleStealthRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ToggleStealthRequestMessage - * @static - * @param {agentInterface.IToggleStealthRequestMessage=} [properties] Properties to set - * @returns {agentInterface.ToggleStealthRequestMessage} ToggleStealthRequestMessage instance - */ - ToggleStealthRequestMessage.create = function create(properties) { - return new ToggleStealthRequestMessage(properties); - }; - - /** - * Encodes the specified ToggleStealthRequestMessage message. Does not implicitly {@link agentInterface.ToggleStealthRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ToggleStealthRequestMessage - * @static - * @param {agentInterface.IToggleStealthRequestMessage} m ToggleStealthRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ToggleStealthRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.active != null && Object.hasOwnProperty.call(m, "active")) - w.uint32(8).bool(m.active); - return w; - }; - - /** - * Encodes the specified ToggleStealthRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ToggleStealthRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ToggleStealthRequestMessage - * @static - * @param {agentInterface.IToggleStealthRequestMessage} message ToggleStealthRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ToggleStealthRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ToggleStealthRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ToggleStealthRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ToggleStealthRequestMessage} ToggleStealthRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ToggleStealthRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ToggleStealthRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.active = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a ToggleStealthRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ToggleStealthRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ToggleStealthRequestMessage} ToggleStealthRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ToggleStealthRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ToggleStealthRequestMessage; - })(); - - agentInterface.ToggleStealthResponseMessage = (function() { - - /** - * Properties of a ToggleStealthResponseMessage. - * @memberof agentInterface - * @interface IToggleStealthResponseMessage - * @property {boolean|null} [successful] ToggleStealthResponseMessage successful - */ - - /** - * Constructs a new ToggleStealthResponseMessage. - * @memberof agentInterface - * @classdesc Represents a ToggleStealthResponseMessage. - * @implements IToggleStealthResponseMessage - * @constructor - * @param {agentInterface.IToggleStealthResponseMessage=} [p] Properties to set - */ - function ToggleStealthResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * ToggleStealthResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.ToggleStealthResponseMessage - * @instance - */ - ToggleStealthResponseMessage.prototype.successful = false; - - /** - * Creates a new ToggleStealthResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ToggleStealthResponseMessage - * @static - * @param {agentInterface.IToggleStealthResponseMessage=} [properties] Properties to set - * @returns {agentInterface.ToggleStealthResponseMessage} ToggleStealthResponseMessage instance - */ - ToggleStealthResponseMessage.create = function create(properties) { - return new ToggleStealthResponseMessage(properties); - }; - - /** - * Encodes the specified ToggleStealthResponseMessage message. Does not implicitly {@link agentInterface.ToggleStealthResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ToggleStealthResponseMessage - * @static - * @param {agentInterface.IToggleStealthResponseMessage} m ToggleStealthResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ToggleStealthResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified ToggleStealthResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ToggleStealthResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ToggleStealthResponseMessage - * @static - * @param {agentInterface.IToggleStealthResponseMessage} message ToggleStealthResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ToggleStealthResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ToggleStealthResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ToggleStealthResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ToggleStealthResponseMessage} ToggleStealthResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ToggleStealthResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ToggleStealthResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a ToggleStealthResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ToggleStealthResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ToggleStealthResponseMessage} ToggleStealthResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ToggleStealthResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ToggleStealthResponseMessage; - })(); - - agentInterface.UpdatePeerInfoRequestMessage = (function() { - - /** - * Properties of an UpdatePeerInfoRequestMessage. - * @memberof agentInterface - * @interface IUpdatePeerInfoRequestMessage - * @property {string|null} [publicKey] UpdatePeerInfoRequestMessage publicKey - * @property {boolean|null} [currentNode] UpdatePeerInfoRequestMessage currentNode - * @property {string|null} [peerHost] UpdatePeerInfoRequestMessage peerHost - * @property {number|null} [peerPort] UpdatePeerInfoRequestMessage peerPort - * @property {string|null} [relayPublicKey] UpdatePeerInfoRequestMessage relayPublicKey - */ - - /** - * Constructs a new UpdatePeerInfoRequestMessage. - * @memberof agentInterface - * @classdesc Represents an UpdatePeerInfoRequestMessage. - * @implements IUpdatePeerInfoRequestMessage - * @constructor - * @param {agentInterface.IUpdatePeerInfoRequestMessage=} [p] Properties to set - */ - function UpdatePeerInfoRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * UpdatePeerInfoRequestMessage publicKey. - * @member {string} publicKey - * @memberof agentInterface.UpdatePeerInfoRequestMessage - * @instance - */ - UpdatePeerInfoRequestMessage.prototype.publicKey = ""; - - /** - * UpdatePeerInfoRequestMessage currentNode. - * @member {boolean} currentNode - * @memberof agentInterface.UpdatePeerInfoRequestMessage - * @instance - */ - UpdatePeerInfoRequestMessage.prototype.currentNode = false; - - /** - * UpdatePeerInfoRequestMessage peerHost. - * @member {string} peerHost - * @memberof agentInterface.UpdatePeerInfoRequestMessage - * @instance - */ - UpdatePeerInfoRequestMessage.prototype.peerHost = ""; - - /** - * UpdatePeerInfoRequestMessage peerPort. - * @member {number} peerPort - * @memberof agentInterface.UpdatePeerInfoRequestMessage - * @instance - */ - UpdatePeerInfoRequestMessage.prototype.peerPort = 0; - - /** - * UpdatePeerInfoRequestMessage relayPublicKey. - * @member {string} relayPublicKey - * @memberof agentInterface.UpdatePeerInfoRequestMessage - * @instance - */ - UpdatePeerInfoRequestMessage.prototype.relayPublicKey = ""; - - /** - * Creates a new UpdatePeerInfoRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.UpdatePeerInfoRequestMessage - * @static - * @param {agentInterface.IUpdatePeerInfoRequestMessage=} [properties] Properties to set - * @returns {agentInterface.UpdatePeerInfoRequestMessage} UpdatePeerInfoRequestMessage instance - */ - UpdatePeerInfoRequestMessage.create = function create(properties) { - return new UpdatePeerInfoRequestMessage(properties); - }; - - /** - * Encodes the specified UpdatePeerInfoRequestMessage message. Does not implicitly {@link agentInterface.UpdatePeerInfoRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.UpdatePeerInfoRequestMessage - * @static - * @param {agentInterface.IUpdatePeerInfoRequestMessage} m UpdatePeerInfoRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdatePeerInfoRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); - if (m.currentNode != null && Object.hasOwnProperty.call(m, "currentNode")) - w.uint32(16).bool(m.currentNode); - if (m.peerHost != null && Object.hasOwnProperty.call(m, "peerHost")) - w.uint32(26).string(m.peerHost); - if (m.peerPort != null && Object.hasOwnProperty.call(m, "peerPort")) - w.uint32(32).int32(m.peerPort); - if (m.relayPublicKey != null && Object.hasOwnProperty.call(m, "relayPublicKey")) - w.uint32(42).string(m.relayPublicKey); - return w; - }; - - /** - * Encodes the specified UpdatePeerInfoRequestMessage message, length delimited. Does not implicitly {@link agentInterface.UpdatePeerInfoRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.UpdatePeerInfoRequestMessage - * @static - * @param {agentInterface.IUpdatePeerInfoRequestMessage} message UpdatePeerInfoRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdatePeerInfoRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdatePeerInfoRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.UpdatePeerInfoRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.UpdatePeerInfoRequestMessage} UpdatePeerInfoRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdatePeerInfoRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.UpdatePeerInfoRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.publicKey = r.string(); - break; - case 2: - m.currentNode = r.bool(); - break; - case 3: - m.peerHost = r.string(); - break; - case 4: - m.peerPort = r.int32(); - break; - case 5: - m.relayPublicKey = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes an UpdatePeerInfoRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.UpdatePeerInfoRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.UpdatePeerInfoRequestMessage} UpdatePeerInfoRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdatePeerInfoRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return UpdatePeerInfoRequestMessage; - })(); - - agentInterface.UpdatePeerInfoResponseMessage = (function() { - - /** - * Properties of an UpdatePeerInfoResponseMessage. - * @memberof agentInterface - * @interface IUpdatePeerInfoResponseMessage - * @property {boolean|null} [successful] UpdatePeerInfoResponseMessage successful - */ - - /** - * Constructs a new UpdatePeerInfoResponseMessage. - * @memberof agentInterface - * @classdesc Represents an UpdatePeerInfoResponseMessage. - * @implements IUpdatePeerInfoResponseMessage - * @constructor - * @param {agentInterface.IUpdatePeerInfoResponseMessage=} [p] Properties to set - */ - function UpdatePeerInfoResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * UpdatePeerInfoResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.UpdatePeerInfoResponseMessage - * @instance - */ - UpdatePeerInfoResponseMessage.prototype.successful = false; - - /** - * Creates a new UpdatePeerInfoResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.UpdatePeerInfoResponseMessage - * @static - * @param {agentInterface.IUpdatePeerInfoResponseMessage=} [properties] Properties to set - * @returns {agentInterface.UpdatePeerInfoResponseMessage} UpdatePeerInfoResponseMessage instance - */ - UpdatePeerInfoResponseMessage.create = function create(properties) { - return new UpdatePeerInfoResponseMessage(properties); - }; - - /** - * Encodes the specified UpdatePeerInfoResponseMessage message. Does not implicitly {@link agentInterface.UpdatePeerInfoResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.UpdatePeerInfoResponseMessage - * @static - * @param {agentInterface.IUpdatePeerInfoResponseMessage} m UpdatePeerInfoResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdatePeerInfoResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified UpdatePeerInfoResponseMessage message, length delimited. Does not implicitly {@link agentInterface.UpdatePeerInfoResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.UpdatePeerInfoResponseMessage - * @static - * @param {agentInterface.IUpdatePeerInfoResponseMessage} message UpdatePeerInfoResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdatePeerInfoResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdatePeerInfoResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.UpdatePeerInfoResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.UpdatePeerInfoResponseMessage} UpdatePeerInfoResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdatePeerInfoResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.UpdatePeerInfoResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes an UpdatePeerInfoResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.UpdatePeerInfoResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.UpdatePeerInfoResponseMessage} UpdatePeerInfoResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdatePeerInfoResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return UpdatePeerInfoResponseMessage; - })(); - - agentInterface.RequestRelayRequestMessage = (function() { - - /** - * Properties of a RequestRelayRequestMessage. - * @memberof agentInterface - * @interface IRequestRelayRequestMessage - * @property {string|null} [publicKey] RequestRelayRequestMessage publicKey - */ - - /** - * Constructs a new RequestRelayRequestMessage. - * @memberof agentInterface - * @classdesc Represents a RequestRelayRequestMessage. - * @implements IRequestRelayRequestMessage - * @constructor - * @param {agentInterface.IRequestRelayRequestMessage=} [p] Properties to set - */ - function RequestRelayRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * RequestRelayRequestMessage publicKey. - * @member {string} publicKey - * @memberof agentInterface.RequestRelayRequestMessage - * @instance - */ - RequestRelayRequestMessage.prototype.publicKey = ""; - - /** - * Creates a new RequestRelayRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.RequestRelayRequestMessage - * @static - * @param {agentInterface.IRequestRelayRequestMessage=} [properties] Properties to set - * @returns {agentInterface.RequestRelayRequestMessage} RequestRelayRequestMessage instance - */ - RequestRelayRequestMessage.create = function create(properties) { - return new RequestRelayRequestMessage(properties); - }; - - /** - * Encodes the specified RequestRelayRequestMessage message. Does not implicitly {@link agentInterface.RequestRelayRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.RequestRelayRequestMessage - * @static - * @param {agentInterface.IRequestRelayRequestMessage} m RequestRelayRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestRelayRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); - return w; - }; - - /** - * Encodes the specified RequestRelayRequestMessage message, length delimited. Does not implicitly {@link agentInterface.RequestRelayRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.RequestRelayRequestMessage - * @static - * @param {agentInterface.IRequestRelayRequestMessage} message RequestRelayRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestRelayRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RequestRelayRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.RequestRelayRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.RequestRelayRequestMessage} RequestRelayRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestRelayRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.RequestRelayRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.publicKey = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a RequestRelayRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.RequestRelayRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.RequestRelayRequestMessage} RequestRelayRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestRelayRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return RequestRelayRequestMessage; - })(); - - agentInterface.RequestRelayResponseMessage = (function() { - - /** - * Properties of a RequestRelayResponseMessage. - * @memberof agentInterface - * @interface IRequestRelayResponseMessage - * @property {boolean|null} [successful] RequestRelayResponseMessage successful - */ - - /** - * Constructs a new RequestRelayResponseMessage. - * @memberof agentInterface - * @classdesc Represents a RequestRelayResponseMessage. - * @implements IRequestRelayResponseMessage - * @constructor - * @param {agentInterface.IRequestRelayResponseMessage=} [p] Properties to set - */ - function RequestRelayResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * RequestRelayResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.RequestRelayResponseMessage - * @instance - */ - RequestRelayResponseMessage.prototype.successful = false; - - /** - * Creates a new RequestRelayResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.RequestRelayResponseMessage - * @static - * @param {agentInterface.IRequestRelayResponseMessage=} [properties] Properties to set - * @returns {agentInterface.RequestRelayResponseMessage} RequestRelayResponseMessage instance - */ - RequestRelayResponseMessage.create = function create(properties) { - return new RequestRelayResponseMessage(properties); - }; - - /** - * Encodes the specified RequestRelayResponseMessage message. Does not implicitly {@link agentInterface.RequestRelayResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.RequestRelayResponseMessage - * @static - * @param {agentInterface.IRequestRelayResponseMessage} m RequestRelayResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestRelayResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified RequestRelayResponseMessage message, length delimited. Does not implicitly {@link agentInterface.RequestRelayResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.RequestRelayResponseMessage - * @static - * @param {agentInterface.IRequestRelayResponseMessage} message RequestRelayResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestRelayResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RequestRelayResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.RequestRelayResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.RequestRelayResponseMessage} RequestRelayResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestRelayResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.RequestRelayResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a RequestRelayResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.RequestRelayResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.RequestRelayResponseMessage} RequestRelayResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestRelayResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return RequestRelayResponseMessage; - })(); - - agentInterface.RequestPunchRequestMessage = (function() { - - /** - * Properties of a RequestPunchRequestMessage. - * @memberof agentInterface - * @interface IRequestPunchRequestMessage - * @property {string|null} [publicKey] RequestPunchRequestMessage publicKey - */ - - /** - * Constructs a new RequestPunchRequestMessage. - * @memberof agentInterface - * @classdesc Represents a RequestPunchRequestMessage. - * @implements IRequestPunchRequestMessage - * @constructor - * @param {agentInterface.IRequestPunchRequestMessage=} [p] Properties to set - */ - function RequestPunchRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * RequestPunchRequestMessage publicKey. - * @member {string} publicKey - * @memberof agentInterface.RequestPunchRequestMessage - * @instance - */ - RequestPunchRequestMessage.prototype.publicKey = ""; - - /** - * Creates a new RequestPunchRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.RequestPunchRequestMessage - * @static - * @param {agentInterface.IRequestPunchRequestMessage=} [properties] Properties to set - * @returns {agentInterface.RequestPunchRequestMessage} RequestPunchRequestMessage instance - */ - RequestPunchRequestMessage.create = function create(properties) { - return new RequestPunchRequestMessage(properties); - }; - - /** - * Encodes the specified RequestPunchRequestMessage message. Does not implicitly {@link agentInterface.RequestPunchRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.RequestPunchRequestMessage - * @static - * @param {agentInterface.IRequestPunchRequestMessage} m RequestPunchRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestPunchRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); - return w; - }; - - /** - * Encodes the specified RequestPunchRequestMessage message, length delimited. Does not implicitly {@link agentInterface.RequestPunchRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.RequestPunchRequestMessage - * @static - * @param {agentInterface.IRequestPunchRequestMessage} message RequestPunchRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestPunchRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RequestPunchRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.RequestPunchRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.RequestPunchRequestMessage} RequestPunchRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestPunchRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.RequestPunchRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.publicKey = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a RequestPunchRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.RequestPunchRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.RequestPunchRequestMessage} RequestPunchRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestPunchRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return RequestPunchRequestMessage; - })(); - - agentInterface.RequestPunchResponseMessage = (function() { - - /** - * Properties of a RequestPunchResponseMessage. - * @memberof agentInterface - * @interface IRequestPunchResponseMessage - * @property {string|null} [address] RequestPunchResponseMessage address - */ - - /** - * Constructs a new RequestPunchResponseMessage. - * @memberof agentInterface - * @classdesc Represents a RequestPunchResponseMessage. - * @implements IRequestPunchResponseMessage - * @constructor - * @param {agentInterface.IRequestPunchResponseMessage=} [p] Properties to set - */ - function RequestPunchResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * RequestPunchResponseMessage address. - * @member {string} address - * @memberof agentInterface.RequestPunchResponseMessage - * @instance - */ - RequestPunchResponseMessage.prototype.address = ""; - - /** - * Creates a new RequestPunchResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.RequestPunchResponseMessage - * @static - * @param {agentInterface.IRequestPunchResponseMessage=} [properties] Properties to set - * @returns {agentInterface.RequestPunchResponseMessage} RequestPunchResponseMessage instance - */ - RequestPunchResponseMessage.create = function create(properties) { - return new RequestPunchResponseMessage(properties); - }; - - /** - * Encodes the specified RequestPunchResponseMessage message. Does not implicitly {@link agentInterface.RequestPunchResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.RequestPunchResponseMessage - * @static - * @param {agentInterface.IRequestPunchResponseMessage} m RequestPunchResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestPunchResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.address != null && Object.hasOwnProperty.call(m, "address")) - w.uint32(10).string(m.address); - return w; - }; - - /** - * Encodes the specified RequestPunchResponseMessage message, length delimited. Does not implicitly {@link agentInterface.RequestPunchResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.RequestPunchResponseMessage - * @static - * @param {agentInterface.IRequestPunchResponseMessage} message RequestPunchResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestPunchResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RequestPunchResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.RequestPunchResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.RequestPunchResponseMessage} RequestPunchResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestPunchResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.RequestPunchResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.address = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a RequestPunchResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.RequestPunchResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.RequestPunchResponseMessage} RequestPunchResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestPunchResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return RequestPunchResponseMessage; - })(); - - return agentInterface; -})(); - -module.exports = $root; - - -/***/ }) -/******/ ]); -}); -//# sourceMappingURL=browser-client.js.map \ No newline at end of file diff --git a/dist/browser-client.js.map b/dist/browser-client.js.map deleted file mode 100644 index 467840e5fa..0000000000 --- a/dist/browser-client.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack://browser-client/webpack/universalModuleDefinition","webpack://browser-client/webpack/bootstrap","webpack://browser-client/external \"protobufjs/minimal\"","webpack://browser-client/./src/agent/PolykeyClient.ts","webpack://browser-client/./node_modules/node-libs-browser/node_modules/buffer/index.js","webpack://browser-client/(webpack)/buildin/global.js","webpack://browser-client/external \"base64-js\"","webpack://browser-client/external \"ieee754\"","webpack://browser-client/external \"isarray\"","webpack://browser-client/./src/peers/PeerInfo.ts","webpack://browser-client/./proto/js/Peer.js","webpack://browser-client/./src/utils.ts","webpack://browser-client/external \"protobufjs\"","webpack://browser-client/./proto/js/Agent.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;AClFA,+C;;;;;;;ACAA,8CAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D,gCAAgC,mBAAO,CAAC,CAAmB;AAC3D,gBAAgB,mBAAO,CAAC,EAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA,uBAAuB,QAAQ;AAC/B,yDAAyD,MAAM;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uGAAuG,aAAa;AACpH;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,+FAA+F,eAAe;AAC9G;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF,sBAAsB;AAC9G;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,wFAAwF,UAAU;AAClG;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,wFAAwF;AACxF;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B;AACA;AACA;AACA;AACA,qFAAqF,UAAU;AAC/F;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,gGAAgG,oBAAoB;AACpH;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA,yFAAyF,0BAA0B;AACnH;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B;AACA;AACA;AACA;AACA,0FAA0F,0BAA0B;AACpH;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,6FAA6F,YAAY;AACzG;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,uFAAuF,YAAY;AACnG;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,wFAAwF,uBAAuB;AAC/G;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,2FAA2F,YAAY;AACvG;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,YAAY;AACtG;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,4FAA4F,wBAAwB;AACpH;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,wFAAwF,wBAAwB;AAChH;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,uFAAuF,qBAAqB;AAC5G;AACA;AACA;AACA;AACA;AACA,eAAe,6DAA6D;AAC5E;AACA;AACA;AACA;AACA,uFAAuF,qBAAqB;AAC5G;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,uFAAuF,qBAAqB;AAC5G;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,6FAA6F,2BAA2B;AACxH;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,yFAAyF;AACzF;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,4FAA4F,SAAS;AACrG;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,2FAA2F,YAAY;AACvG;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,2FAA2F,YAAY;AACvG;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACngBA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,aAAa,mBAAO,CAAC,CAAW;AAChC,cAAc,mBAAO,CAAC,CAAS;AAC/B,cAAc,mBAAO,CAAC,CAAS;;AAE/B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB,mDAAmD;AACxE;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,UAAU;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,uCAAuC,SAAS;AAChD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;;AAEA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD,EAAE;AAClD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAwB,eAAe;AACvC;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,wBAAwB,QAAQ;AAChC;AACA,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,qBAAqB,QAAQ;AAC7B;AACA;AACA,GAAG;AACH;AACA,eAAe,SAAS;AACxB;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,gBAAgB;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AC5vDA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;;;;;;;ACnBA,sC;;;;;;ACAA,oC;;;;;;ACAA,oC;;;;;;;ACAa;AACb,8CAA8C,cAAc;AAC5D,eAAe,mBAAO,CAAC,CAAqB;AAC5C,gBAAgB,mBAAO,CAAC,CAAU;AAClC;AACA;AACA,qDAAqD,KAAK,GAAG,KAAK;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,QAAQ,GAAG,UAAU;AACpF;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,UAAU,GAAG,UAAU;AACvE;AACA;AACA,kBAAkB,UAAU,GAAG,UAAU;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,cAAc;AACvE;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,IAAI,IAAI,EAAE,MAAM,IAAI,aAAa,IAAI;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjGA;AACa;;AAEb,gBAAgB,mBAAO,CAAC,CAAoB;;AAE5C;AACA;;AAEA;AACA,0EAA0E;;AAE1E;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC,mBAAmB,QAAQ;AAC3B,mBAAmB,QAAQ;AAC3B;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC,mBAAmB,QAAQ;AAC3B,mBAAmB,QAAQ;AAC3B,qBAAqB,KAAK;AAC1B;AACA;AACA;AACA;;AAEA;AACA,gCAAgC,qCAAqC;AACrE;AACA;AACA,kBAAkB;AAClB,mBAAmB,WAAW;AAC9B,mBAAmB,0BAA0B;AAC7C;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2BAA2B;AAC9C,mBAAmB,uCAAuC;AAC1D,qBAAqB;AACrB;AACA;AACA;AACA;AACA,SAAS,WAAW,uBAAuB;;AAE3C;AACA;AACA;AACA;AACA;AACA,mBAAmB,2BAA2B;AAC9C,qBAAqB,mCAAmC;AACxD;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC,sBAAsB,kCAAkC;AACxD,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA;;AAEA;AACA,2EAA2E,8CAA8C;AACzH;AACA;AACA;AACA,mBAAmB,2BAA2B;AAC9C,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6FAA6F,8CAA8C;AAC3I;AACA;AACA;AACA,mBAAmB,2BAA2B;AAC9C,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,0BAA0B;AAC/C,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,0BAA0B;AAC/C,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,cAAc;AACd,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC,sBAAsB,oCAAoC;AAC1D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gCAAgC;AACnD;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,8CAA8C;AAClE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gCAAgC;AACnD,qBAAqB,8BAA8B;AACnD;AACA;AACA;AACA;;AAEA;AACA,+EAA+E,kDAAkD;AACjI;AACA;AACA;AACA,mBAAmB,+BAA+B;AAClD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iGAAiG,kDAAkD;AACnJ;AACA;AACA;AACA,mBAAmB,+BAA+B;AAClD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,8BAA8B;AACnD,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,8BAA8B;AACnD,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gCAAgC;AACnD;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gCAAgC;AACnD,qBAAqB,8BAA8B;AACnD;AACA;AACA;AACA;;AAEA;AACA,+EAA+E,kDAAkD;AACjI;AACA;AACA;AACA,mBAAmB,+BAA+B;AAClD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iGAAiG,kDAAkD;AACnJ;AACA;AACA;AACA,mBAAmB,+BAA+B;AAClD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,8BAA8B;AACnD,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,8BAA8B;AACnD,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,4CAA4C;AAClE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,oCAAoC;AACvD;AACA;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,uCAAuC;AAC3D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,oCAAoC;AACvD,qBAAqB,kCAAkC;AACvD;AACA;AACA;AACA;;AAEA;AACA,mFAAmF,sDAAsD;AACzI;AACA;AACA;AACA,mBAAmB,mCAAmC;AACtD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA,+BAA+B,2BAA2B;AAC1D;AACA;AACA;AACA;;AAEA;AACA,qGAAqG,sDAAsD;AAC3J;AACA;AACA;AACA,mBAAmB,mCAAmC;AACtD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,kCAAkC;AACvD,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,kCAAkC;AACvD,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6BAA6B;AAChD;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6BAA6B;AAChD,qBAAqB,2BAA2B;AAChD;AACA;AACA;AACA;;AAEA;AACA,4EAA4E,+CAA+C;AAC3H;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8FAA8F,+CAA+C;AAC7I;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,2BAA2B;AAChD,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,2BAA2B;AAChD,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,cAAc;AACd,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,kCAAkC;AACxD,sBAAsB,aAAa;AACnC,sBAAsB,gBAAgB;AACtC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2BAA2B;AAC9C;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2BAA2B;AAC9C,qBAAqB,yBAAyB;AAC9C;AACA;AACA;AACA;;AAEA;AACA,0EAA0E,6CAA6C;AACvH;AACA;AACA;AACA,mBAAmB,0BAA0B;AAC7C,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4FAA4F,6CAA6C;AACzI;AACA;AACA;AACA,mBAAmB,0BAA0B;AAC7C,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,yBAAyB;AAC9C,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,yBAAyB;AAC9C,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,qBAAqB,qCAAqC;AAC1D;AACA;AACA;AACA;;AAEA;AACA,sFAAsF,yDAAyD;AAC/I;AACA;AACA;AACA,mBAAmB,sCAAsC;AACzD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wGAAwG,yDAAyD;AACjK;AACA;AACA;AACA,mBAAmB,sCAAsC;AACzD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,qCAAqC;AAC1D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,qCAAqC;AAC1D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,qBAAqB,sCAAsC;AAC3D;AACA;AACA;AACA;;AAEA;AACA,uFAAuF,0DAA0D;AACjJ;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yGAAyG,0DAA0D;AACnK;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,sCAAsC;AAC3D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,sCAAsC;AAC3D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sCAAsC;AACzD;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sCAAsC;AACzD,qBAAqB,oCAAoC;AACzD;AACA;AACA;AACA;;AAEA;AACA,qFAAqF,wDAAwD;AAC7I;AACA;AACA;AACA,mBAAmB,qCAAqC;AACxD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uGAAuG,wDAAwD;AAC/J;AACA;AACA;AACA,mBAAmB,qCAAqC;AACxD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,oCAAoC;AACzD,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,oCAAoC;AACzD,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,qBAAqB,qCAAqC;AAC1D;AACA;AACA;AACA;;AAEA;AACA,sFAAsF,yDAAyD;AAC/I;AACA;AACA;AACA,mBAAmB,sCAAsC;AACzD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wGAAwG,yDAAyD;AACjK;AACA;AACA;AACA,mBAAmB,sCAAsC;AACzD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,qCAAqC;AAC1D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,qCAAqC;AAC1D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,mCAAmC;AACtD;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,mCAAmC;AACtD,qBAAqB,iCAAiC;AACtD;AACA;AACA;AACA;;AAEA;AACA,kFAAkF,qDAAqD;AACvI;AACA;AACA;AACA,mBAAmB,kCAAkC;AACrD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oGAAoG,qDAAqD;AACzJ;AACA;AACA;AACA,mBAAmB,kCAAkC;AACrD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,iCAAiC;AACtD,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,iCAAiC;AACtD,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,qBAAqB,uCAAuC;AAC5D;AACA;AACA;AACA;;AAEA;AACA,wFAAwF,2DAA2D;AACnJ;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0GAA0G,2DAA2D;AACrK;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D,qBAAqB,wCAAwC;AAC7D;AACA;AACA;AACA;;AAEA;AACA,yFAAyF,4DAA4D;AACrJ;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2GAA2G,4DAA4D;AACvK;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,wCAAwC;AAC7D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,wCAAwC;AAC7D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sCAAsC;AACzD;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sCAAsC;AACzD,qBAAqB,oCAAoC;AACzD;AACA;AACA;AACA;;AAEA;AACA,qFAAqF,wDAAwD;AAC7I;AACA;AACA;AACA,mBAAmB,qCAAqC;AACxD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uGAAuG,wDAAwD;AAC/J;AACA;AACA;AACA,mBAAmB,qCAAqC;AACxD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,oCAAoC;AACzD,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,oCAAoC;AACzD,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,qBAAqB,qCAAqC;AAC1D;AACA;AACA;AACA;;AAEA;AACA,sFAAsF,yDAAyD;AAC/I;AACA;AACA;AACA,mBAAmB,sCAAsC;AACzD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wGAAwG,yDAAyD;AACjK;AACA;AACA;AACA,mBAAmB,sCAAsC;AACzD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,qCAAqC;AAC1D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,qCAAqC;AAC1D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA,CAAC;;AAED;;;;;;;;AC1hEa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D,gCAAgC,mBAAO,CAAC,EAAY;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;AC3DA,uC;;;;;;;ACAA;AACa;;AAEb,gBAAgB,mBAAO,CAAC,CAAoB;;AAE5C;AACA;;AAEA;AACA,0EAA0E;;AAE1E;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,qCAAqC;AAC3D,sBAAsB,aAAa;AACnC,sBAAsB,YAAY;AAClC,sBAAsB,gBAAgB;AACtC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,8BAA8B;AACjD;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,gCAAgC;AACpD;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,8BAA8B;AACjD,qBAAqB,4BAA4B;AACjD;AACA;AACA;AACA;;AAEA;AACA,4EAA4E,gDAAgD;AAC5H;AACA;AACA;AACA,mBAAmB,6BAA6B;AAChD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8FAA8F,gDAAgD;AAC9I;AACA;AACA;AACA,mBAAmB,6BAA6B;AAChD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,4BAA4B;AACjD,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,4BAA4B;AACjD,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,8BAA8B;AACjD;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,8BAA8B;AACjD,qBAAqB,4BAA4B;AACjD;AACA;AACA;AACA;;AAEA;AACA,4EAA4E,gDAAgD;AAC5H;AACA;AACA;AACA,mBAAmB,6BAA6B;AAChD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8FAA8F,gDAAgD;AAC9I;AACA;AACA;AACA,mBAAmB,6BAA6B;AAChD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,4BAA4B;AACjD,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,4BAA4B;AACjD,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,cAAc;AACd,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB,kBAAkB,OAAO;AACzB;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,oCAAoC;AAC1D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,+BAA+B;AACnD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,qBAAqB,0CAA0C;AAC/D;AACA;AACA;AACA;;AAEA;AACA,0FAA0F,8DAA8D;AACxJ;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4GAA4G,8DAA8D;AAC1K;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,0CAA0C;AAC/D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,0CAA0C;AAC/D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,qBAAqB,0CAA0C;AAC/D;AACA;AACA;AACA;;AAEA;AACA,0FAA0F,8DAA8D;AACxJ;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4GAA4G,8DAA8D;AAC1K;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,0CAA0C;AAC/D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,0CAA0C;AAC/D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE,qBAAqB,2CAA2C;AAChE;AACA;AACA;AACA;;AAEA;AACA,2FAA2F,+DAA+D;AAC1J;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6GAA6G,+DAA+D;AAC5K;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,2CAA2C;AAChE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,2CAA2C;AAChE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,qBAAqB,qCAAqC;AAC1D;AACA;AACA;AACA;;AAEA;AACA,qFAAqF,yDAAyD;AAC9I;AACA;AACA;AACA,mBAAmB,sCAAsC;AACzD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uGAAuG,yDAAyD;AAChK;AACA;AACA;AACA,mBAAmB,sCAAsC;AACzD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,qCAAqC;AAC1D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,qCAAqC;AAC1D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,qBAAqB,sCAAsC;AAC3D;AACA;AACA;AACA;;AAEA;AACA,sFAAsF,0DAA0D;AAChJ;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wGAAwG,0DAA0D;AAClK;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,sCAAsC;AAC3D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,sCAAsC;AAC3D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,qBAAqB,uCAAuC;AAC5D;AACA;AACA;AACA;;AAEA;AACA,uFAAuF,2DAA2D;AAClJ;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yGAAyG,2DAA2D;AACpK;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,oBAAoB;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D;AACA;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,eAAe;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D,qBAAqB,wCAAwC;AAC7D;AACA;AACA;AACA;;AAEA;AACA,wFAAwF,4DAA4D;AACpJ;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;;AAEA;AACA,0GAA0G,4DAA4D;AACtK;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,wCAAwC;AAC7D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,wCAAwC;AAC7D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,qBAAqB,sCAAsC;AAC3D;AACA;AACA;AACA;;AAEA;AACA,sFAAsF,0DAA0D;AAChJ;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wGAAwG,0DAA0D;AAClK;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,sCAAsC;AAC3D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,sCAAsC;AAC3D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,qBAAqB,uCAAuC;AAC5D;AACA;AACA;AACA;;AAEA;AACA,uFAAuF,2DAA2D;AAClJ;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yGAAyG,2DAA2D;AACpK;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D,qBAAqB,wCAAwC;AAC7D;AACA;AACA;AACA;;AAEA;AACA,wFAAwF,4DAA4D;AACpJ;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0GAA0G,4DAA4D;AACtK;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,wCAAwC;AAC7D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,wCAAwC;AAC7D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,qBAAqB,yCAAyC;AAC9D;AACA;AACA;AACA;;AAEA;AACA,yFAAyF,6DAA6D;AACtJ;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2GAA2G,6DAA6D;AACxK;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,yCAAyC;AAC9D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,yCAAyC;AAC9D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,qBAAqB,yCAAyC;AAC9D;AACA;AACA;AACA;;AAEA;AACA,yFAAyF,6DAA6D;AACtJ;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2GAA2G,6DAA6D;AACxK;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,yCAAyC;AAC9D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,yCAAyC;AAC9D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,qBAAqB,0CAA0C;AAC/D;AACA;AACA;AACA;;AAEA;AACA,0FAA0F,8DAA8D;AACxJ;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4GAA4G,8DAA8D;AAC1K;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,0CAA0C;AAC/D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,0CAA0C;AAC/D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,qBAAqB,yCAAyC;AAC9D;AACA;AACA;AACA;;AAEA;AACA,yFAAyF,6DAA6D;AACtJ;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2GAA2G,6DAA6D;AACxK;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,yCAAyC;AAC9D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,yCAAyC;AAC9D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,qBAAqB,0CAA0C;AAC/D;AACA;AACA;AACA;;AAEA;AACA,0FAA0F,8DAA8D;AACxJ;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4GAA4G,8DAA8D;AAC1K;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,0CAA0C;AAC/D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,0CAA0C;AAC/D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D,qBAAqB,wCAAwC;AAC7D;AACA;AACA;AACA;;AAEA;AACA,wFAAwF,4DAA4D;AACpJ;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0GAA0G,4DAA4D;AACtK;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,wCAAwC;AAC7D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,wCAAwC;AAC7D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,oBAAoB;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D;AACA;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,eAAe;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,qBAAqB,yCAAyC;AAC9D;AACA;AACA;AACA;;AAEA;AACA,yFAAyF,6DAA6D;AACtJ;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA,+BAA+B,yBAAyB;AACxD;AACA;AACA;AACA;;AAEA;AACA,2GAA2G,6DAA6D;AACxK;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,yCAAyC;AAC9D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,yCAAyC;AAC9D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,8CAA8C;AACjE;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,8CAA8C;AACjE,qBAAqB,4CAA4C;AACjE;AACA;AACA;AACA;;AAEA;AACA,4FAA4F,gEAAgE;AAC5J;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8GAA8G,gEAAgE;AAC9K;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,4CAA4C;AACjE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,4CAA4C;AACjE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,oBAAoB;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,+CAA+C;AAClE;AACA;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,eAAe;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,+CAA+C;AAClE,qBAAqB,6CAA6C;AAClE;AACA;AACA;AACA;;AAEA;AACA,6FAA6F,iEAAiE;AAC9J;AACA;AACA;AACA,mBAAmB,8CAA8C;AACjE,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA,+BAA+B,yBAAyB;AACxD;AACA;AACA;AACA;;AAEA;AACA,+GAA+G,iEAAiE;AAChL;AACA;AACA;AACA,mBAAmB,8CAA8C;AACjE,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,6CAA6C;AAClE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,6CAA6C;AAClE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,qBAAqB,sCAAsC;AAC3D;AACA;AACA;AACA;;AAEA;AACA,sFAAsF,0DAA0D;AAChJ;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wGAAwG,0DAA0D;AAClK;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,sCAAsC;AAC3D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,sCAAsC;AAC3D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,qBAAqB,uCAAuC;AAC5D;AACA;AACA;AACA;;AAEA;AACA,uFAAuF,2DAA2D;AAClJ;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yGAAyG,2DAA2D;AACpK;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,qBAAqB,uCAAuC;AAC5D;AACA;AACA;AACA;;AAEA;AACA,uFAAuF,2DAA2D;AAClJ;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yGAAyG,2DAA2D;AACpK;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D,qBAAqB,wCAAwC;AAC7D;AACA;AACA;AACA;;AAEA;AACA,wFAAwF,4DAA4D;AACpJ;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0GAA0G,4DAA4D;AACtK;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,wCAAwC;AAC7D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,wCAAwC;AAC7D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,qBAAqB,0CAA0C;AAC/D;AACA;AACA;AACA;;AAEA;AACA,0FAA0F,8DAA8D;AACxJ;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4GAA4G,8DAA8D;AAC1K;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,0CAA0C;AAC/D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,0CAA0C;AAC/D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE,qBAAqB,2CAA2C;AAChE;AACA;AACA;AACA;;AAEA;AACA,2FAA2F,+DAA+D;AAC1J;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6GAA6G,+DAA+D;AAC5K;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,2CAA2C;AAChE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,2CAA2C;AAChE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,qBAAqB,yCAAyC;AAC9D;AACA;AACA;AACA;;AAEA;AACA,yFAAyF,6DAA6D;AACtJ;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2GAA2G,6DAA6D;AACxK;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,yCAAyC;AAC9D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,yCAAyC;AAC9D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,oBAAoB;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D;AACA;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,eAAe;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,qBAAqB,0CAA0C;AAC/D;AACA;AACA;AACA;;AAEA;AACA,0FAA0F,8DAA8D;AACxJ;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA,+BAA+B,0BAA0B;AACzD;AACA;AACA;AACA;;AAEA;AACA,4GAA4G,8DAA8D;AAC1K;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,0CAA0C;AAC/D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,0CAA0C;AAC/D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC,sBAAsB,gBAAgB;AACtC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,qBAAqB,0CAA0C;AAC/D;AACA;AACA;AACA;;AAEA;AACA,0FAA0F,8DAA8D;AACxJ;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4GAA4G,8DAA8D;AAC1K;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,0CAA0C;AAC/D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,0CAA0C;AAC/D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE,qBAAqB,2CAA2C;AAChE;AACA;AACA;AACA;;AAEA;AACA,2FAA2F,+DAA+D;AAC1J;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6GAA6G,+DAA+D;AAC5K;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,2CAA2C;AAChE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,2CAA2C;AAChE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE,qBAAqB,2CAA2C;AAChE;AACA;AACA;AACA;;AAEA;AACA,2FAA2F,+DAA+D;AAC1J;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6GAA6G,+DAA+D;AAC5K;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,2CAA2C;AAChE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,2CAA2C;AAChE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,8CAA8C;AACjE;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,8CAA8C;AACjE,qBAAqB,4CAA4C;AACjE;AACA;AACA;AACA;;AAEA;AACA,4FAA4F,gEAAgE;AAC5J;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8GAA8G,gEAAgE;AAC9K;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,4CAA4C;AACjE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,4CAA4C;AACjE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,qBAAqB,uCAAuC;AAC5D;AACA;AACA;AACA;;AAEA;AACA,uFAAuF,2DAA2D;AAClJ;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yGAAyG,2DAA2D;AACpK;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,gBAAgB;AACtC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D,qBAAqB,wCAAwC;AAC7D;AACA;AACA;AACA;;AAEA;AACA,wFAAwF,4DAA4D;AACpJ;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0GAA0G,4DAA4D;AACtK;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,wCAAwC;AAC7D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,wCAAwC;AAC7D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,qBAAqB,uCAAuC;AAC5D;AACA;AACA;AACA;;AAEA;AACA,uFAAuF,2DAA2D;AAClJ;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yGAAyG,2DAA2D;AACpK;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D,qBAAqB,wCAAwC;AAC7D;AACA;AACA;AACA;;AAEA;AACA,wFAAwF,4DAA4D;AACpJ;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0GAA0G,4DAA4D;AACtK;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,wCAAwC;AAC7D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,wCAAwC;AAC7D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,qBAAqB,sCAAsC;AAC3D;AACA;AACA;AACA;;AAEA;AACA,sFAAsF,0DAA0D;AAChJ;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wGAAwG,0DAA0D;AAClK;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,sCAAsC;AAC3D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,sCAAsC;AAC3D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,oBAAoB;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D;AACA;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,eAAe;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,qBAAqB,uCAAuC;AAC5D;AACA;AACA;AACA;;AAEA;AACA,uFAAuF,2DAA2D;AAClJ;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;;AAEA;AACA,yGAAyG,2DAA2D;AACpK;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sCAAsC;AACzD;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sCAAsC;AACzD,qBAAqB,oCAAoC;AACzD;AACA;AACA;AACA;;AAEA;AACA,oFAAoF,wDAAwD;AAC5I;AACA;AACA;AACA,mBAAmB,qCAAqC;AACxD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sGAAsG,wDAAwD;AAC9J;AACA;AACA;AACA,mBAAmB,qCAAqC;AACxD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,oCAAoC;AACzD,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,oCAAoC;AACzD,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,qBAAqB,qCAAqC;AAC1D;AACA;AACA;AACA;;AAEA;AACA,qFAAqF,yDAAyD;AAC9I;AACA;AACA;AACA,mBAAmB,sCAAsC;AACzD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uGAAuG,yDAAyD;AAChK;AACA;AACA;AACA,mBAAmB,sCAAsC;AACzD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,qCAAqC;AAC1D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,qCAAqC;AAC1D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,iDAAiD;AACpE;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,iDAAiD;AACpE,qBAAqB,+CAA+C;AACpE;AACA;AACA;AACA;;AAEA;AACA,+FAA+F,mEAAmE;AAClK;AACA;AACA;AACA,mBAAmB,gDAAgD;AACnE,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iHAAiH,mEAAmE;AACpL;AACA;AACA;AACA,mBAAmB,gDAAgD;AACnE,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,+CAA+C;AACpE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,+CAA+C;AACpE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kDAAkD;AACrE;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kDAAkD;AACrE,qBAAqB,gDAAgD;AACrE;AACA;AACA;AACA;;AAEA;AACA,gGAAgG,oEAAoE;AACpK;AACA;AACA;AACA,mBAAmB,iDAAiD;AACpE,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kHAAkH,oEAAoE;AACtL;AACA;AACA;AACA,mBAAmB,iDAAiD;AACpE,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,gDAAgD;AACrE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,gDAAgD;AACrE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC,sBAAsB,gBAAgB;AACtC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,qBAAqB,0CAA0C;AAC/D;AACA;AACA;AACA;;AAEA;AACA,0FAA0F,8DAA8D;AACxJ;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4GAA4G,8DAA8D;AAC1K;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,0CAA0C;AAC/D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,0CAA0C;AAC/D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE,qBAAqB,2CAA2C;AAChE;AACA;AACA;AACA;;AAEA;AACA,2FAA2F,+DAA+D;AAC1J;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6GAA6G,+DAA+D;AAC5K;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,2CAA2C;AAChE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,2CAA2C;AAChE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,qBAAqB,uCAAuC;AAC5D;AACA;AACA;AACA;;AAEA;AACA,uFAAuF,2DAA2D;AAClJ;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yGAAyG,2DAA2D;AACpK;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D,qBAAqB,wCAAwC;AAC7D;AACA;AACA;AACA;;AAEA;AACA,wFAAwF,4DAA4D;AACpJ;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0GAA0G,4DAA4D;AACtK;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,wCAAwC;AAC7D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,wCAAwC;AAC7D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,qBAAqB,sCAAsC;AAC3D;AACA;AACA;AACA;;AAEA;AACA,sFAAsF,0DAA0D;AAChJ;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wGAAwG,0DAA0D;AAClK;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,sCAAsC;AAC3D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,sCAAsC;AAC3D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,qBAAqB,uCAAuC;AAC5D;AACA;AACA;AACA;;AAEA;AACA,uFAAuF,2DAA2D;AAClJ;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yGAAyG,2DAA2D;AACpK;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,qBAAqB,qCAAqC;AAC1D;AACA;AACA;AACA;;AAEA;AACA,qFAAqF,yDAAyD;AAC9I;AACA;AACA;AACA,mBAAmB,sCAAsC;AACzD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uGAAuG,yDAAyD;AAChK;AACA;AACA;AACA,mBAAmB,sCAAsC;AACzD,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,qCAAqC;AAC1D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,qCAAqC;AAC1D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,qBAAqB,sCAAsC;AAC3D;AACA;AACA;AACA;;AAEA;AACA,sFAAsF,0DAA0D;AAChJ;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wGAAwG,0DAA0D;AAClK;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,sCAAsC;AAC3D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,sCAAsC;AAC3D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,qBAAqB,sCAAsC;AAC3D;AACA;AACA;AACA;;AAEA;AACA,sFAAsF,0DAA0D;AAChJ;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wGAAwG,0DAA0D;AAClK;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,sCAAsC;AAC3D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,sCAAsC;AAC3D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,qBAAqB,uCAAuC;AAC5D;AACA;AACA;AACA;;AAEA;AACA,uFAAuF,2DAA2D;AAClJ;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yGAAyG,2DAA2D;AACpK;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,qBAAqB,sCAAsC;AAC3D;AACA;AACA;AACA;;AAEA;AACA,sFAAsF,0DAA0D;AAChJ;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wGAAwG,0DAA0D;AAClK;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,sCAAsC;AAC3D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,sCAAsC;AAC3D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,qBAAqB,uCAAuC;AAC5D;AACA;AACA;AACA;;AAEA;AACA,uFAAuF,2DAA2D;AAClJ;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yGAAyG,2DAA2D;AACpK;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,8CAA8C;AACjE;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,8CAA8C;AACjE,qBAAqB,4CAA4C;AACjE;AACA;AACA;AACA;;AAEA;AACA,4FAA4F,gEAAgE;AAC5J;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8GAA8G,gEAAgE;AAC9K;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,4CAA4C;AACjE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,4CAA4C;AACjE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,+CAA+C;AAClE;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,+CAA+C;AAClE,qBAAqB,6CAA6C;AAClE;AACA;AACA;AACA;;AAEA;AACA,6FAA6F,iEAAiE;AAC9J;AACA;AACA;AACA,mBAAmB,8CAA8C;AACjE,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,+GAA+G,iEAAiE;AAChL;AACA;AACA;AACA,mBAAmB,8CAA8C;AACjE,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,6CAA6C;AAClE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,6CAA6C;AAClE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,qBAAqB,uCAAuC;AAC5D;AACA;AACA;AACA;;AAEA;AACA,uFAAuF,2DAA2D;AAClJ;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yGAAyG,2DAA2D;AACpK;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,uCAAuC;AAC5D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,oBAAoB;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D;AACA;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,eAAe;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D,qBAAqB,wCAAwC;AAC7D;AACA;AACA;AACA;;AAEA;AACA,wFAAwF,4DAA4D;AACpJ;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA,+BAA+B,yBAAyB;AACxD;AACA;AACA;AACA;;AAEA;AACA,0GAA0G,4DAA4D;AACtK;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,wCAAwC;AAC7D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,wCAAwC;AAC7D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE,qBAAqB,2CAA2C;AAChE;AACA;AACA;AACA;;AAEA;AACA,2FAA2F,+DAA+D;AAC1J;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6GAA6G,+DAA+D;AAC5K;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,2CAA2C;AAChE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,2CAA2C;AAChE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,8CAA8C;AACjE;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,8CAA8C;AACjE,qBAAqB,4CAA4C;AACjE;AACA;AACA;AACA;;AAEA;AACA,4FAA4F,gEAAgE;AAC5J;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8GAA8G,gEAAgE;AAC9K;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,4CAA4C;AACjE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,4CAA4C;AACjE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC,sBAAsB,aAAa;AACnC,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,8CAA8C;AACjE;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,8CAA8C;AACjE,qBAAqB,4CAA4C;AACjE;AACA;AACA;AACA;;AAEA;AACA,4FAA4F,gEAAgE;AAC5J;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8GAA8G,gEAAgE;AAC9K;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,4CAA4C;AACjE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,4CAA4C;AACjE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,+CAA+C;AAClE;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,+CAA+C;AAClE,qBAAqB,6CAA6C;AAClE;AACA;AACA;AACA;;AAEA;AACA,6FAA6F,iEAAiE;AAC9J;AACA;AACA;AACA,mBAAmB,8CAA8C;AACjE,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,+GAA+G,iEAAiE;AAChL;AACA;AACA;AACA,mBAAmB,8CAA8C;AACjE,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,6CAA6C;AAClE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,6CAA6C;AAClE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,qBAAqB,0CAA0C;AAC/D;AACA;AACA;AACA;;AAEA;AACA,0FAA0F,8DAA8D;AACxJ;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4GAA4G,8DAA8D;AAC1K;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,0CAA0C;AAC/D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,0CAA0C;AAC/D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE,qBAAqB,2CAA2C;AAChE;AACA;AACA;AACA;;AAEA;AACA,2FAA2F,+DAA+D;AAC1J;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6GAA6G,+DAA+D;AAC5K;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,2CAA2C;AAChE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,2CAA2C;AAChE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,qBAAqB,0CAA0C;AAC/D;AACA;AACA;AACA;;AAEA;AACA,0FAA0F,8DAA8D;AACxJ;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4GAA4G,8DAA8D;AAC1K;AACA;AACA;AACA,mBAAmB,2CAA2C;AAC9D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,0CAA0C;AAC/D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,0CAA0C;AAC/D,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,YAAY;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE;AACA;AACA;AACA,oDAAoD,eAAe;AACnE;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6CAA6C;AAChE,qBAAqB,2CAA2C;AAChE;AACA;AACA;AACA;;AAEA;AACA,2FAA2F,+DAA+D;AAC1J;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6GAA6G,+DAA+D;AAC5K;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D,mBAAmB,iBAAiB;AACpC,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,mBAAmB,OAAO;AAC1B,qBAAqB,2CAA2C;AAChE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C,qBAAqB,2CAA2C;AAChE,oBAAoB,MAAM;AAC1B,oBAAoB,6BAA6B;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA,CAAC;;AAED","file":"browser-client.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"browser-client\"] = factory();\n\telse\n\t\troot[\"browser-client\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1);\n","module.exports = require(\"protobufjs/minimal\");","\"use strict\";\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst PeerInfo_1 = __importStar(require(\"../peers/PeerInfo\"));\nconst Agent_1 = require(\"../../proto/js/Agent\");\nclass PolykeyClient {\n constructor(getStream) {\n this.getStream = getStream;\n }\n async sendRequestToAgent(request) {\n const stream = this.getStream();\n const responseList = await new Promise((resolve, reject) => {\n try {\n const responseList = [];\n stream.on('data', (data) => {\n if (data instanceof Uint8Array) {\n responseList.push(data);\n }\n else {\n responseList.push(...data);\n }\n });\n stream.on('error', (err) => {\n reject(err);\n });\n stream.on('end', () => {\n resolve(responseList);\n });\n if (!stream.writableEnded) {\n stream.write(request);\n }\n }\n catch (err) {\n reject(err);\n }\n });\n return responseList;\n }\n async handleAgentCommunication(type, nodePath, request) {\n // Encode message and sent\n const agentMessage = Agent_1.agentInterface.AgentMessage.encodeDelimited({\n type: type,\n isResponse: false,\n nodePath: nodePath,\n subMessage: request,\n }).finish();\n const responseList = await this.sendRequestToAgent(agentMessage);\n const agentMessageList = [];\n for (const response of responseList.values()) {\n const { subMessage, type } = Agent_1.agentInterface.AgentMessage.decodeDelimited(response);\n if (type == Agent_1.agentInterface.AgentMessageType.ERROR) {\n const { error } = Agent_1.agentInterface.ErrorMessage.decodeDelimited(subMessage);\n const reason = new Error(`Agent Error: ${error}`);\n throw reason;\n }\n else {\n agentMessageList.push(Agent_1.agentInterface.AgentMessage.decodeDelimited(response));\n }\n }\n return agentMessageList;\n }\n async registerNode(path, passphrase) {\n var _a;\n const registerNodeRequest = Agent_1.agentInterface.RegisterNodeRequestMessage.encodeDelimited({ passphrase }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.REGISTER_NODE, path, registerNodeRequest);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.REGISTER_NODE)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.RegisterNodeResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async newNode(path, userId, passphrase, nbits) {\n var _a;\n const newNodeRequest = Agent_1.agentInterface.NewNodeRequestMessage.encodeDelimited({\n userId,\n passphrase,\n nbits,\n }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.NEW_NODE, path, newNodeRequest);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.NEW_NODE)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.NewNodeResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async listNodes(unlockedOnly = true) {\n var _a;\n const newNodeRequest = Agent_1.agentInterface.ListNodesRequestMessage.encodeDelimited({ unlockedOnly }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_NODES, undefined, newNodeRequest);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_NODES)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { nodes } = Agent_1.agentInterface.ListNodesResponseMessage.decodeDelimited(subMessage);\n return nodes;\n }\n /////////////////////\n // Key commands //\n /////////////////////\n async deriveKey(nodePath, keyName, passphrase) {\n var _a;\n const request = Agent_1.agentInterface.DeriveKeyRequestMessage.encodeDelimited({ keyName, passphrase }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DERIVE_KEY, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DERIVE_KEY)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.DeriveKeyResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async deleteKey(nodePath, keyName) {\n var _a;\n const request = Agent_1.agentInterface.DeleteKeyRequestMessage.encodeDelimited({ keyName }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DELETE_KEY, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DELETE_KEY)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.DeleteKeyResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async listKeys(nodePath) {\n var _a;\n const request = Agent_1.agentInterface.ListKeysRequestMessage.encodeDelimited({}).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_KEYS, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_KEYS)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { keyNames } = Agent_1.agentInterface.ListKeysResponseMessage.decodeDelimited(subMessage);\n return keyNames;\n }\n async getKey(nodePath, keyName) {\n var _a;\n const request = Agent_1.agentInterface.GetKeyRequestMessage.encodeDelimited({ keyName }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.GET_KEY, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.GET_KEY)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { keyContent } = Agent_1.agentInterface.GetKeyResponseMessage.decodeDelimited(subMessage);\n return keyContent;\n }\n async getPrimaryKeyPair(nodePath, includePrivateKey = false) {\n var _a;\n const request = Agent_1.agentInterface.GetPrimaryKeyPairRequestMessage.encodeDelimited({ includePrivateKey }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.GET_PRIMARY_KEYPAIR, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.GET_PRIMARY_KEYPAIR)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { publicKey, privateKey } = Agent_1.agentInterface.GetPrimaryKeyPairResponseMessage.decodeDelimited(subMessage);\n return { publicKey, privateKey };\n }\n /////////////////////\n // Crypto commands //\n /////////////////////\n async signFile(nodePath, filePath, privateKeyPath, passphrase) {\n var _a;\n const request = Agent_1.agentInterface.SignFileRequestMessage.encodeDelimited({\n filePath,\n privateKeyPath,\n passphrase,\n }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.SIGN_FILE, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.SIGN_FILE)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { signaturePath } = Agent_1.agentInterface.SignFileResponseMessage.decodeDelimited(subMessage);\n return signaturePath;\n }\n async verifyFile(nodePath, filePath, publicKeyPath) {\n var _a;\n const request = Agent_1.agentInterface.VerifyFileRequestMessage.encodeDelimited({ filePath, publicKeyPath }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.VERIFY_FILE, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.VERIFY_FILE)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { verified } = Agent_1.agentInterface.VerifyFileResponseMessage.decodeDelimited(subMessage);\n return verified;\n }\n async encryptFile(nodePath, filePath, publicKeyPath) {\n var _a;\n const request = Agent_1.agentInterface.EncryptFileRequestMessage.encodeDelimited({ filePath, publicKeyPath }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.ENCRYPT_FILE, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.ENCRYPT_FILE)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { encryptedPath } = Agent_1.agentInterface.EncryptFileResponseMessage.decodeDelimited(subMessage);\n return encryptedPath;\n }\n async decryptFile(nodePath, filePath, privateKeyPath, passphrase) {\n var _a;\n const request = Agent_1.agentInterface.DecryptFileRequestMessage.encodeDelimited({\n filePath,\n privateKeyPath,\n passphrase,\n }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DECRYPT_FILE, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DECRYPT_FILE)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { decryptedPath } = Agent_1.agentInterface.DecryptFileResponseMessage.decodeDelimited(subMessage);\n return decryptedPath;\n }\n //////////////////////\n // Vault Operations //\n //////////////////////\n async listVaults(nodePath) {\n var _a;\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_VAULTS, nodePath);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_VAULTS)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { vaultNames } = Agent_1.agentInterface.ListVaultsResponseMessage.decodeDelimited(subMessage);\n return vaultNames;\n }\n async scanVaultNames(nodePath, publicKey) {\n var _a;\n const request = Agent_1.agentInterface.ScanVaultNamesRequestMessage.encodeDelimited({ publicKey }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.SCAN_VAULT_NAMES, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.SCAN_VAULT_NAMES)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { vaultNames } = Agent_1.agentInterface.ScanVaultNamesResponseMessage.decodeDelimited(subMessage);\n return vaultNames;\n }\n async newVault(nodePath, vaultName) {\n var _a;\n const request = Agent_1.agentInterface.NewVaultRequestMessage.encodeDelimited({ vaultName }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.NEW_VAULT, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.NEW_VAULT)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.NewVaultResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async pullVault(nodePath, vaultName, publicKey) {\n var _a;\n const request = Agent_1.agentInterface.PullVaultRequestMessage.encodeDelimited({ vaultName, publicKey }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.PULL_VAULT, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.PULL_VAULT)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.PullVaultResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async destroyVault(nodePath, vaultName) {\n var _a;\n const request = Agent_1.agentInterface.DestroyVaultRequestMessage.encodeDelimited({ vaultName }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DESTROY_VAULT, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DESTROY_VAULT)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.DestroyVaultResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n ///////////////////////\n // Secret Operations //\n ///////////////////////\n async listSecrets(nodePath, vaultName) {\n var _a;\n const request = Agent_1.agentInterface.ListSecretsRequestMessage.encodeDelimited({ vaultName }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_SECRETS, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_SECRETS)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { secretNames } = Agent_1.agentInterface.ListSecretsResponseMessage.decodeDelimited(subMessage);\n return secretNames;\n }\n async createSecret(nodePath, vaultName, secretName, secret) {\n var _a;\n let request;\n if (typeof secret == 'string') {\n request = Agent_1.agentInterface.CreateSecretRequestMessage.encodeDelimited({\n vaultName,\n secretName,\n secretPath: secret,\n }).finish();\n }\n else {\n request = Agent_1.agentInterface.CreateSecretRequestMessage.encodeDelimited({\n vaultName,\n secretName,\n secretContent: secret,\n }).finish();\n }\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.CREATE_SECRET, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.CREATE_SECRET)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.CreateSecretResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async destroySecret(nodePath, vaultName, secretName) {\n var _a;\n const request = Agent_1.agentInterface.DestroySecretRequestMessage.encodeDelimited({ vaultName, secretName }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DESTROY_SECRET, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DESTROY_SECRET)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.DestroySecretResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async getSecret(nodePath, vaultName, secretName) {\n var _a;\n const request = Agent_1.agentInterface.GetSecretRequestMessage.encodeDelimited({ vaultName, secretName }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.GET_SECRET, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.GET_SECRET)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { secret } = Agent_1.agentInterface.GetSecretResponseMessage.decodeDelimited(subMessage);\n return Buffer.from(secret);\n }\n async updateSecret(nodePath, vaultName, secretName, secret) {\n var _a;\n let request;\n if (typeof secret == 'string') {\n request = Agent_1.agentInterface.UpdateSecretRequestMessage.encodeDelimited({\n vaultName,\n secretName,\n secretPath: secret,\n }).finish();\n }\n else {\n request = Agent_1.agentInterface.UpdateSecretRequestMessage.encodeDelimited({\n vaultName,\n secretName,\n secretContent: secret,\n }).finish();\n }\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.UPDATE_SECRET, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.UPDATE_SECRET)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.UpdateSecretResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n /////////////////////\n // Peer Operations //\n /////////////////////\n async addPeer(nodePath, publicKey, peerAddress, relayPublicKey) {\n var _a;\n const request = Agent_1.agentInterface.AddPeerRequestMessage.encodeDelimited({\n publicKey,\n peerAddress,\n relayPublicKey,\n }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.ADD_PEER, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.ADD_PEER)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.AddPeerResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async getPeerInfo(nodePath, current = false, publicKey) {\n var _a;\n const request = Agent_1.agentInterface.PeerInfoRequestMessage.encodeDelimited({ current, publicKey }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.GET_PEER_INFO, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.GET_PEER_INFO)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { publicKey: responsePublicKey, peerAddress, relayPublicKey, } = Agent_1.agentInterface.PeerInfoResponseMessage.decodeDelimited(subMessage);\n return new PeerInfo_1.default(responsePublicKey, peerAddress, relayPublicKey);\n }\n async pingPeer(nodePath, publicKey, timeout) {\n var _a;\n const request = Agent_1.agentInterface.PingPeerRequestMessage.encodeDelimited({ publicKey, timeout }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.PING_PEER, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.PING_PEER)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.PingPeerResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async findPeer(nodePath, publicKey, timeout) {\n var _a;\n const request = Agent_1.agentInterface.FindPeerRequestMessage.encodeDelimited({ publicKey, timeout }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.FIND_PEER, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.FIND_PEER)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.FindPeerResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async findSocialPeer(nodePath, handle, service, timeout) {\n var _a;\n const request = Agent_1.agentInterface.FindSocialPeerRequestMessage.encodeDelimited({ handle, service, timeout }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.FIND_SOCIAL_PEER, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.FIND_SOCIAL_PEER)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.FindSocialPeerResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async listPeers(nodePath) {\n var _a;\n const request = Agent_1.agentInterface.ListPeersRequestMessage.encodeDelimited({}).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_PEERS, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_PEERS)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { publicKeys } = Agent_1.agentInterface.ListPeersResponseMessage.decodeDelimited(subMessage);\n return publicKeys;\n }\n async toggleStealth(nodePath, active) {\n var _a;\n const request = Agent_1.agentInterface.ToggleStealthRequestMessage.encodeDelimited({ active }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.TOGGLE_STEALTH, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.TOGGLE_STEALTH)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.ToggleStealthResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async updatePeer(nodePath, publicKey, currentNode, peerHost, peerPort, relayPublicKey) {\n var _a;\n const request = Agent_1.agentInterface.UpdatePeerInfoRequestMessage.encodeDelimited({\n publicKey,\n currentNode,\n peerHost,\n peerPort,\n relayPublicKey,\n }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.UPDATE_PEER_INFO, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.UPDATE_PEER_INFO)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.UpdatePeerInfoResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async requestRelay(nodePath, publicKey) {\n var _a;\n const request = Agent_1.agentInterface.RequestRelayRequestMessage.encodeDelimited({ publicKey }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.REQUEST_RELAY, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.REQUEST_RELAY)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.RequestRelayResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async requestPunch(nodePath, publicKey) {\n var _a;\n const request = Agent_1.agentInterface.RequestPunchRequestMessage.encodeDelimited({ publicKey }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.REQUEST_PUNCH, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.REQUEST_PUNCH)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { address } = Agent_1.agentInterface.RequestPunchResponseMessage.decodeDelimited(subMessage);\n return PeerInfo_1.Address.parse(address);\n }\n ///////////////////\n // Agent control //\n ///////////////////\n async getAgentStatus() {\n var _a;\n try {\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.STATUS);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.STATUS)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { status } = Agent_1.agentInterface.AgentStatusResponseMessage.decodeDelimited(subMessage);\n return status;\n }\n catch (err) {\n if (err.toString().match(/ECONNRESET|ENOENT|ECONNRESET/)) {\n return Agent_1.agentInterface.AgentStatusType.OFFLINE;\n }\n throw err;\n }\n }\n async stopAgent() {\n try {\n // Tell it to start shutting and wait for response\n await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.STOP_AGENT);\n return true;\n }\n catch (err) {\n return (await this.getAgentStatus()) != Agent_1.agentInterface.AgentStatusType.ONLINE;\n }\n }\n}\nexports.default = PolykeyClient;\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","module.exports = require(\"base64-js\");","module.exports = require(\"ieee754\");","module.exports = require(\"isarray\");","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Peer_1 = require(\"../../proto/js/Peer\");\nconst utils_1 = require(\"../utils\");\nclass Address {\n constructor(host, port) {\n const parsedAddress = Address.parseHelper(`${host}:${port}`);\n this.host = parsedAddress.host;\n this.port = parsedAddress.port;\n }\n updateHost(host) {\n if (host != undefined && host != '') {\n this.host = host;\n }\n }\n updatePort(port) {\n if (port != undefined && port != 0) {\n this.port = port;\n }\n }\n /**\n * Create an address object from a address string\n * @param addressString Address string in the format of `${this.ip}:${this.port}`\n */\n static parse(addressString) {\n const { host, port } = Address.parseHelper(addressString);\n return new Address(host, port);\n }\n /**\n * Create an address object from a net.AddressInfo\n * @param addressInfo AddressInfo of desired address\n */\n static fromAddressInfo(addressInfo) {\n const host = addressInfo.address == '::' ? 'localhost' : addressInfo.address;\n return new Address(host, addressInfo.port);\n }\n /**\n * Convert address into string of format `${this.host}:${this.port}`\n */\n toString() {\n return `${this.host}:${this.port}`;\n }\n static parseHelper(addressString) {\n var _a;\n if (!addressString || addressString == '') {\n throw Error(`cannot parse empty or undefined string`);\n }\n if (!Address.AddressRegex.test(addressString)) {\n throw Error(`cannot parse address string: '${addressString}'`);\n }\n // parse using regex\n const components = (_a = addressString.match(Address.AddressRegex)) === null || _a === void 0 ? void 0 : _a.slice(1, 3);\n const host = components[0];\n const port = parseInt(components[1]);\n return { host, port };\n }\n}\nexports.Address = Address;\n/**\n * Parses an address string in the format of `host:port` with the help of regex\n */\nAddress.AddressRegex = /^([a-zA-Z.]+|(?:[0-9]{1,3}\\.){3}[0-9]{1,3})(?::)([0-9]{1,5})$/;\nclass PeerInfo {\n constructor(publicKey, connectedAddress, relayPublicKey) {\n this.publicKey = PeerInfo.formatPublicKey(publicKey);\n if (connectedAddress) {\n const addr = Address.parse(connectedAddress);\n this.peerAddress = addr;\n }\n if (relayPublicKey) {\n this.relayPublicKey = PeerInfo.formatPublicKey(relayPublicKey);\n }\n }\n static formatPublicKey(str) {\n const startString = '-----BEGIN PGP PUBLIC KEY BLOCK-----';\n const endString = '-----END PGP PUBLIC KEY BLOCK-----';\n return str.slice(str.indexOf(startString), str.indexOf(endString) + endString.length);\n }\n deepCopy() {\n var _a;\n return new PeerInfo(this.publicKey, (_a = this.peerAddress) === null || _a === void 0 ? void 0 : _a.toString(), this.relayPublicKey);\n }\n toStringB64() {\n var _a;\n const message = Peer_1.peerInterface.PeerInfoMessage.encodeDelimited({\n publicKey: this.publicKey,\n peerAddress: (_a = this.peerAddress) === null || _a === void 0 ? void 0 : _a.toString(),\n relayPublicKey: this.relayPublicKey,\n }).finish();\n return utils_1.protobufToString(message);\n }\n static parseB64(str) {\n const message = utils_1.stringToProtobuf(str);\n const decoded = Peer_1.peerInterface.PeerInfoMessage.decodeDelimited(message);\n return new PeerInfo(decoded.publicKey, decoded.peerAddress, decoded.relayPublicKey);\n }\n}\nexports.default = PeerInfo;\n","/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/\n\"use strict\";\n\nvar $protobuf = require(\"protobufjs/minimal\");\n\n// Common aliases\nvar $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;\n\n// Exported root namespace\nvar $root = $protobuf.roots[\"default\"] || ($protobuf.roots[\"default\"] = {});\n\n$root.peerInterface = (function() {\n\n /**\n * Namespace peerInterface.\n * @exports peerInterface\n * @namespace\n */\n var peerInterface = {};\n\n peerInterface.Peer = (function() {\n\n /**\n * Constructs a new Peer service.\n * @memberof peerInterface\n * @classdesc Represents a Peer\n * @extends $protobuf.rpc.Service\n * @constructor\n * @param {$protobuf.RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\n function Peer(rpcImpl, requestDelimited, responseDelimited) {\n $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);\n }\n\n (Peer.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Peer;\n\n /**\n * Creates new Peer service using the specified rpc implementation.\n * @function create\n * @memberof peerInterface.Peer\n * @static\n * @param {$protobuf.RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n * @returns {Peer} RPC service. Useful where requests and/or responses are streamed.\n */\n Peer.create = function create(rpcImpl, requestDelimited, responseDelimited) {\n return new this(rpcImpl, requestDelimited, responseDelimited);\n };\n\n /**\n * Callback as used by {@link peerInterface.Peer#messagePeer}.\n * @memberof peerInterface.Peer\n * @typedef MessagePeerCallback\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {peerInterface.PeerMessage} [response] PeerMessage\n */\n\n /**\n * Calls MessagePeer.\n * @function messagePeer\n * @memberof peerInterface.Peer\n * @instance\n * @param {peerInterface.IPeerMessage} request PeerMessage message or plain object\n * @param {peerInterface.Peer.MessagePeerCallback} callback Node-style callback called with the error, if any, and PeerMessage\n * @returns {undefined}\n * @variation 1\n */\n Object.defineProperty(Peer.prototype.messagePeer = function messagePeer(request, callback) {\n return this.rpcCall(messagePeer, $root.peerInterface.PeerMessage, $root.peerInterface.PeerMessage, request, callback);\n }, \"name\", { value: \"MessagePeer\" });\n\n /**\n * Calls MessagePeer.\n * @function messagePeer\n * @memberof peerInterface.Peer\n * @instance\n * @param {peerInterface.IPeerMessage} request PeerMessage message or plain object\n * @returns {Promise} Promise\n * @variation 2\n */\n\n return Peer;\n })();\n\n peerInterface.PeerMessage = (function() {\n\n /**\n * Properties of a PeerMessage.\n * @memberof peerInterface\n * @interface IPeerMessage\n * @property {string|null} [publicKey] PeerMessage publicKey\n * @property {peerInterface.SubServiceType|null} [type] PeerMessage type\n * @property {string|null} [subMessage] PeerMessage subMessage\n */\n\n /**\n * Constructs a new PeerMessage.\n * @memberof peerInterface\n * @classdesc Represents a PeerMessage.\n * @implements IPeerMessage\n * @constructor\n * @param {peerInterface.IPeerMessage=} [p] Properties to set\n */\n function PeerMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * PeerMessage publicKey.\n * @member {string} publicKey\n * @memberof peerInterface.PeerMessage\n * @instance\n */\n PeerMessage.prototype.publicKey = \"\";\n\n /**\n * PeerMessage type.\n * @member {peerInterface.SubServiceType} type\n * @memberof peerInterface.PeerMessage\n * @instance\n */\n PeerMessage.prototype.type = 0;\n\n /**\n * PeerMessage subMessage.\n * @member {string} subMessage\n * @memberof peerInterface.PeerMessage\n * @instance\n */\n PeerMessage.prototype.subMessage = \"\";\n\n /**\n * Creates a new PeerMessage instance using the specified properties.\n * @function create\n * @memberof peerInterface.PeerMessage\n * @static\n * @param {peerInterface.IPeerMessage=} [properties] Properties to set\n * @returns {peerInterface.PeerMessage} PeerMessage instance\n */\n PeerMessage.create = function create(properties) {\n return new PeerMessage(properties);\n };\n\n /**\n * Encodes the specified PeerMessage message. Does not implicitly {@link peerInterface.PeerMessage.verify|verify} messages.\n * @function encode\n * @memberof peerInterface.PeerMessage\n * @static\n * @param {peerInterface.IPeerMessage} m PeerMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PeerMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.publicKey != null && Object.hasOwnProperty.call(m, \"publicKey\"))\n w.uint32(10).string(m.publicKey);\n if (m.type != null && Object.hasOwnProperty.call(m, \"type\"))\n w.uint32(16).int32(m.type);\n if (m.subMessage != null && Object.hasOwnProperty.call(m, \"subMessage\"))\n w.uint32(26).string(m.subMessage);\n return w;\n };\n\n /**\n * Encodes the specified PeerMessage message, length delimited. Does not implicitly {@link peerInterface.PeerMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof peerInterface.PeerMessage\n * @static\n * @param {peerInterface.IPeerMessage} message PeerMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PeerMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PeerMessage message from the specified reader or buffer.\n * @function decode\n * @memberof peerInterface.PeerMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {peerInterface.PeerMessage} PeerMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PeerMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.PeerMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.publicKey = r.string();\n break;\n case 2:\n m.type = r.int32();\n break;\n case 3:\n m.subMessage = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a PeerMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof peerInterface.PeerMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {peerInterface.PeerMessage} PeerMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PeerMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return PeerMessage;\n })();\n\n /**\n * SubServiceType enum.\n * @name peerInterface.SubServiceType\n * @enum {number}\n * @property {number} PING_PEER=0 PING_PEER value\n * @property {number} GIT=1 GIT value\n * @property {number} NAT_TRAVERSAL=2 NAT_TRAVERSAL value\n */\n peerInterface.SubServiceType = (function() {\n var valuesById = {}, values = Object.create(valuesById);\n values[valuesById[0] = \"PING_PEER\"] = 0;\n values[valuesById[1] = \"GIT\"] = 1;\n values[valuesById[2] = \"NAT_TRAVERSAL\"] = 2;\n return values;\n })();\n\n peerInterface.PingPeerMessage = (function() {\n\n /**\n * Properties of a PingPeerMessage.\n * @memberof peerInterface\n * @interface IPingPeerMessage\n * @property {string|null} [publicKey] PingPeerMessage publicKey\n * @property {string|null} [challenge] PingPeerMessage challenge\n * @property {peerInterface.IPeerInfoMessage|null} [peerInfo] PingPeerMessage peerInfo\n */\n\n /**\n * Constructs a new PingPeerMessage.\n * @memberof peerInterface\n * @classdesc Represents a PingPeerMessage.\n * @implements IPingPeerMessage\n * @constructor\n * @param {peerInterface.IPingPeerMessage=} [p] Properties to set\n */\n function PingPeerMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * PingPeerMessage publicKey.\n * @member {string} publicKey\n * @memberof peerInterface.PingPeerMessage\n * @instance\n */\n PingPeerMessage.prototype.publicKey = \"\";\n\n /**\n * PingPeerMessage challenge.\n * @member {string} challenge\n * @memberof peerInterface.PingPeerMessage\n * @instance\n */\n PingPeerMessage.prototype.challenge = \"\";\n\n /**\n * PingPeerMessage peerInfo.\n * @member {peerInterface.IPeerInfoMessage|null|undefined} peerInfo\n * @memberof peerInterface.PingPeerMessage\n * @instance\n */\n PingPeerMessage.prototype.peerInfo = null;\n\n /**\n * Creates a new PingPeerMessage instance using the specified properties.\n * @function create\n * @memberof peerInterface.PingPeerMessage\n * @static\n * @param {peerInterface.IPingPeerMessage=} [properties] Properties to set\n * @returns {peerInterface.PingPeerMessage} PingPeerMessage instance\n */\n PingPeerMessage.create = function create(properties) {\n return new PingPeerMessage(properties);\n };\n\n /**\n * Encodes the specified PingPeerMessage message. Does not implicitly {@link peerInterface.PingPeerMessage.verify|verify} messages.\n * @function encode\n * @memberof peerInterface.PingPeerMessage\n * @static\n * @param {peerInterface.IPingPeerMessage} m PingPeerMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PingPeerMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.publicKey != null && Object.hasOwnProperty.call(m, \"publicKey\"))\n w.uint32(10).string(m.publicKey);\n if (m.challenge != null && Object.hasOwnProperty.call(m, \"challenge\"))\n w.uint32(18).string(m.challenge);\n if (m.peerInfo != null && Object.hasOwnProperty.call(m, \"peerInfo\"))\n $root.peerInterface.PeerInfoMessage.encode(m.peerInfo, w.uint32(26).fork()).ldelim();\n return w;\n };\n\n /**\n * Encodes the specified PingPeerMessage message, length delimited. Does not implicitly {@link peerInterface.PingPeerMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof peerInterface.PingPeerMessage\n * @static\n * @param {peerInterface.IPingPeerMessage} message PingPeerMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PingPeerMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PingPeerMessage message from the specified reader or buffer.\n * @function decode\n * @memberof peerInterface.PingPeerMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {peerInterface.PingPeerMessage} PingPeerMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PingPeerMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.PingPeerMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.publicKey = r.string();\n break;\n case 2:\n m.challenge = r.string();\n break;\n case 3:\n m.peerInfo = $root.peerInterface.PeerInfoMessage.decode(r, r.uint32());\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a PingPeerMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof peerInterface.PingPeerMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {peerInterface.PingPeerMessage} PingPeerMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PingPeerMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return PingPeerMessage;\n })();\n\n peerInterface.PeerInfoMessage = (function() {\n\n /**\n * Properties of a PeerInfoMessage.\n * @memberof peerInterface\n * @interface IPeerInfoMessage\n * @property {string|null} [publicKey] PeerInfoMessage publicKey\n * @property {string|null} [peerAddress] PeerInfoMessage peerAddress\n * @property {string|null} [relayPublicKey] PeerInfoMessage relayPublicKey\n */\n\n /**\n * Constructs a new PeerInfoMessage.\n * @memberof peerInterface\n * @classdesc Represents a PeerInfoMessage.\n * @implements IPeerInfoMessage\n * @constructor\n * @param {peerInterface.IPeerInfoMessage=} [p] Properties to set\n */\n function PeerInfoMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * PeerInfoMessage publicKey.\n * @member {string} publicKey\n * @memberof peerInterface.PeerInfoMessage\n * @instance\n */\n PeerInfoMessage.prototype.publicKey = \"\";\n\n /**\n * PeerInfoMessage peerAddress.\n * @member {string} peerAddress\n * @memberof peerInterface.PeerInfoMessage\n * @instance\n */\n PeerInfoMessage.prototype.peerAddress = \"\";\n\n /**\n * PeerInfoMessage relayPublicKey.\n * @member {string} relayPublicKey\n * @memberof peerInterface.PeerInfoMessage\n * @instance\n */\n PeerInfoMessage.prototype.relayPublicKey = \"\";\n\n /**\n * Creates a new PeerInfoMessage instance using the specified properties.\n * @function create\n * @memberof peerInterface.PeerInfoMessage\n * @static\n * @param {peerInterface.IPeerInfoMessage=} [properties] Properties to set\n * @returns {peerInterface.PeerInfoMessage} PeerInfoMessage instance\n */\n PeerInfoMessage.create = function create(properties) {\n return new PeerInfoMessage(properties);\n };\n\n /**\n * Encodes the specified PeerInfoMessage message. Does not implicitly {@link peerInterface.PeerInfoMessage.verify|verify} messages.\n * @function encode\n * @memberof peerInterface.PeerInfoMessage\n * @static\n * @param {peerInterface.IPeerInfoMessage} m PeerInfoMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PeerInfoMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.publicKey != null && Object.hasOwnProperty.call(m, \"publicKey\"))\n w.uint32(10).string(m.publicKey);\n if (m.peerAddress != null && Object.hasOwnProperty.call(m, \"peerAddress\"))\n w.uint32(18).string(m.peerAddress);\n if (m.relayPublicKey != null && Object.hasOwnProperty.call(m, \"relayPublicKey\"))\n w.uint32(26).string(m.relayPublicKey);\n return w;\n };\n\n /**\n * Encodes the specified PeerInfoMessage message, length delimited. Does not implicitly {@link peerInterface.PeerInfoMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof peerInterface.PeerInfoMessage\n * @static\n * @param {peerInterface.IPeerInfoMessage} message PeerInfoMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PeerInfoMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PeerInfoMessage message from the specified reader or buffer.\n * @function decode\n * @memberof peerInterface.PeerInfoMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {peerInterface.PeerInfoMessage} PeerInfoMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PeerInfoMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.PeerInfoMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.publicKey = r.string();\n break;\n case 2:\n m.peerAddress = r.string();\n break;\n case 3:\n m.relayPublicKey = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a PeerInfoMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof peerInterface.PeerInfoMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {peerInterface.PeerInfoMessage} PeerInfoMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PeerInfoMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return PeerInfoMessage;\n })();\n\n peerInterface.PeerInfoListMessage = (function() {\n\n /**\n * Properties of a PeerInfoListMessage.\n * @memberof peerInterface\n * @interface IPeerInfoListMessage\n * @property {Array.|null} [peerInfoList] PeerInfoListMessage peerInfoList\n */\n\n /**\n * Constructs a new PeerInfoListMessage.\n * @memberof peerInterface\n * @classdesc Represents a PeerInfoListMessage.\n * @implements IPeerInfoListMessage\n * @constructor\n * @param {peerInterface.IPeerInfoListMessage=} [p] Properties to set\n */\n function PeerInfoListMessage(p) {\n this.peerInfoList = [];\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * PeerInfoListMessage peerInfoList.\n * @member {Array.} peerInfoList\n * @memberof peerInterface.PeerInfoListMessage\n * @instance\n */\n PeerInfoListMessage.prototype.peerInfoList = $util.emptyArray;\n\n /**\n * Creates a new PeerInfoListMessage instance using the specified properties.\n * @function create\n * @memberof peerInterface.PeerInfoListMessage\n * @static\n * @param {peerInterface.IPeerInfoListMessage=} [properties] Properties to set\n * @returns {peerInterface.PeerInfoListMessage} PeerInfoListMessage instance\n */\n PeerInfoListMessage.create = function create(properties) {\n return new PeerInfoListMessage(properties);\n };\n\n /**\n * Encodes the specified PeerInfoListMessage message. Does not implicitly {@link peerInterface.PeerInfoListMessage.verify|verify} messages.\n * @function encode\n * @memberof peerInterface.PeerInfoListMessage\n * @static\n * @param {peerInterface.IPeerInfoListMessage} m PeerInfoListMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PeerInfoListMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.peerInfoList != null && m.peerInfoList.length) {\n for (var i = 0; i < m.peerInfoList.length; ++i)\n $root.peerInterface.PeerInfoMessage.encode(m.peerInfoList[i], w.uint32(10).fork()).ldelim();\n }\n return w;\n };\n\n /**\n * Encodes the specified PeerInfoListMessage message, length delimited. Does not implicitly {@link peerInterface.PeerInfoListMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof peerInterface.PeerInfoListMessage\n * @static\n * @param {peerInterface.IPeerInfoListMessage} message PeerInfoListMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PeerInfoListMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PeerInfoListMessage message from the specified reader or buffer.\n * @function decode\n * @memberof peerInterface.PeerInfoListMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {peerInterface.PeerInfoListMessage} PeerInfoListMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PeerInfoListMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.PeerInfoListMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n if (!(m.peerInfoList && m.peerInfoList.length))\n m.peerInfoList = [];\n m.peerInfoList.push($root.peerInterface.PeerInfoMessage.decode(r, r.uint32()));\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a PeerInfoListMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof peerInterface.PeerInfoListMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {peerInterface.PeerInfoListMessage} PeerInfoListMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PeerInfoListMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return PeerInfoListMessage;\n })();\n\n peerInterface.ErrorMessage = (function() {\n\n /**\n * Properties of an ErrorMessage.\n * @memberof peerInterface\n * @interface IErrorMessage\n * @property {string|null} [error] ErrorMessage error\n */\n\n /**\n * Constructs a new ErrorMessage.\n * @memberof peerInterface\n * @classdesc Represents an ErrorMessage.\n * @implements IErrorMessage\n * @constructor\n * @param {peerInterface.IErrorMessage=} [p] Properties to set\n */\n function ErrorMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * ErrorMessage error.\n * @member {string} error\n * @memberof peerInterface.ErrorMessage\n * @instance\n */\n ErrorMessage.prototype.error = \"\";\n\n /**\n * Creates a new ErrorMessage instance using the specified properties.\n * @function create\n * @memberof peerInterface.ErrorMessage\n * @static\n * @param {peerInterface.IErrorMessage=} [properties] Properties to set\n * @returns {peerInterface.ErrorMessage} ErrorMessage instance\n */\n ErrorMessage.create = function create(properties) {\n return new ErrorMessage(properties);\n };\n\n /**\n * Encodes the specified ErrorMessage message. Does not implicitly {@link peerInterface.ErrorMessage.verify|verify} messages.\n * @function encode\n * @memberof peerInterface.ErrorMessage\n * @static\n * @param {peerInterface.IErrorMessage} m ErrorMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ErrorMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.error != null && Object.hasOwnProperty.call(m, \"error\"))\n w.uint32(10).string(m.error);\n return w;\n };\n\n /**\n * Encodes the specified ErrorMessage message, length delimited. Does not implicitly {@link peerInterface.ErrorMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof peerInterface.ErrorMessage\n * @static\n * @param {peerInterface.IErrorMessage} message ErrorMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ErrorMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an ErrorMessage message from the specified reader or buffer.\n * @function decode\n * @memberof peerInterface.ErrorMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {peerInterface.ErrorMessage} ErrorMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ErrorMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.ErrorMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.error = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes an ErrorMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof peerInterface.ErrorMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {peerInterface.ErrorMessage} ErrorMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ErrorMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return ErrorMessage;\n })();\n\n /**\n * NatMessageType enum.\n * @name peerInterface.NatMessageType\n * @enum {number}\n * @property {number} ERROR=0 ERROR value\n * @property {number} RELAY_CONNECTION=1 RELAY_CONNECTION value\n * @property {number} PEER_CONNECTION=2 PEER_CONNECTION value\n * @property {number} UDP_ADDRESS=3 UDP_ADDRESS value\n * @property {number} PEER_UDP_ADDRESS=4 PEER_UDP_ADDRESS value\n */\n peerInterface.NatMessageType = (function() {\n var valuesById = {}, values = Object.create(valuesById);\n values[valuesById[0] = \"ERROR\"] = 0;\n values[valuesById[1] = \"RELAY_CONNECTION\"] = 1;\n values[valuesById[2] = \"PEER_CONNECTION\"] = 2;\n values[valuesById[3] = \"UDP_ADDRESS\"] = 3;\n values[valuesById[4] = \"PEER_UDP_ADDRESS\"] = 4;\n return values;\n })();\n\n peerInterface.NatMessage = (function() {\n\n /**\n * Properties of a NatMessage.\n * @memberof peerInterface\n * @interface INatMessage\n * @property {peerInterface.NatMessageType|null} [type] NatMessage type\n * @property {boolean|null} [isResponse] NatMessage isResponse\n * @property {Uint8Array|null} [subMessage] NatMessage subMessage\n */\n\n /**\n * Constructs a new NatMessage.\n * @memberof peerInterface\n * @classdesc Represents a NatMessage.\n * @implements INatMessage\n * @constructor\n * @param {peerInterface.INatMessage=} [p] Properties to set\n */\n function NatMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * NatMessage type.\n * @member {peerInterface.NatMessageType} type\n * @memberof peerInterface.NatMessage\n * @instance\n */\n NatMessage.prototype.type = 0;\n\n /**\n * NatMessage isResponse.\n * @member {boolean} isResponse\n * @memberof peerInterface.NatMessage\n * @instance\n */\n NatMessage.prototype.isResponse = false;\n\n /**\n * NatMessage subMessage.\n * @member {Uint8Array} subMessage\n * @memberof peerInterface.NatMessage\n * @instance\n */\n NatMessage.prototype.subMessage = $util.newBuffer([]);\n\n /**\n * Creates a new NatMessage instance using the specified properties.\n * @function create\n * @memberof peerInterface.NatMessage\n * @static\n * @param {peerInterface.INatMessage=} [properties] Properties to set\n * @returns {peerInterface.NatMessage} NatMessage instance\n */\n NatMessage.create = function create(properties) {\n return new NatMessage(properties);\n };\n\n /**\n * Encodes the specified NatMessage message. Does not implicitly {@link peerInterface.NatMessage.verify|verify} messages.\n * @function encode\n * @memberof peerInterface.NatMessage\n * @static\n * @param {peerInterface.INatMessage} m NatMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n NatMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.type != null && Object.hasOwnProperty.call(m, \"type\"))\n w.uint32(8).int32(m.type);\n if (m.isResponse != null && Object.hasOwnProperty.call(m, \"isResponse\"))\n w.uint32(16).bool(m.isResponse);\n if (m.subMessage != null && Object.hasOwnProperty.call(m, \"subMessage\"))\n w.uint32(26).bytes(m.subMessage);\n return w;\n };\n\n /**\n * Encodes the specified NatMessage message, length delimited. Does not implicitly {@link peerInterface.NatMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof peerInterface.NatMessage\n * @static\n * @param {peerInterface.INatMessage} message NatMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n NatMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a NatMessage message from the specified reader or buffer.\n * @function decode\n * @memberof peerInterface.NatMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {peerInterface.NatMessage} NatMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n NatMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.NatMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.type = r.int32();\n break;\n case 2:\n m.isResponse = r.bool();\n break;\n case 3:\n m.subMessage = r.bytes();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a NatMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof peerInterface.NatMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {peerInterface.NatMessage} NatMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n NatMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return NatMessage;\n })();\n\n peerInterface.RelayConnectionRequest = (function() {\n\n /**\n * Properties of a RelayConnectionRequest.\n * @memberof peerInterface\n * @interface IRelayConnectionRequest\n * @property {string|null} [publicKey] RelayConnectionRequest publicKey\n */\n\n /**\n * Constructs a new RelayConnectionRequest.\n * @memberof peerInterface\n * @classdesc Represents a RelayConnectionRequest.\n * @implements IRelayConnectionRequest\n * @constructor\n * @param {peerInterface.IRelayConnectionRequest=} [p] Properties to set\n */\n function RelayConnectionRequest(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * RelayConnectionRequest publicKey.\n * @member {string} publicKey\n * @memberof peerInterface.RelayConnectionRequest\n * @instance\n */\n RelayConnectionRequest.prototype.publicKey = \"\";\n\n /**\n * Creates a new RelayConnectionRequest instance using the specified properties.\n * @function create\n * @memberof peerInterface.RelayConnectionRequest\n * @static\n * @param {peerInterface.IRelayConnectionRequest=} [properties] Properties to set\n * @returns {peerInterface.RelayConnectionRequest} RelayConnectionRequest instance\n */\n RelayConnectionRequest.create = function create(properties) {\n return new RelayConnectionRequest(properties);\n };\n\n /**\n * Encodes the specified RelayConnectionRequest message. Does not implicitly {@link peerInterface.RelayConnectionRequest.verify|verify} messages.\n * @function encode\n * @memberof peerInterface.RelayConnectionRequest\n * @static\n * @param {peerInterface.IRelayConnectionRequest} m RelayConnectionRequest message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RelayConnectionRequest.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.publicKey != null && Object.hasOwnProperty.call(m, \"publicKey\"))\n w.uint32(10).string(m.publicKey);\n return w;\n };\n\n /**\n * Encodes the specified RelayConnectionRequest message, length delimited. Does not implicitly {@link peerInterface.RelayConnectionRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof peerInterface.RelayConnectionRequest\n * @static\n * @param {peerInterface.IRelayConnectionRequest} message RelayConnectionRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RelayConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a RelayConnectionRequest message from the specified reader or buffer.\n * @function decode\n * @memberof peerInterface.RelayConnectionRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {peerInterface.RelayConnectionRequest} RelayConnectionRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RelayConnectionRequest.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.RelayConnectionRequest();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.publicKey = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a RelayConnectionRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof peerInterface.RelayConnectionRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {peerInterface.RelayConnectionRequest} RelayConnectionRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RelayConnectionRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return RelayConnectionRequest;\n })();\n\n peerInterface.RelayConnectionResponse = (function() {\n\n /**\n * Properties of a RelayConnectionResponse.\n * @memberof peerInterface\n * @interface IRelayConnectionResponse\n * @property {string|null} [serverAddress] RelayConnectionResponse serverAddress\n */\n\n /**\n * Constructs a new RelayConnectionResponse.\n * @memberof peerInterface\n * @classdesc Represents a RelayConnectionResponse.\n * @implements IRelayConnectionResponse\n * @constructor\n * @param {peerInterface.IRelayConnectionResponse=} [p] Properties to set\n */\n function RelayConnectionResponse(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * RelayConnectionResponse serverAddress.\n * @member {string} serverAddress\n * @memberof peerInterface.RelayConnectionResponse\n * @instance\n */\n RelayConnectionResponse.prototype.serverAddress = \"\";\n\n /**\n * Creates a new RelayConnectionResponse instance using the specified properties.\n * @function create\n * @memberof peerInterface.RelayConnectionResponse\n * @static\n * @param {peerInterface.IRelayConnectionResponse=} [properties] Properties to set\n * @returns {peerInterface.RelayConnectionResponse} RelayConnectionResponse instance\n */\n RelayConnectionResponse.create = function create(properties) {\n return new RelayConnectionResponse(properties);\n };\n\n /**\n * Encodes the specified RelayConnectionResponse message. Does not implicitly {@link peerInterface.RelayConnectionResponse.verify|verify} messages.\n * @function encode\n * @memberof peerInterface.RelayConnectionResponse\n * @static\n * @param {peerInterface.IRelayConnectionResponse} m RelayConnectionResponse message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RelayConnectionResponse.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.serverAddress != null && Object.hasOwnProperty.call(m, \"serverAddress\"))\n w.uint32(10).string(m.serverAddress);\n return w;\n };\n\n /**\n * Encodes the specified RelayConnectionResponse message, length delimited. Does not implicitly {@link peerInterface.RelayConnectionResponse.verify|verify} messages.\n * @function encodeDelimited\n * @memberof peerInterface.RelayConnectionResponse\n * @static\n * @param {peerInterface.IRelayConnectionResponse} message RelayConnectionResponse message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RelayConnectionResponse.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a RelayConnectionResponse message from the specified reader or buffer.\n * @function decode\n * @memberof peerInterface.RelayConnectionResponse\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {peerInterface.RelayConnectionResponse} RelayConnectionResponse\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RelayConnectionResponse.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.RelayConnectionResponse();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.serverAddress = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a RelayConnectionResponse message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof peerInterface.RelayConnectionResponse\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {peerInterface.RelayConnectionResponse} RelayConnectionResponse\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RelayConnectionResponse.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return RelayConnectionResponse;\n })();\n\n peerInterface.PeerConnectionRequest = (function() {\n\n /**\n * Properties of a PeerConnectionRequest.\n * @memberof peerInterface\n * @interface IPeerConnectionRequest\n * @property {string|null} [publicKey] PeerConnectionRequest publicKey\n */\n\n /**\n * Constructs a new PeerConnectionRequest.\n * @memberof peerInterface\n * @classdesc Represents a PeerConnectionRequest.\n * @implements IPeerConnectionRequest\n * @constructor\n * @param {peerInterface.IPeerConnectionRequest=} [p] Properties to set\n */\n function PeerConnectionRequest(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * PeerConnectionRequest publicKey.\n * @member {string} publicKey\n * @memberof peerInterface.PeerConnectionRequest\n * @instance\n */\n PeerConnectionRequest.prototype.publicKey = \"\";\n\n /**\n * Creates a new PeerConnectionRequest instance using the specified properties.\n * @function create\n * @memberof peerInterface.PeerConnectionRequest\n * @static\n * @param {peerInterface.IPeerConnectionRequest=} [properties] Properties to set\n * @returns {peerInterface.PeerConnectionRequest} PeerConnectionRequest instance\n */\n PeerConnectionRequest.create = function create(properties) {\n return new PeerConnectionRequest(properties);\n };\n\n /**\n * Encodes the specified PeerConnectionRequest message. Does not implicitly {@link peerInterface.PeerConnectionRequest.verify|verify} messages.\n * @function encode\n * @memberof peerInterface.PeerConnectionRequest\n * @static\n * @param {peerInterface.IPeerConnectionRequest} m PeerConnectionRequest message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PeerConnectionRequest.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.publicKey != null && Object.hasOwnProperty.call(m, \"publicKey\"))\n w.uint32(10).string(m.publicKey);\n return w;\n };\n\n /**\n * Encodes the specified PeerConnectionRequest message, length delimited. Does not implicitly {@link peerInterface.PeerConnectionRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof peerInterface.PeerConnectionRequest\n * @static\n * @param {peerInterface.IPeerConnectionRequest} message PeerConnectionRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PeerConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PeerConnectionRequest message from the specified reader or buffer.\n * @function decode\n * @memberof peerInterface.PeerConnectionRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {peerInterface.PeerConnectionRequest} PeerConnectionRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PeerConnectionRequest.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.PeerConnectionRequest();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.publicKey = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a PeerConnectionRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof peerInterface.PeerConnectionRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {peerInterface.PeerConnectionRequest} PeerConnectionRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PeerConnectionRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return PeerConnectionRequest;\n })();\n\n peerInterface.PeerConnectionResponse = (function() {\n\n /**\n * Properties of a PeerConnectionResponse.\n * @memberof peerInterface\n * @interface IPeerConnectionResponse\n * @property {string|null} [peerAddress] PeerConnectionResponse peerAddress\n */\n\n /**\n * Constructs a new PeerConnectionResponse.\n * @memberof peerInterface\n * @classdesc Represents a PeerConnectionResponse.\n * @implements IPeerConnectionResponse\n * @constructor\n * @param {peerInterface.IPeerConnectionResponse=} [p] Properties to set\n */\n function PeerConnectionResponse(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * PeerConnectionResponse peerAddress.\n * @member {string} peerAddress\n * @memberof peerInterface.PeerConnectionResponse\n * @instance\n */\n PeerConnectionResponse.prototype.peerAddress = \"\";\n\n /**\n * Creates a new PeerConnectionResponse instance using the specified properties.\n * @function create\n * @memberof peerInterface.PeerConnectionResponse\n * @static\n * @param {peerInterface.IPeerConnectionResponse=} [properties] Properties to set\n * @returns {peerInterface.PeerConnectionResponse} PeerConnectionResponse instance\n */\n PeerConnectionResponse.create = function create(properties) {\n return new PeerConnectionResponse(properties);\n };\n\n /**\n * Encodes the specified PeerConnectionResponse message. Does not implicitly {@link peerInterface.PeerConnectionResponse.verify|verify} messages.\n * @function encode\n * @memberof peerInterface.PeerConnectionResponse\n * @static\n * @param {peerInterface.IPeerConnectionResponse} m PeerConnectionResponse message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PeerConnectionResponse.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.peerAddress != null && Object.hasOwnProperty.call(m, \"peerAddress\"))\n w.uint32(10).string(m.peerAddress);\n return w;\n };\n\n /**\n * Encodes the specified PeerConnectionResponse message, length delimited. Does not implicitly {@link peerInterface.PeerConnectionResponse.verify|verify} messages.\n * @function encodeDelimited\n * @memberof peerInterface.PeerConnectionResponse\n * @static\n * @param {peerInterface.IPeerConnectionResponse} message PeerConnectionResponse message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PeerConnectionResponse.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PeerConnectionResponse message from the specified reader or buffer.\n * @function decode\n * @memberof peerInterface.PeerConnectionResponse\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {peerInterface.PeerConnectionResponse} PeerConnectionResponse\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PeerConnectionResponse.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.PeerConnectionResponse();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.peerAddress = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a PeerConnectionResponse message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof peerInterface.PeerConnectionResponse\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {peerInterface.PeerConnectionResponse} PeerConnectionResponse\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PeerConnectionResponse.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return PeerConnectionResponse;\n })();\n\n peerInterface.UDPAddressResponse = (function() {\n\n /**\n * Properties of a UDPAddressResponse.\n * @memberof peerInterface\n * @interface IUDPAddressResponse\n * @property {string|null} [address] UDPAddressResponse address\n */\n\n /**\n * Constructs a new UDPAddressResponse.\n * @memberof peerInterface\n * @classdesc Represents a UDPAddressResponse.\n * @implements IUDPAddressResponse\n * @constructor\n * @param {peerInterface.IUDPAddressResponse=} [p] Properties to set\n */\n function UDPAddressResponse(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * UDPAddressResponse address.\n * @member {string} address\n * @memberof peerInterface.UDPAddressResponse\n * @instance\n */\n UDPAddressResponse.prototype.address = \"\";\n\n /**\n * Creates a new UDPAddressResponse instance using the specified properties.\n * @function create\n * @memberof peerInterface.UDPAddressResponse\n * @static\n * @param {peerInterface.IUDPAddressResponse=} [properties] Properties to set\n * @returns {peerInterface.UDPAddressResponse} UDPAddressResponse instance\n */\n UDPAddressResponse.create = function create(properties) {\n return new UDPAddressResponse(properties);\n };\n\n /**\n * Encodes the specified UDPAddressResponse message. Does not implicitly {@link peerInterface.UDPAddressResponse.verify|verify} messages.\n * @function encode\n * @memberof peerInterface.UDPAddressResponse\n * @static\n * @param {peerInterface.IUDPAddressResponse} m UDPAddressResponse message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n UDPAddressResponse.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.address != null && Object.hasOwnProperty.call(m, \"address\"))\n w.uint32(10).string(m.address);\n return w;\n };\n\n /**\n * Encodes the specified UDPAddressResponse message, length delimited. Does not implicitly {@link peerInterface.UDPAddressResponse.verify|verify} messages.\n * @function encodeDelimited\n * @memberof peerInterface.UDPAddressResponse\n * @static\n * @param {peerInterface.IUDPAddressResponse} message UDPAddressResponse message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n UDPAddressResponse.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a UDPAddressResponse message from the specified reader or buffer.\n * @function decode\n * @memberof peerInterface.UDPAddressResponse\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {peerInterface.UDPAddressResponse} UDPAddressResponse\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n UDPAddressResponse.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.UDPAddressResponse();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.address = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a UDPAddressResponse message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof peerInterface.UDPAddressResponse\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {peerInterface.UDPAddressResponse} UDPAddressResponse\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n UDPAddressResponse.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return UDPAddressResponse;\n })();\n\n peerInterface.HolePunchRegisterRequest = (function() {\n\n /**\n * Properties of a HolePunchRegisterRequest.\n * @memberof peerInterface\n * @interface IHolePunchRegisterRequest\n * @property {string|null} [publicKey] HolePunchRegisterRequest publicKey\n */\n\n /**\n * Constructs a new HolePunchRegisterRequest.\n * @memberof peerInterface\n * @classdesc Represents a HolePunchRegisterRequest.\n * @implements IHolePunchRegisterRequest\n * @constructor\n * @param {peerInterface.IHolePunchRegisterRequest=} [p] Properties to set\n */\n function HolePunchRegisterRequest(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * HolePunchRegisterRequest publicKey.\n * @member {string} publicKey\n * @memberof peerInterface.HolePunchRegisterRequest\n * @instance\n */\n HolePunchRegisterRequest.prototype.publicKey = \"\";\n\n /**\n * Creates a new HolePunchRegisterRequest instance using the specified properties.\n * @function create\n * @memberof peerInterface.HolePunchRegisterRequest\n * @static\n * @param {peerInterface.IHolePunchRegisterRequest=} [properties] Properties to set\n * @returns {peerInterface.HolePunchRegisterRequest} HolePunchRegisterRequest instance\n */\n HolePunchRegisterRequest.create = function create(properties) {\n return new HolePunchRegisterRequest(properties);\n };\n\n /**\n * Encodes the specified HolePunchRegisterRequest message. Does not implicitly {@link peerInterface.HolePunchRegisterRequest.verify|verify} messages.\n * @function encode\n * @memberof peerInterface.HolePunchRegisterRequest\n * @static\n * @param {peerInterface.IHolePunchRegisterRequest} m HolePunchRegisterRequest message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n HolePunchRegisterRequest.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.publicKey != null && Object.hasOwnProperty.call(m, \"publicKey\"))\n w.uint32(10).string(m.publicKey);\n return w;\n };\n\n /**\n * Encodes the specified HolePunchRegisterRequest message, length delimited. Does not implicitly {@link peerInterface.HolePunchRegisterRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof peerInterface.HolePunchRegisterRequest\n * @static\n * @param {peerInterface.IHolePunchRegisterRequest} message HolePunchRegisterRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n HolePunchRegisterRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a HolePunchRegisterRequest message from the specified reader or buffer.\n * @function decode\n * @memberof peerInterface.HolePunchRegisterRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {peerInterface.HolePunchRegisterRequest} HolePunchRegisterRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n HolePunchRegisterRequest.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.HolePunchRegisterRequest();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.publicKey = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a HolePunchRegisterRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof peerInterface.HolePunchRegisterRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {peerInterface.HolePunchRegisterRequest} HolePunchRegisterRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n HolePunchRegisterRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return HolePunchRegisterRequest;\n })();\n\n peerInterface.HolePunchRegisterResponse = (function() {\n\n /**\n * Properties of a HolePunchRegisterResponse.\n * @memberof peerInterface\n * @interface IHolePunchRegisterResponse\n * @property {string|null} [connectedAddress] HolePunchRegisterResponse connectedAddress\n */\n\n /**\n * Constructs a new HolePunchRegisterResponse.\n * @memberof peerInterface\n * @classdesc Represents a HolePunchRegisterResponse.\n * @implements IHolePunchRegisterResponse\n * @constructor\n * @param {peerInterface.IHolePunchRegisterResponse=} [p] Properties to set\n */\n function HolePunchRegisterResponse(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * HolePunchRegisterResponse connectedAddress.\n * @member {string} connectedAddress\n * @memberof peerInterface.HolePunchRegisterResponse\n * @instance\n */\n HolePunchRegisterResponse.prototype.connectedAddress = \"\";\n\n /**\n * Creates a new HolePunchRegisterResponse instance using the specified properties.\n * @function create\n * @memberof peerInterface.HolePunchRegisterResponse\n * @static\n * @param {peerInterface.IHolePunchRegisterResponse=} [properties] Properties to set\n * @returns {peerInterface.HolePunchRegisterResponse} HolePunchRegisterResponse instance\n */\n HolePunchRegisterResponse.create = function create(properties) {\n return new HolePunchRegisterResponse(properties);\n };\n\n /**\n * Encodes the specified HolePunchRegisterResponse message. Does not implicitly {@link peerInterface.HolePunchRegisterResponse.verify|verify} messages.\n * @function encode\n * @memberof peerInterface.HolePunchRegisterResponse\n * @static\n * @param {peerInterface.IHolePunchRegisterResponse} m HolePunchRegisterResponse message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n HolePunchRegisterResponse.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.connectedAddress != null && Object.hasOwnProperty.call(m, \"connectedAddress\"))\n w.uint32(10).string(m.connectedAddress);\n return w;\n };\n\n /**\n * Encodes the specified HolePunchRegisterResponse message, length delimited. Does not implicitly {@link peerInterface.HolePunchRegisterResponse.verify|verify} messages.\n * @function encodeDelimited\n * @memberof peerInterface.HolePunchRegisterResponse\n * @static\n * @param {peerInterface.IHolePunchRegisterResponse} message HolePunchRegisterResponse message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n HolePunchRegisterResponse.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a HolePunchRegisterResponse message from the specified reader or buffer.\n * @function decode\n * @memberof peerInterface.HolePunchRegisterResponse\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {peerInterface.HolePunchRegisterResponse} HolePunchRegisterResponse\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n HolePunchRegisterResponse.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.HolePunchRegisterResponse();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.connectedAddress = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a HolePunchRegisterResponse message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof peerInterface.HolePunchRegisterResponse\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {peerInterface.HolePunchRegisterResponse} HolePunchRegisterResponse\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n HolePunchRegisterResponse.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return HolePunchRegisterResponse;\n })();\n\n peerInterface.PeerUdpAddressRequest = (function() {\n\n /**\n * Properties of a PeerUdpAddressRequest.\n * @memberof peerInterface\n * @interface IPeerUdpAddressRequest\n * @property {string|null} [publicKey] PeerUdpAddressRequest publicKey\n */\n\n /**\n * Constructs a new PeerUdpAddressRequest.\n * @memberof peerInterface\n * @classdesc Represents a PeerUdpAddressRequest.\n * @implements IPeerUdpAddressRequest\n * @constructor\n * @param {peerInterface.IPeerUdpAddressRequest=} [p] Properties to set\n */\n function PeerUdpAddressRequest(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * PeerUdpAddressRequest publicKey.\n * @member {string} publicKey\n * @memberof peerInterface.PeerUdpAddressRequest\n * @instance\n */\n PeerUdpAddressRequest.prototype.publicKey = \"\";\n\n /**\n * Creates a new PeerUdpAddressRequest instance using the specified properties.\n * @function create\n * @memberof peerInterface.PeerUdpAddressRequest\n * @static\n * @param {peerInterface.IPeerUdpAddressRequest=} [properties] Properties to set\n * @returns {peerInterface.PeerUdpAddressRequest} PeerUdpAddressRequest instance\n */\n PeerUdpAddressRequest.create = function create(properties) {\n return new PeerUdpAddressRequest(properties);\n };\n\n /**\n * Encodes the specified PeerUdpAddressRequest message. Does not implicitly {@link peerInterface.PeerUdpAddressRequest.verify|verify} messages.\n * @function encode\n * @memberof peerInterface.PeerUdpAddressRequest\n * @static\n * @param {peerInterface.IPeerUdpAddressRequest} m PeerUdpAddressRequest message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PeerUdpAddressRequest.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.publicKey != null && Object.hasOwnProperty.call(m, \"publicKey\"))\n w.uint32(10).string(m.publicKey);\n return w;\n };\n\n /**\n * Encodes the specified PeerUdpAddressRequest message, length delimited. Does not implicitly {@link peerInterface.PeerUdpAddressRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof peerInterface.PeerUdpAddressRequest\n * @static\n * @param {peerInterface.IPeerUdpAddressRequest} message PeerUdpAddressRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PeerUdpAddressRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PeerUdpAddressRequest message from the specified reader or buffer.\n * @function decode\n * @memberof peerInterface.PeerUdpAddressRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {peerInterface.PeerUdpAddressRequest} PeerUdpAddressRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PeerUdpAddressRequest.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.PeerUdpAddressRequest();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.publicKey = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a PeerUdpAddressRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof peerInterface.PeerUdpAddressRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {peerInterface.PeerUdpAddressRequest} PeerUdpAddressRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PeerUdpAddressRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return PeerUdpAddressRequest;\n })();\n\n peerInterface.PeerUdpAddressResponse = (function() {\n\n /**\n * Properties of a PeerUdpAddressResponse.\n * @memberof peerInterface\n * @interface IPeerUdpAddressResponse\n * @property {string|null} [address] PeerUdpAddressResponse address\n */\n\n /**\n * Constructs a new PeerUdpAddressResponse.\n * @memberof peerInterface\n * @classdesc Represents a PeerUdpAddressResponse.\n * @implements IPeerUdpAddressResponse\n * @constructor\n * @param {peerInterface.IPeerUdpAddressResponse=} [p] Properties to set\n */\n function PeerUdpAddressResponse(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * PeerUdpAddressResponse address.\n * @member {string} address\n * @memberof peerInterface.PeerUdpAddressResponse\n * @instance\n */\n PeerUdpAddressResponse.prototype.address = \"\";\n\n /**\n * Creates a new PeerUdpAddressResponse instance using the specified properties.\n * @function create\n * @memberof peerInterface.PeerUdpAddressResponse\n * @static\n * @param {peerInterface.IPeerUdpAddressResponse=} [properties] Properties to set\n * @returns {peerInterface.PeerUdpAddressResponse} PeerUdpAddressResponse instance\n */\n PeerUdpAddressResponse.create = function create(properties) {\n return new PeerUdpAddressResponse(properties);\n };\n\n /**\n * Encodes the specified PeerUdpAddressResponse message. Does not implicitly {@link peerInterface.PeerUdpAddressResponse.verify|verify} messages.\n * @function encode\n * @memberof peerInterface.PeerUdpAddressResponse\n * @static\n * @param {peerInterface.IPeerUdpAddressResponse} m PeerUdpAddressResponse message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PeerUdpAddressResponse.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.address != null && Object.hasOwnProperty.call(m, \"address\"))\n w.uint32(10).string(m.address);\n return w;\n };\n\n /**\n * Encodes the specified PeerUdpAddressResponse message, length delimited. Does not implicitly {@link peerInterface.PeerUdpAddressResponse.verify|verify} messages.\n * @function encodeDelimited\n * @memberof peerInterface.PeerUdpAddressResponse\n * @static\n * @param {peerInterface.IPeerUdpAddressResponse} message PeerUdpAddressResponse message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PeerUdpAddressResponse.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PeerUdpAddressResponse message from the specified reader or buffer.\n * @function decode\n * @memberof peerInterface.PeerUdpAddressResponse\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {peerInterface.PeerUdpAddressResponse} PeerUdpAddressResponse\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PeerUdpAddressResponse.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.peerInterface.PeerUdpAddressResponse();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.address = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a PeerUdpAddressResponse message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof peerInterface.PeerUdpAddressResponse\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {peerInterface.PeerUdpAddressResponse} PeerUdpAddressResponse\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PeerUdpAddressResponse.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return PeerUdpAddressResponse;\n })();\n\n return peerInterface;\n})();\n\nmodule.exports = $root;\n","\"use strict\";\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst protobufjs = __importStar(require(\"protobufjs\"));\n/**\n * Returns a 5 character long random string of lower case letters\n */\nfunction randomString() {\n return Math.random()\n .toString(36)\n .replace(/[^a-z]+/g, '')\n .substr(0, 5);\n}\nexports.randomString = randomString;\n/**\n * Gets the first promise fulfiled\n * @param promiseList List of promises\n */\nasync function promiseAny(promiseList) {\n return await new Promise((resolve, reject) => {\n const errorList = [];\n for (const promise of promiseList) {\n promise\n .then((p) => {\n resolve(p);\n })\n .catch((_) => null);\n promise.catch((error) => {\n errorList.push(error);\n // check if all have failed\n if (errorList.length == promiseList.length) {\n reject(errorList);\n }\n });\n }\n });\n}\nexports.promiseAny = promiseAny;\nfunction protobufToString(message) {\n return protobufjs.util.base64.encode(message, 0, message.length);\n}\nexports.protobufToString = protobufToString;\nfunction stringToProtobuf(str) {\n const buffer = protobufjs.util.newBuffer(protobufjs.util.base64.length(str));\n protobufjs.util.base64.decode(str, buffer, 0);\n return buffer;\n}\nexports.stringToProtobuf = stringToProtobuf;\nasync function sleep(ms) {\n await new Promise((resolve, reject) => {\n setTimeout(() => resolve(), ms);\n });\n}\nexports.sleep = sleep;\n","module.exports = require(\"protobufjs\");","/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/\n\"use strict\";\n\nvar $protobuf = require(\"protobufjs/minimal\");\n\n// Common aliases\nvar $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;\n\n// Exported root namespace\nvar $root = $protobuf.roots[\"default\"] || ($protobuf.roots[\"default\"] = {});\n\n$root.agentInterface = (function() {\n\n /**\n * Namespace agentInterface.\n * @exports agentInterface\n * @namespace\n */\n var agentInterface = {};\n\n /**\n * AgentMessageType enum.\n * @name agentInterface.AgentMessageType\n * @enum {number}\n * @property {number} ERROR=0 ERROR value\n * @property {number} STOP_AGENT=1 STOP_AGENT value\n * @property {number} STATUS=2 STATUS value\n * @property {number} REGISTER_NODE=3 REGISTER_NODE value\n * @property {number} NEW_NODE=4 NEW_NODE value\n * @property {number} LIST_NODES=5 LIST_NODES value\n * @property {number} DERIVE_KEY=6 DERIVE_KEY value\n * @property {number} SIGN_FILE=7 SIGN_FILE value\n * @property {number} VERIFY_FILE=8 VERIFY_FILE value\n * @property {number} LIST_VAULTS=9 LIST_VAULTS value\n * @property {number} NEW_VAULT=10 NEW_VAULT value\n * @property {number} DESTROY_VAULT=11 DESTROY_VAULT value\n * @property {number} LIST_SECRETS=12 LIST_SECRETS value\n * @property {number} CREATE_SECRET=13 CREATE_SECRET value\n * @property {number} DESTROY_SECRET=14 DESTROY_SECRET value\n * @property {number} GET_SECRET=15 GET_SECRET value\n * @property {number} LIST_KEYS=16 LIST_KEYS value\n * @property {number} GET_KEY=17 GET_KEY value\n * @property {number} DELETE_KEY=18 DELETE_KEY value\n * @property {number} ENCRYPT_FILE=19 ENCRYPT_FILE value\n * @property {number} DECRYPT_FILE=20 DECRYPT_FILE value\n * @property {number} GET_PRIMARY_KEYPAIR=21 GET_PRIMARY_KEYPAIR value\n * @property {number} UPDATE_SECRET=22 UPDATE_SECRET value\n * @property {number} GET_PEER_INFO=23 GET_PEER_INFO value\n * @property {number} ADD_PEER=24 ADD_PEER value\n * @property {number} PULL_VAULT=26 PULL_VAULT value\n * @property {number} PING_PEER=27 PING_PEER value\n * @property {number} FIND_PEER=28 FIND_PEER value\n * @property {number} FIND_SOCIAL_PEER=29 FIND_SOCIAL_PEER value\n * @property {number} LIST_PEERS=30 LIST_PEERS value\n * @property {number} TOGGLE_STEALTH=31 TOGGLE_STEALTH value\n * @property {number} UPDATE_PEER_INFO=32 UPDATE_PEER_INFO value\n * @property {number} REQUEST_RELAY=33 REQUEST_RELAY value\n * @property {number} REQUEST_PUNCH=34 REQUEST_PUNCH value\n * @property {number} SCAN_VAULT_NAMES=35 SCAN_VAULT_NAMES value\n */\n agentInterface.AgentMessageType = (function() {\n var valuesById = {}, values = Object.create(valuesById);\n values[valuesById[0] = \"ERROR\"] = 0;\n values[valuesById[1] = \"STOP_AGENT\"] = 1;\n values[valuesById[2] = \"STATUS\"] = 2;\n values[valuesById[3] = \"REGISTER_NODE\"] = 3;\n values[valuesById[4] = \"NEW_NODE\"] = 4;\n values[valuesById[5] = \"LIST_NODES\"] = 5;\n values[valuesById[6] = \"DERIVE_KEY\"] = 6;\n values[valuesById[7] = \"SIGN_FILE\"] = 7;\n values[valuesById[8] = \"VERIFY_FILE\"] = 8;\n values[valuesById[9] = \"LIST_VAULTS\"] = 9;\n values[valuesById[10] = \"NEW_VAULT\"] = 10;\n values[valuesById[11] = \"DESTROY_VAULT\"] = 11;\n values[valuesById[12] = \"LIST_SECRETS\"] = 12;\n values[valuesById[13] = \"CREATE_SECRET\"] = 13;\n values[valuesById[14] = \"DESTROY_SECRET\"] = 14;\n values[valuesById[15] = \"GET_SECRET\"] = 15;\n values[valuesById[16] = \"LIST_KEYS\"] = 16;\n values[valuesById[17] = \"GET_KEY\"] = 17;\n values[valuesById[18] = \"DELETE_KEY\"] = 18;\n values[valuesById[19] = \"ENCRYPT_FILE\"] = 19;\n values[valuesById[20] = \"DECRYPT_FILE\"] = 20;\n values[valuesById[21] = \"GET_PRIMARY_KEYPAIR\"] = 21;\n values[valuesById[22] = \"UPDATE_SECRET\"] = 22;\n values[valuesById[23] = \"GET_PEER_INFO\"] = 23;\n values[valuesById[24] = \"ADD_PEER\"] = 24;\n values[valuesById[26] = \"PULL_VAULT\"] = 26;\n values[valuesById[27] = \"PING_PEER\"] = 27;\n values[valuesById[28] = \"FIND_PEER\"] = 28;\n values[valuesById[29] = \"FIND_SOCIAL_PEER\"] = 29;\n values[valuesById[30] = \"LIST_PEERS\"] = 30;\n values[valuesById[31] = \"TOGGLE_STEALTH\"] = 31;\n values[valuesById[32] = \"UPDATE_PEER_INFO\"] = 32;\n values[valuesById[33] = \"REQUEST_RELAY\"] = 33;\n values[valuesById[34] = \"REQUEST_PUNCH\"] = 34;\n values[valuesById[35] = \"SCAN_VAULT_NAMES\"] = 35;\n return values;\n })();\n\n agentInterface.AgentMessage = (function() {\n\n /**\n * Properties of an AgentMessage.\n * @memberof agentInterface\n * @interface IAgentMessage\n * @property {agentInterface.AgentMessageType|null} [type] AgentMessage type\n * @property {boolean|null} [isResponse] AgentMessage isResponse\n * @property {string|null} [nodePath] AgentMessage nodePath\n * @property {Uint8Array|null} [subMessage] AgentMessage subMessage\n */\n\n /**\n * Constructs a new AgentMessage.\n * @memberof agentInterface\n * @classdesc Represents an AgentMessage.\n * @implements IAgentMessage\n * @constructor\n * @param {agentInterface.IAgentMessage=} [p] Properties to set\n */\n function AgentMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * AgentMessage type.\n * @member {agentInterface.AgentMessageType} type\n * @memberof agentInterface.AgentMessage\n * @instance\n */\n AgentMessage.prototype.type = 0;\n\n /**\n * AgentMessage isResponse.\n * @member {boolean} isResponse\n * @memberof agentInterface.AgentMessage\n * @instance\n */\n AgentMessage.prototype.isResponse = false;\n\n /**\n * AgentMessage nodePath.\n * @member {string} nodePath\n * @memberof agentInterface.AgentMessage\n * @instance\n */\n AgentMessage.prototype.nodePath = \"\";\n\n /**\n * AgentMessage subMessage.\n * @member {Uint8Array} subMessage\n * @memberof agentInterface.AgentMessage\n * @instance\n */\n AgentMessage.prototype.subMessage = $util.newBuffer([]);\n\n /**\n * Creates a new AgentMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.AgentMessage\n * @static\n * @param {agentInterface.IAgentMessage=} [properties] Properties to set\n * @returns {agentInterface.AgentMessage} AgentMessage instance\n */\n AgentMessage.create = function create(properties) {\n return new AgentMessage(properties);\n };\n\n /**\n * Encodes the specified AgentMessage message. Does not implicitly {@link agentInterface.AgentMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.AgentMessage\n * @static\n * @param {agentInterface.IAgentMessage} m AgentMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n AgentMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.type != null && Object.hasOwnProperty.call(m, \"type\"))\n w.uint32(8).int32(m.type);\n if (m.isResponse != null && Object.hasOwnProperty.call(m, \"isResponse\"))\n w.uint32(16).bool(m.isResponse);\n if (m.nodePath != null && Object.hasOwnProperty.call(m, \"nodePath\"))\n w.uint32(26).string(m.nodePath);\n if (m.subMessage != null && Object.hasOwnProperty.call(m, \"subMessage\"))\n w.uint32(34).bytes(m.subMessage);\n return w;\n };\n\n /**\n * Encodes the specified AgentMessage message, length delimited. Does not implicitly {@link agentInterface.AgentMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.AgentMessage\n * @static\n * @param {agentInterface.IAgentMessage} message AgentMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n AgentMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an AgentMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.AgentMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.AgentMessage} AgentMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n AgentMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.AgentMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.type = r.int32();\n break;\n case 2:\n m.isResponse = r.bool();\n break;\n case 3:\n m.nodePath = r.string();\n break;\n case 4:\n m.subMessage = r.bytes();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes an AgentMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.AgentMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.AgentMessage} AgentMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n AgentMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return AgentMessage;\n })();\n\n agentInterface.ErrorMessage = (function() {\n\n /**\n * Properties of an ErrorMessage.\n * @memberof agentInterface\n * @interface IErrorMessage\n * @property {string|null} [error] ErrorMessage error\n */\n\n /**\n * Constructs a new ErrorMessage.\n * @memberof agentInterface\n * @classdesc Represents an ErrorMessage.\n * @implements IErrorMessage\n * @constructor\n * @param {agentInterface.IErrorMessage=} [p] Properties to set\n */\n function ErrorMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * ErrorMessage error.\n * @member {string} error\n * @memberof agentInterface.ErrorMessage\n * @instance\n */\n ErrorMessage.prototype.error = \"\";\n\n /**\n * Creates a new ErrorMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.ErrorMessage\n * @static\n * @param {agentInterface.IErrorMessage=} [properties] Properties to set\n * @returns {agentInterface.ErrorMessage} ErrorMessage instance\n */\n ErrorMessage.create = function create(properties) {\n return new ErrorMessage(properties);\n };\n\n /**\n * Encodes the specified ErrorMessage message. Does not implicitly {@link agentInterface.ErrorMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.ErrorMessage\n * @static\n * @param {agentInterface.IErrorMessage} m ErrorMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ErrorMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.error != null && Object.hasOwnProperty.call(m, \"error\"))\n w.uint32(10).string(m.error);\n return w;\n };\n\n /**\n * Encodes the specified ErrorMessage message, length delimited. Does not implicitly {@link agentInterface.ErrorMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.ErrorMessage\n * @static\n * @param {agentInterface.IErrorMessage} message ErrorMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ErrorMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an ErrorMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.ErrorMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.ErrorMessage} ErrorMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ErrorMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ErrorMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.error = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes an ErrorMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.ErrorMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.ErrorMessage} ErrorMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ErrorMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return ErrorMessage;\n })();\n\n /**\n * AgentStatusType enum.\n * @name agentInterface.AgentStatusType\n * @enum {number}\n * @property {number} ONLINE=0 ONLINE value\n * @property {number} OFFLINE=1 OFFLINE value\n * @property {number} ERRORED=2 ERRORED value\n */\n agentInterface.AgentStatusType = (function() {\n var valuesById = {}, values = Object.create(valuesById);\n values[valuesById[0] = \"ONLINE\"] = 0;\n values[valuesById[1] = \"OFFLINE\"] = 1;\n values[valuesById[2] = \"ERRORED\"] = 2;\n return values;\n })();\n\n agentInterface.AgentStatusResponseMessage = (function() {\n\n /**\n * Properties of an AgentStatusResponseMessage.\n * @memberof agentInterface\n * @interface IAgentStatusResponseMessage\n * @property {agentInterface.AgentStatusType|null} [status] AgentStatusResponseMessage status\n */\n\n /**\n * Constructs a new AgentStatusResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents an AgentStatusResponseMessage.\n * @implements IAgentStatusResponseMessage\n * @constructor\n * @param {agentInterface.IAgentStatusResponseMessage=} [p] Properties to set\n */\n function AgentStatusResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * AgentStatusResponseMessage status.\n * @member {agentInterface.AgentStatusType} status\n * @memberof agentInterface.AgentStatusResponseMessage\n * @instance\n */\n AgentStatusResponseMessage.prototype.status = 0;\n\n /**\n * Creates a new AgentStatusResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.AgentStatusResponseMessage\n * @static\n * @param {agentInterface.IAgentStatusResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.AgentStatusResponseMessage} AgentStatusResponseMessage instance\n */\n AgentStatusResponseMessage.create = function create(properties) {\n return new AgentStatusResponseMessage(properties);\n };\n\n /**\n * Encodes the specified AgentStatusResponseMessage message. Does not implicitly {@link agentInterface.AgentStatusResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.AgentStatusResponseMessage\n * @static\n * @param {agentInterface.IAgentStatusResponseMessage} m AgentStatusResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n AgentStatusResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.status != null && Object.hasOwnProperty.call(m, \"status\"))\n w.uint32(8).int32(m.status);\n return w;\n };\n\n /**\n * Encodes the specified AgentStatusResponseMessage message, length delimited. Does not implicitly {@link agentInterface.AgentStatusResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.AgentStatusResponseMessage\n * @static\n * @param {agentInterface.IAgentStatusResponseMessage} message AgentStatusResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n AgentStatusResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an AgentStatusResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.AgentStatusResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.AgentStatusResponseMessage} AgentStatusResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n AgentStatusResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.AgentStatusResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.status = r.int32();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes an AgentStatusResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.AgentStatusResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.AgentStatusResponseMessage} AgentStatusResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n AgentStatusResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return AgentStatusResponseMessage;\n })();\n\n agentInterface.RegisterNodeRequestMessage = (function() {\n\n /**\n * Properties of a RegisterNodeRequestMessage.\n * @memberof agentInterface\n * @interface IRegisterNodeRequestMessage\n * @property {string|null} [passphrase] RegisterNodeRequestMessage passphrase\n */\n\n /**\n * Constructs a new RegisterNodeRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a RegisterNodeRequestMessage.\n * @implements IRegisterNodeRequestMessage\n * @constructor\n * @param {agentInterface.IRegisterNodeRequestMessage=} [p] Properties to set\n */\n function RegisterNodeRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * RegisterNodeRequestMessage passphrase.\n * @member {string} passphrase\n * @memberof agentInterface.RegisterNodeRequestMessage\n * @instance\n */\n RegisterNodeRequestMessage.prototype.passphrase = \"\";\n\n /**\n * Creates a new RegisterNodeRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.RegisterNodeRequestMessage\n * @static\n * @param {agentInterface.IRegisterNodeRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.RegisterNodeRequestMessage} RegisterNodeRequestMessage instance\n */\n RegisterNodeRequestMessage.create = function create(properties) {\n return new RegisterNodeRequestMessage(properties);\n };\n\n /**\n * Encodes the specified RegisterNodeRequestMessage message. Does not implicitly {@link agentInterface.RegisterNodeRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.RegisterNodeRequestMessage\n * @static\n * @param {agentInterface.IRegisterNodeRequestMessage} m RegisterNodeRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RegisterNodeRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.passphrase != null && Object.hasOwnProperty.call(m, \"passphrase\"))\n w.uint32(10).string(m.passphrase);\n return w;\n };\n\n /**\n * Encodes the specified RegisterNodeRequestMessage message, length delimited. Does not implicitly {@link agentInterface.RegisterNodeRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.RegisterNodeRequestMessage\n * @static\n * @param {agentInterface.IRegisterNodeRequestMessage} message RegisterNodeRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RegisterNodeRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a RegisterNodeRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.RegisterNodeRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.RegisterNodeRequestMessage} RegisterNodeRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RegisterNodeRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.RegisterNodeRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.passphrase = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a RegisterNodeRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.RegisterNodeRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.RegisterNodeRequestMessage} RegisterNodeRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RegisterNodeRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return RegisterNodeRequestMessage;\n })();\n\n agentInterface.RegisterNodeResponseMessage = (function() {\n\n /**\n * Properties of a RegisterNodeResponseMessage.\n * @memberof agentInterface\n * @interface IRegisterNodeResponseMessage\n * @property {boolean|null} [successful] RegisterNodeResponseMessage successful\n */\n\n /**\n * Constructs a new RegisterNodeResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a RegisterNodeResponseMessage.\n * @implements IRegisterNodeResponseMessage\n * @constructor\n * @param {agentInterface.IRegisterNodeResponseMessage=} [p] Properties to set\n */\n function RegisterNodeResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * RegisterNodeResponseMessage successful.\n * @member {boolean} successful\n * @memberof agentInterface.RegisterNodeResponseMessage\n * @instance\n */\n RegisterNodeResponseMessage.prototype.successful = false;\n\n /**\n * Creates a new RegisterNodeResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.RegisterNodeResponseMessage\n * @static\n * @param {agentInterface.IRegisterNodeResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.RegisterNodeResponseMessage} RegisterNodeResponseMessage instance\n */\n RegisterNodeResponseMessage.create = function create(properties) {\n return new RegisterNodeResponseMessage(properties);\n };\n\n /**\n * Encodes the specified RegisterNodeResponseMessage message. Does not implicitly {@link agentInterface.RegisterNodeResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.RegisterNodeResponseMessage\n * @static\n * @param {agentInterface.IRegisterNodeResponseMessage} m RegisterNodeResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RegisterNodeResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.successful != null && Object.hasOwnProperty.call(m, \"successful\"))\n w.uint32(8).bool(m.successful);\n return w;\n };\n\n /**\n * Encodes the specified RegisterNodeResponseMessage message, length delimited. Does not implicitly {@link agentInterface.RegisterNodeResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.RegisterNodeResponseMessage\n * @static\n * @param {agentInterface.IRegisterNodeResponseMessage} message RegisterNodeResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RegisterNodeResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a RegisterNodeResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.RegisterNodeResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.RegisterNodeResponseMessage} RegisterNodeResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RegisterNodeResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.RegisterNodeResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.successful = r.bool();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a RegisterNodeResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.RegisterNodeResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.RegisterNodeResponseMessage} RegisterNodeResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RegisterNodeResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return RegisterNodeResponseMessage;\n })();\n\n agentInterface.NewNodeRequestMessage = (function() {\n\n /**\n * Properties of a NewNodeRequestMessage.\n * @memberof agentInterface\n * @interface INewNodeRequestMessage\n * @property {string|null} [userId] NewNodeRequestMessage userId\n * @property {string|null} [passphrase] NewNodeRequestMessage passphrase\n * @property {number|null} [nbits] NewNodeRequestMessage nbits\n */\n\n /**\n * Constructs a new NewNodeRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a NewNodeRequestMessage.\n * @implements INewNodeRequestMessage\n * @constructor\n * @param {agentInterface.INewNodeRequestMessage=} [p] Properties to set\n */\n function NewNodeRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * NewNodeRequestMessage userId.\n * @member {string} userId\n * @memberof agentInterface.NewNodeRequestMessage\n * @instance\n */\n NewNodeRequestMessage.prototype.userId = \"\";\n\n /**\n * NewNodeRequestMessage passphrase.\n * @member {string} passphrase\n * @memberof agentInterface.NewNodeRequestMessage\n * @instance\n */\n NewNodeRequestMessage.prototype.passphrase = \"\";\n\n /**\n * NewNodeRequestMessage nbits.\n * @member {number} nbits\n * @memberof agentInterface.NewNodeRequestMessage\n * @instance\n */\n NewNodeRequestMessage.prototype.nbits = 0;\n\n /**\n * Creates a new NewNodeRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.NewNodeRequestMessage\n * @static\n * @param {agentInterface.INewNodeRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.NewNodeRequestMessage} NewNodeRequestMessage instance\n */\n NewNodeRequestMessage.create = function create(properties) {\n return new NewNodeRequestMessage(properties);\n };\n\n /**\n * Encodes the specified NewNodeRequestMessage message. Does not implicitly {@link agentInterface.NewNodeRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.NewNodeRequestMessage\n * @static\n * @param {agentInterface.INewNodeRequestMessage} m NewNodeRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n NewNodeRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.userId != null && Object.hasOwnProperty.call(m, \"userId\"))\n w.uint32(10).string(m.userId);\n if (m.passphrase != null && Object.hasOwnProperty.call(m, \"passphrase\"))\n w.uint32(18).string(m.passphrase);\n if (m.nbits != null && Object.hasOwnProperty.call(m, \"nbits\"))\n w.uint32(24).int32(m.nbits);\n return w;\n };\n\n /**\n * Encodes the specified NewNodeRequestMessage message, length delimited. Does not implicitly {@link agentInterface.NewNodeRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.NewNodeRequestMessage\n * @static\n * @param {agentInterface.INewNodeRequestMessage} message NewNodeRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n NewNodeRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a NewNodeRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.NewNodeRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.NewNodeRequestMessage} NewNodeRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n NewNodeRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.NewNodeRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.userId = r.string();\n break;\n case 2:\n m.passphrase = r.string();\n break;\n case 3:\n m.nbits = r.int32();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a NewNodeRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.NewNodeRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.NewNodeRequestMessage} NewNodeRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n NewNodeRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return NewNodeRequestMessage;\n })();\n\n agentInterface.NewNodeResponseMessage = (function() {\n\n /**\n * Properties of a NewNodeResponseMessage.\n * @memberof agentInterface\n * @interface INewNodeResponseMessage\n * @property {boolean|null} [successful] NewNodeResponseMessage successful\n */\n\n /**\n * Constructs a new NewNodeResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a NewNodeResponseMessage.\n * @implements INewNodeResponseMessage\n * @constructor\n * @param {agentInterface.INewNodeResponseMessage=} [p] Properties to set\n */\n function NewNodeResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * NewNodeResponseMessage successful.\n * @member {boolean} successful\n * @memberof agentInterface.NewNodeResponseMessage\n * @instance\n */\n NewNodeResponseMessage.prototype.successful = false;\n\n /**\n * Creates a new NewNodeResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.NewNodeResponseMessage\n * @static\n * @param {agentInterface.INewNodeResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.NewNodeResponseMessage} NewNodeResponseMessage instance\n */\n NewNodeResponseMessage.create = function create(properties) {\n return new NewNodeResponseMessage(properties);\n };\n\n /**\n * Encodes the specified NewNodeResponseMessage message. Does not implicitly {@link agentInterface.NewNodeResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.NewNodeResponseMessage\n * @static\n * @param {agentInterface.INewNodeResponseMessage} m NewNodeResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n NewNodeResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.successful != null && Object.hasOwnProperty.call(m, \"successful\"))\n w.uint32(8).bool(m.successful);\n return w;\n };\n\n /**\n * Encodes the specified NewNodeResponseMessage message, length delimited. Does not implicitly {@link agentInterface.NewNodeResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.NewNodeResponseMessage\n * @static\n * @param {agentInterface.INewNodeResponseMessage} message NewNodeResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n NewNodeResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a NewNodeResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.NewNodeResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.NewNodeResponseMessage} NewNodeResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n NewNodeResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.NewNodeResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.successful = r.bool();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a NewNodeResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.NewNodeResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.NewNodeResponseMessage} NewNodeResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n NewNodeResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return NewNodeResponseMessage;\n })();\n\n agentInterface.ListNodesRequestMessage = (function() {\n\n /**\n * Properties of a ListNodesRequestMessage.\n * @memberof agentInterface\n * @interface IListNodesRequestMessage\n * @property {boolean|null} [unlockedOnly] ListNodesRequestMessage unlockedOnly\n */\n\n /**\n * Constructs a new ListNodesRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a ListNodesRequestMessage.\n * @implements IListNodesRequestMessage\n * @constructor\n * @param {agentInterface.IListNodesRequestMessage=} [p] Properties to set\n */\n function ListNodesRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * ListNodesRequestMessage unlockedOnly.\n * @member {boolean} unlockedOnly\n * @memberof agentInterface.ListNodesRequestMessage\n * @instance\n */\n ListNodesRequestMessage.prototype.unlockedOnly = false;\n\n /**\n * Creates a new ListNodesRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.ListNodesRequestMessage\n * @static\n * @param {agentInterface.IListNodesRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.ListNodesRequestMessage} ListNodesRequestMessage instance\n */\n ListNodesRequestMessage.create = function create(properties) {\n return new ListNodesRequestMessage(properties);\n };\n\n /**\n * Encodes the specified ListNodesRequestMessage message. Does not implicitly {@link agentInterface.ListNodesRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.ListNodesRequestMessage\n * @static\n * @param {agentInterface.IListNodesRequestMessage} m ListNodesRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ListNodesRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.unlockedOnly != null && Object.hasOwnProperty.call(m, \"unlockedOnly\"))\n w.uint32(8).bool(m.unlockedOnly);\n return w;\n };\n\n /**\n * Encodes the specified ListNodesRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ListNodesRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.ListNodesRequestMessage\n * @static\n * @param {agentInterface.IListNodesRequestMessage} message ListNodesRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ListNodesRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ListNodesRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.ListNodesRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.ListNodesRequestMessage} ListNodesRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ListNodesRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListNodesRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.unlockedOnly = r.bool();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a ListNodesRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.ListNodesRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.ListNodesRequestMessage} ListNodesRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ListNodesRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return ListNodesRequestMessage;\n })();\n\n agentInterface.ListNodesResponseMessage = (function() {\n\n /**\n * Properties of a ListNodesResponseMessage.\n * @memberof agentInterface\n * @interface IListNodesResponseMessage\n * @property {Array.|null} [nodes] ListNodesResponseMessage nodes\n */\n\n /**\n * Constructs a new ListNodesResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a ListNodesResponseMessage.\n * @implements IListNodesResponseMessage\n * @constructor\n * @param {agentInterface.IListNodesResponseMessage=} [p] Properties to set\n */\n function ListNodesResponseMessage(p) {\n this.nodes = [];\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * ListNodesResponseMessage nodes.\n * @member {Array.} nodes\n * @memberof agentInterface.ListNodesResponseMessage\n * @instance\n */\n ListNodesResponseMessage.prototype.nodes = $util.emptyArray;\n\n /**\n * Creates a new ListNodesResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.ListNodesResponseMessage\n * @static\n * @param {agentInterface.IListNodesResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.ListNodesResponseMessage} ListNodesResponseMessage instance\n */\n ListNodesResponseMessage.create = function create(properties) {\n return new ListNodesResponseMessage(properties);\n };\n\n /**\n * Encodes the specified ListNodesResponseMessage message. Does not implicitly {@link agentInterface.ListNodesResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.ListNodesResponseMessage\n * @static\n * @param {agentInterface.IListNodesResponseMessage} m ListNodesResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ListNodesResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.nodes != null && m.nodes.length) {\n for (var i = 0; i < m.nodes.length; ++i)\n w.uint32(10).string(m.nodes[i]);\n }\n return w;\n };\n\n /**\n * Encodes the specified ListNodesResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ListNodesResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.ListNodesResponseMessage\n * @static\n * @param {agentInterface.IListNodesResponseMessage} message ListNodesResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ListNodesResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ListNodesResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.ListNodesResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.ListNodesResponseMessage} ListNodesResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ListNodesResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListNodesResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n if (!(m.nodes && m.nodes.length))\n m.nodes = [];\n m.nodes.push(r.string());\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a ListNodesResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.ListNodesResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.ListNodesResponseMessage} ListNodesResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ListNodesResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return ListNodesResponseMessage;\n })();\n\n agentInterface.SignFileRequestMessage = (function() {\n\n /**\n * Properties of a SignFileRequestMessage.\n * @memberof agentInterface\n * @interface ISignFileRequestMessage\n * @property {string|null} [filePath] SignFileRequestMessage filePath\n * @property {string|null} [privateKeyPath] SignFileRequestMessage privateKeyPath\n * @property {string|null} [passphrase] SignFileRequestMessage passphrase\n */\n\n /**\n * Constructs a new SignFileRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a SignFileRequestMessage.\n * @implements ISignFileRequestMessage\n * @constructor\n * @param {agentInterface.ISignFileRequestMessage=} [p] Properties to set\n */\n function SignFileRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * SignFileRequestMessage filePath.\n * @member {string} filePath\n * @memberof agentInterface.SignFileRequestMessage\n * @instance\n */\n SignFileRequestMessage.prototype.filePath = \"\";\n\n /**\n * SignFileRequestMessage privateKeyPath.\n * @member {string} privateKeyPath\n * @memberof agentInterface.SignFileRequestMessage\n * @instance\n */\n SignFileRequestMessage.prototype.privateKeyPath = \"\";\n\n /**\n * SignFileRequestMessage passphrase.\n * @member {string} passphrase\n * @memberof agentInterface.SignFileRequestMessage\n * @instance\n */\n SignFileRequestMessage.prototype.passphrase = \"\";\n\n /**\n * Creates a new SignFileRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.SignFileRequestMessage\n * @static\n * @param {agentInterface.ISignFileRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.SignFileRequestMessage} SignFileRequestMessage instance\n */\n SignFileRequestMessage.create = function create(properties) {\n return new SignFileRequestMessage(properties);\n };\n\n /**\n * Encodes the specified SignFileRequestMessage message. Does not implicitly {@link agentInterface.SignFileRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.SignFileRequestMessage\n * @static\n * @param {agentInterface.ISignFileRequestMessage} m SignFileRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SignFileRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.filePath != null && Object.hasOwnProperty.call(m, \"filePath\"))\n w.uint32(10).string(m.filePath);\n if (m.privateKeyPath != null && Object.hasOwnProperty.call(m, \"privateKeyPath\"))\n w.uint32(18).string(m.privateKeyPath);\n if (m.passphrase != null && Object.hasOwnProperty.call(m, \"passphrase\"))\n w.uint32(26).string(m.passphrase);\n return w;\n };\n\n /**\n * Encodes the specified SignFileRequestMessage message, length delimited. Does not implicitly {@link agentInterface.SignFileRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.SignFileRequestMessage\n * @static\n * @param {agentInterface.ISignFileRequestMessage} message SignFileRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SignFileRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a SignFileRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.SignFileRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.SignFileRequestMessage} SignFileRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SignFileRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.SignFileRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.filePath = r.string();\n break;\n case 2:\n m.privateKeyPath = r.string();\n break;\n case 3:\n m.passphrase = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a SignFileRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.SignFileRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.SignFileRequestMessage} SignFileRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SignFileRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return SignFileRequestMessage;\n })();\n\n agentInterface.SignFileResponseMessage = (function() {\n\n /**\n * Properties of a SignFileResponseMessage.\n * @memberof agentInterface\n * @interface ISignFileResponseMessage\n * @property {string|null} [signaturePath] SignFileResponseMessage signaturePath\n */\n\n /**\n * Constructs a new SignFileResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a SignFileResponseMessage.\n * @implements ISignFileResponseMessage\n * @constructor\n * @param {agentInterface.ISignFileResponseMessage=} [p] Properties to set\n */\n function SignFileResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * SignFileResponseMessage signaturePath.\n * @member {string} signaturePath\n * @memberof agentInterface.SignFileResponseMessage\n * @instance\n */\n SignFileResponseMessage.prototype.signaturePath = \"\";\n\n /**\n * Creates a new SignFileResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.SignFileResponseMessage\n * @static\n * @param {agentInterface.ISignFileResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.SignFileResponseMessage} SignFileResponseMessage instance\n */\n SignFileResponseMessage.create = function create(properties) {\n return new SignFileResponseMessage(properties);\n };\n\n /**\n * Encodes the specified SignFileResponseMessage message. Does not implicitly {@link agentInterface.SignFileResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.SignFileResponseMessage\n * @static\n * @param {agentInterface.ISignFileResponseMessage} m SignFileResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SignFileResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.signaturePath != null && Object.hasOwnProperty.call(m, \"signaturePath\"))\n w.uint32(10).string(m.signaturePath);\n return w;\n };\n\n /**\n * Encodes the specified SignFileResponseMessage message, length delimited. Does not implicitly {@link agentInterface.SignFileResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.SignFileResponseMessage\n * @static\n * @param {agentInterface.ISignFileResponseMessage} message SignFileResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SignFileResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a SignFileResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.SignFileResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.SignFileResponseMessage} SignFileResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SignFileResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.SignFileResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.signaturePath = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a SignFileResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.SignFileResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.SignFileResponseMessage} SignFileResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SignFileResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return SignFileResponseMessage;\n })();\n\n agentInterface.VerifyFileRequestMessage = (function() {\n\n /**\n * Properties of a VerifyFileRequestMessage.\n * @memberof agentInterface\n * @interface IVerifyFileRequestMessage\n * @property {string|null} [filePath] VerifyFileRequestMessage filePath\n * @property {string|null} [publicKeyPath] VerifyFileRequestMessage publicKeyPath\n */\n\n /**\n * Constructs a new VerifyFileRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a VerifyFileRequestMessage.\n * @implements IVerifyFileRequestMessage\n * @constructor\n * @param {agentInterface.IVerifyFileRequestMessage=} [p] Properties to set\n */\n function VerifyFileRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * VerifyFileRequestMessage filePath.\n * @member {string} filePath\n * @memberof agentInterface.VerifyFileRequestMessage\n * @instance\n */\n VerifyFileRequestMessage.prototype.filePath = \"\";\n\n /**\n * VerifyFileRequestMessage publicKeyPath.\n * @member {string} publicKeyPath\n * @memberof agentInterface.VerifyFileRequestMessage\n * @instance\n */\n VerifyFileRequestMessage.prototype.publicKeyPath = \"\";\n\n /**\n * Creates a new VerifyFileRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.VerifyFileRequestMessage\n * @static\n * @param {agentInterface.IVerifyFileRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.VerifyFileRequestMessage} VerifyFileRequestMessage instance\n */\n VerifyFileRequestMessage.create = function create(properties) {\n return new VerifyFileRequestMessage(properties);\n };\n\n /**\n * Encodes the specified VerifyFileRequestMessage message. Does not implicitly {@link agentInterface.VerifyFileRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.VerifyFileRequestMessage\n * @static\n * @param {agentInterface.IVerifyFileRequestMessage} m VerifyFileRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n VerifyFileRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.filePath != null && Object.hasOwnProperty.call(m, \"filePath\"))\n w.uint32(10).string(m.filePath);\n if (m.publicKeyPath != null && Object.hasOwnProperty.call(m, \"publicKeyPath\"))\n w.uint32(18).string(m.publicKeyPath);\n return w;\n };\n\n /**\n * Encodes the specified VerifyFileRequestMessage message, length delimited. Does not implicitly {@link agentInterface.VerifyFileRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.VerifyFileRequestMessage\n * @static\n * @param {agentInterface.IVerifyFileRequestMessage} message VerifyFileRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n VerifyFileRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a VerifyFileRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.VerifyFileRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.VerifyFileRequestMessage} VerifyFileRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n VerifyFileRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.VerifyFileRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.filePath = r.string();\n break;\n case 2:\n m.publicKeyPath = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a VerifyFileRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.VerifyFileRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.VerifyFileRequestMessage} VerifyFileRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n VerifyFileRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return VerifyFileRequestMessage;\n })();\n\n agentInterface.VerifyFileResponseMessage = (function() {\n\n /**\n * Properties of a VerifyFileResponseMessage.\n * @memberof agentInterface\n * @interface IVerifyFileResponseMessage\n * @property {boolean|null} [verified] VerifyFileResponseMessage verified\n */\n\n /**\n * Constructs a new VerifyFileResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a VerifyFileResponseMessage.\n * @implements IVerifyFileResponseMessage\n * @constructor\n * @param {agentInterface.IVerifyFileResponseMessage=} [p] Properties to set\n */\n function VerifyFileResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * VerifyFileResponseMessage verified.\n * @member {boolean} verified\n * @memberof agentInterface.VerifyFileResponseMessage\n * @instance\n */\n VerifyFileResponseMessage.prototype.verified = false;\n\n /**\n * Creates a new VerifyFileResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.VerifyFileResponseMessage\n * @static\n * @param {agentInterface.IVerifyFileResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.VerifyFileResponseMessage} VerifyFileResponseMessage instance\n */\n VerifyFileResponseMessage.create = function create(properties) {\n return new VerifyFileResponseMessage(properties);\n };\n\n /**\n * Encodes the specified VerifyFileResponseMessage message. Does not implicitly {@link agentInterface.VerifyFileResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.VerifyFileResponseMessage\n * @static\n * @param {agentInterface.IVerifyFileResponseMessage} m VerifyFileResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n VerifyFileResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.verified != null && Object.hasOwnProperty.call(m, \"verified\"))\n w.uint32(8).bool(m.verified);\n return w;\n };\n\n /**\n * Encodes the specified VerifyFileResponseMessage message, length delimited. Does not implicitly {@link agentInterface.VerifyFileResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.VerifyFileResponseMessage\n * @static\n * @param {agentInterface.IVerifyFileResponseMessage} message VerifyFileResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n VerifyFileResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a VerifyFileResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.VerifyFileResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.VerifyFileResponseMessage} VerifyFileResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n VerifyFileResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.VerifyFileResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.verified = r.bool();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a VerifyFileResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.VerifyFileResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.VerifyFileResponseMessage} VerifyFileResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n VerifyFileResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return VerifyFileResponseMessage;\n })();\n\n agentInterface.EncryptFileRequestMessage = (function() {\n\n /**\n * Properties of an EncryptFileRequestMessage.\n * @memberof agentInterface\n * @interface IEncryptFileRequestMessage\n * @property {string|null} [filePath] EncryptFileRequestMessage filePath\n * @property {string|null} [publicKeyPath] EncryptFileRequestMessage publicKeyPath\n */\n\n /**\n * Constructs a new EncryptFileRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents an EncryptFileRequestMessage.\n * @implements IEncryptFileRequestMessage\n * @constructor\n * @param {agentInterface.IEncryptFileRequestMessage=} [p] Properties to set\n */\n function EncryptFileRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * EncryptFileRequestMessage filePath.\n * @member {string} filePath\n * @memberof agentInterface.EncryptFileRequestMessage\n * @instance\n */\n EncryptFileRequestMessage.prototype.filePath = \"\";\n\n /**\n * EncryptFileRequestMessage publicKeyPath.\n * @member {string} publicKeyPath\n * @memberof agentInterface.EncryptFileRequestMessage\n * @instance\n */\n EncryptFileRequestMessage.prototype.publicKeyPath = \"\";\n\n /**\n * Creates a new EncryptFileRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.EncryptFileRequestMessage\n * @static\n * @param {agentInterface.IEncryptFileRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.EncryptFileRequestMessage} EncryptFileRequestMessage instance\n */\n EncryptFileRequestMessage.create = function create(properties) {\n return new EncryptFileRequestMessage(properties);\n };\n\n /**\n * Encodes the specified EncryptFileRequestMessage message. Does not implicitly {@link agentInterface.EncryptFileRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.EncryptFileRequestMessage\n * @static\n * @param {agentInterface.IEncryptFileRequestMessage} m EncryptFileRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n EncryptFileRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.filePath != null && Object.hasOwnProperty.call(m, \"filePath\"))\n w.uint32(10).string(m.filePath);\n if (m.publicKeyPath != null && Object.hasOwnProperty.call(m, \"publicKeyPath\"))\n w.uint32(18).string(m.publicKeyPath);\n return w;\n };\n\n /**\n * Encodes the specified EncryptFileRequestMessage message, length delimited. Does not implicitly {@link agentInterface.EncryptFileRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.EncryptFileRequestMessage\n * @static\n * @param {agentInterface.IEncryptFileRequestMessage} message EncryptFileRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n EncryptFileRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an EncryptFileRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.EncryptFileRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.EncryptFileRequestMessage} EncryptFileRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n EncryptFileRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.EncryptFileRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.filePath = r.string();\n break;\n case 2:\n m.publicKeyPath = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes an EncryptFileRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.EncryptFileRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.EncryptFileRequestMessage} EncryptFileRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n EncryptFileRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return EncryptFileRequestMessage;\n })();\n\n agentInterface.EncryptFileResponseMessage = (function() {\n\n /**\n * Properties of an EncryptFileResponseMessage.\n * @memberof agentInterface\n * @interface IEncryptFileResponseMessage\n * @property {string|null} [encryptedPath] EncryptFileResponseMessage encryptedPath\n */\n\n /**\n * Constructs a new EncryptFileResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents an EncryptFileResponseMessage.\n * @implements IEncryptFileResponseMessage\n * @constructor\n * @param {agentInterface.IEncryptFileResponseMessage=} [p] Properties to set\n */\n function EncryptFileResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * EncryptFileResponseMessage encryptedPath.\n * @member {string} encryptedPath\n * @memberof agentInterface.EncryptFileResponseMessage\n * @instance\n */\n EncryptFileResponseMessage.prototype.encryptedPath = \"\";\n\n /**\n * Creates a new EncryptFileResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.EncryptFileResponseMessage\n * @static\n * @param {agentInterface.IEncryptFileResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.EncryptFileResponseMessage} EncryptFileResponseMessage instance\n */\n EncryptFileResponseMessage.create = function create(properties) {\n return new EncryptFileResponseMessage(properties);\n };\n\n /**\n * Encodes the specified EncryptFileResponseMessage message. Does not implicitly {@link agentInterface.EncryptFileResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.EncryptFileResponseMessage\n * @static\n * @param {agentInterface.IEncryptFileResponseMessage} m EncryptFileResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n EncryptFileResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.encryptedPath != null && Object.hasOwnProperty.call(m, \"encryptedPath\"))\n w.uint32(10).string(m.encryptedPath);\n return w;\n };\n\n /**\n * Encodes the specified EncryptFileResponseMessage message, length delimited. Does not implicitly {@link agentInterface.EncryptFileResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.EncryptFileResponseMessage\n * @static\n * @param {agentInterface.IEncryptFileResponseMessage} message EncryptFileResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n EncryptFileResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an EncryptFileResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.EncryptFileResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.EncryptFileResponseMessage} EncryptFileResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n EncryptFileResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.EncryptFileResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.encryptedPath = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes an EncryptFileResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.EncryptFileResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.EncryptFileResponseMessage} EncryptFileResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n EncryptFileResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return EncryptFileResponseMessage;\n })();\n\n agentInterface.DecryptFileRequestMessage = (function() {\n\n /**\n * Properties of a DecryptFileRequestMessage.\n * @memberof agentInterface\n * @interface IDecryptFileRequestMessage\n * @property {string|null} [filePath] DecryptFileRequestMessage filePath\n * @property {string|null} [privateKeyPath] DecryptFileRequestMessage privateKeyPath\n * @property {string|null} [passphrase] DecryptFileRequestMessage passphrase\n */\n\n /**\n * Constructs a new DecryptFileRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a DecryptFileRequestMessage.\n * @implements IDecryptFileRequestMessage\n * @constructor\n * @param {agentInterface.IDecryptFileRequestMessage=} [p] Properties to set\n */\n function DecryptFileRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * DecryptFileRequestMessage filePath.\n * @member {string} filePath\n * @memberof agentInterface.DecryptFileRequestMessage\n * @instance\n */\n DecryptFileRequestMessage.prototype.filePath = \"\";\n\n /**\n * DecryptFileRequestMessage privateKeyPath.\n * @member {string} privateKeyPath\n * @memberof agentInterface.DecryptFileRequestMessage\n * @instance\n */\n DecryptFileRequestMessage.prototype.privateKeyPath = \"\";\n\n /**\n * DecryptFileRequestMessage passphrase.\n * @member {string} passphrase\n * @memberof agentInterface.DecryptFileRequestMessage\n * @instance\n */\n DecryptFileRequestMessage.prototype.passphrase = \"\";\n\n /**\n * Creates a new DecryptFileRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.DecryptFileRequestMessage\n * @static\n * @param {agentInterface.IDecryptFileRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.DecryptFileRequestMessage} DecryptFileRequestMessage instance\n */\n DecryptFileRequestMessage.create = function create(properties) {\n return new DecryptFileRequestMessage(properties);\n };\n\n /**\n * Encodes the specified DecryptFileRequestMessage message. Does not implicitly {@link agentInterface.DecryptFileRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.DecryptFileRequestMessage\n * @static\n * @param {agentInterface.IDecryptFileRequestMessage} m DecryptFileRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n DecryptFileRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.filePath != null && Object.hasOwnProperty.call(m, \"filePath\"))\n w.uint32(10).string(m.filePath);\n if (m.privateKeyPath != null && Object.hasOwnProperty.call(m, \"privateKeyPath\"))\n w.uint32(18).string(m.privateKeyPath);\n if (m.passphrase != null && Object.hasOwnProperty.call(m, \"passphrase\"))\n w.uint32(26).string(m.passphrase);\n return w;\n };\n\n /**\n * Encodes the specified DecryptFileRequestMessage message, length delimited. Does not implicitly {@link agentInterface.DecryptFileRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.DecryptFileRequestMessage\n * @static\n * @param {agentInterface.IDecryptFileRequestMessage} message DecryptFileRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n DecryptFileRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a DecryptFileRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.DecryptFileRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.DecryptFileRequestMessage} DecryptFileRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n DecryptFileRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DecryptFileRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.filePath = r.string();\n break;\n case 2:\n m.privateKeyPath = r.string();\n break;\n case 3:\n m.passphrase = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a DecryptFileRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.DecryptFileRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.DecryptFileRequestMessage} DecryptFileRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n DecryptFileRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return DecryptFileRequestMessage;\n })();\n\n agentInterface.DecryptFileResponseMessage = (function() {\n\n /**\n * Properties of a DecryptFileResponseMessage.\n * @memberof agentInterface\n * @interface IDecryptFileResponseMessage\n * @property {string|null} [decryptedPath] DecryptFileResponseMessage decryptedPath\n */\n\n /**\n * Constructs a new DecryptFileResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a DecryptFileResponseMessage.\n * @implements IDecryptFileResponseMessage\n * @constructor\n * @param {agentInterface.IDecryptFileResponseMessage=} [p] Properties to set\n */\n function DecryptFileResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * DecryptFileResponseMessage decryptedPath.\n * @member {string} decryptedPath\n * @memberof agentInterface.DecryptFileResponseMessage\n * @instance\n */\n DecryptFileResponseMessage.prototype.decryptedPath = \"\";\n\n /**\n * Creates a new DecryptFileResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.DecryptFileResponseMessage\n * @static\n * @param {agentInterface.IDecryptFileResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.DecryptFileResponseMessage} DecryptFileResponseMessage instance\n */\n DecryptFileResponseMessage.create = function create(properties) {\n return new DecryptFileResponseMessage(properties);\n };\n\n /**\n * Encodes the specified DecryptFileResponseMessage message. Does not implicitly {@link agentInterface.DecryptFileResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.DecryptFileResponseMessage\n * @static\n * @param {agentInterface.IDecryptFileResponseMessage} m DecryptFileResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n DecryptFileResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.decryptedPath != null && Object.hasOwnProperty.call(m, \"decryptedPath\"))\n w.uint32(10).string(m.decryptedPath);\n return w;\n };\n\n /**\n * Encodes the specified DecryptFileResponseMessage message, length delimited. Does not implicitly {@link agentInterface.DecryptFileResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.DecryptFileResponseMessage\n * @static\n * @param {agentInterface.IDecryptFileResponseMessage} message DecryptFileResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n DecryptFileResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a DecryptFileResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.DecryptFileResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.DecryptFileResponseMessage} DecryptFileResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n DecryptFileResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DecryptFileResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.decryptedPath = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a DecryptFileResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.DecryptFileResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.DecryptFileResponseMessage} DecryptFileResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n DecryptFileResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return DecryptFileResponseMessage;\n })();\n\n agentInterface.ListVaultsRequestMessage = (function() {\n\n /**\n * Properties of a ListVaultsRequestMessage.\n * @memberof agentInterface\n * @interface IListVaultsRequestMessage\n */\n\n /**\n * Constructs a new ListVaultsRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a ListVaultsRequestMessage.\n * @implements IListVaultsRequestMessage\n * @constructor\n * @param {agentInterface.IListVaultsRequestMessage=} [p] Properties to set\n */\n function ListVaultsRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * Creates a new ListVaultsRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.ListVaultsRequestMessage\n * @static\n * @param {agentInterface.IListVaultsRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.ListVaultsRequestMessage} ListVaultsRequestMessage instance\n */\n ListVaultsRequestMessage.create = function create(properties) {\n return new ListVaultsRequestMessage(properties);\n };\n\n /**\n * Encodes the specified ListVaultsRequestMessage message. Does not implicitly {@link agentInterface.ListVaultsRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.ListVaultsRequestMessage\n * @static\n * @param {agentInterface.IListVaultsRequestMessage} m ListVaultsRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ListVaultsRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n return w;\n };\n\n /**\n * Encodes the specified ListVaultsRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ListVaultsRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.ListVaultsRequestMessage\n * @static\n * @param {agentInterface.IListVaultsRequestMessage} message ListVaultsRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ListVaultsRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ListVaultsRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.ListVaultsRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.ListVaultsRequestMessage} ListVaultsRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ListVaultsRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListVaultsRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a ListVaultsRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.ListVaultsRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.ListVaultsRequestMessage} ListVaultsRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ListVaultsRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return ListVaultsRequestMessage;\n })();\n\n agentInterface.ListVaultsResponseMessage = (function() {\n\n /**\n * Properties of a ListVaultsResponseMessage.\n * @memberof agentInterface\n * @interface IListVaultsResponseMessage\n * @property {Array.|null} [vaultNames] ListVaultsResponseMessage vaultNames\n */\n\n /**\n * Constructs a new ListVaultsResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a ListVaultsResponseMessage.\n * @implements IListVaultsResponseMessage\n * @constructor\n * @param {agentInterface.IListVaultsResponseMessage=} [p] Properties to set\n */\n function ListVaultsResponseMessage(p) {\n this.vaultNames = [];\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * ListVaultsResponseMessage vaultNames.\n * @member {Array.} vaultNames\n * @memberof agentInterface.ListVaultsResponseMessage\n * @instance\n */\n ListVaultsResponseMessage.prototype.vaultNames = $util.emptyArray;\n\n /**\n * Creates a new ListVaultsResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.ListVaultsResponseMessage\n * @static\n * @param {agentInterface.IListVaultsResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.ListVaultsResponseMessage} ListVaultsResponseMessage instance\n */\n ListVaultsResponseMessage.create = function create(properties) {\n return new ListVaultsResponseMessage(properties);\n };\n\n /**\n * Encodes the specified ListVaultsResponseMessage message. Does not implicitly {@link agentInterface.ListVaultsResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.ListVaultsResponseMessage\n * @static\n * @param {agentInterface.IListVaultsResponseMessage} m ListVaultsResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ListVaultsResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.vaultNames != null && m.vaultNames.length) {\n for (var i = 0; i < m.vaultNames.length; ++i)\n w.uint32(10).string(m.vaultNames[i]);\n }\n return w;\n };\n\n /**\n * Encodes the specified ListVaultsResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ListVaultsResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.ListVaultsResponseMessage\n * @static\n * @param {agentInterface.IListVaultsResponseMessage} message ListVaultsResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ListVaultsResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ListVaultsResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.ListVaultsResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.ListVaultsResponseMessage} ListVaultsResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ListVaultsResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListVaultsResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n if (!(m.vaultNames && m.vaultNames.length))\n m.vaultNames = [];\n m.vaultNames.push(r.string());\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a ListVaultsResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.ListVaultsResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.ListVaultsResponseMessage} ListVaultsResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ListVaultsResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return ListVaultsResponseMessage;\n })();\n\n agentInterface.ScanVaultNamesRequestMessage = (function() {\n\n /**\n * Properties of a ScanVaultNamesRequestMessage.\n * @memberof agentInterface\n * @interface IScanVaultNamesRequestMessage\n * @property {string|null} [publicKey] ScanVaultNamesRequestMessage publicKey\n */\n\n /**\n * Constructs a new ScanVaultNamesRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a ScanVaultNamesRequestMessage.\n * @implements IScanVaultNamesRequestMessage\n * @constructor\n * @param {agentInterface.IScanVaultNamesRequestMessage=} [p] Properties to set\n */\n function ScanVaultNamesRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * ScanVaultNamesRequestMessage publicKey.\n * @member {string} publicKey\n * @memberof agentInterface.ScanVaultNamesRequestMessage\n * @instance\n */\n ScanVaultNamesRequestMessage.prototype.publicKey = \"\";\n\n /**\n * Creates a new ScanVaultNamesRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.ScanVaultNamesRequestMessage\n * @static\n * @param {agentInterface.IScanVaultNamesRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.ScanVaultNamesRequestMessage} ScanVaultNamesRequestMessage instance\n */\n ScanVaultNamesRequestMessage.create = function create(properties) {\n return new ScanVaultNamesRequestMessage(properties);\n };\n\n /**\n * Encodes the specified ScanVaultNamesRequestMessage message. Does not implicitly {@link agentInterface.ScanVaultNamesRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.ScanVaultNamesRequestMessage\n * @static\n * @param {agentInterface.IScanVaultNamesRequestMessage} m ScanVaultNamesRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ScanVaultNamesRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.publicKey != null && Object.hasOwnProperty.call(m, \"publicKey\"))\n w.uint32(10).string(m.publicKey);\n return w;\n };\n\n /**\n * Encodes the specified ScanVaultNamesRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ScanVaultNamesRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.ScanVaultNamesRequestMessage\n * @static\n * @param {agentInterface.IScanVaultNamesRequestMessage} message ScanVaultNamesRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ScanVaultNamesRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ScanVaultNamesRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.ScanVaultNamesRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.ScanVaultNamesRequestMessage} ScanVaultNamesRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ScanVaultNamesRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ScanVaultNamesRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.publicKey = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a ScanVaultNamesRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.ScanVaultNamesRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.ScanVaultNamesRequestMessage} ScanVaultNamesRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ScanVaultNamesRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return ScanVaultNamesRequestMessage;\n })();\n\n agentInterface.ScanVaultNamesResponseMessage = (function() {\n\n /**\n * Properties of a ScanVaultNamesResponseMessage.\n * @memberof agentInterface\n * @interface IScanVaultNamesResponseMessage\n * @property {Array.|null} [vaultNames] ScanVaultNamesResponseMessage vaultNames\n */\n\n /**\n * Constructs a new ScanVaultNamesResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a ScanVaultNamesResponseMessage.\n * @implements IScanVaultNamesResponseMessage\n * @constructor\n * @param {agentInterface.IScanVaultNamesResponseMessage=} [p] Properties to set\n */\n function ScanVaultNamesResponseMessage(p) {\n this.vaultNames = [];\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * ScanVaultNamesResponseMessage vaultNames.\n * @member {Array.} vaultNames\n * @memberof agentInterface.ScanVaultNamesResponseMessage\n * @instance\n */\n ScanVaultNamesResponseMessage.prototype.vaultNames = $util.emptyArray;\n\n /**\n * Creates a new ScanVaultNamesResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.ScanVaultNamesResponseMessage\n * @static\n * @param {agentInterface.IScanVaultNamesResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.ScanVaultNamesResponseMessage} ScanVaultNamesResponseMessage instance\n */\n ScanVaultNamesResponseMessage.create = function create(properties) {\n return new ScanVaultNamesResponseMessage(properties);\n };\n\n /**\n * Encodes the specified ScanVaultNamesResponseMessage message. Does not implicitly {@link agentInterface.ScanVaultNamesResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.ScanVaultNamesResponseMessage\n * @static\n * @param {agentInterface.IScanVaultNamesResponseMessage} m ScanVaultNamesResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ScanVaultNamesResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.vaultNames != null && m.vaultNames.length) {\n for (var i = 0; i < m.vaultNames.length; ++i)\n w.uint32(10).string(m.vaultNames[i]);\n }\n return w;\n };\n\n /**\n * Encodes the specified ScanVaultNamesResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ScanVaultNamesResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.ScanVaultNamesResponseMessage\n * @static\n * @param {agentInterface.IScanVaultNamesResponseMessage} message ScanVaultNamesResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ScanVaultNamesResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ScanVaultNamesResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.ScanVaultNamesResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.ScanVaultNamesResponseMessage} ScanVaultNamesResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ScanVaultNamesResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ScanVaultNamesResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n if (!(m.vaultNames && m.vaultNames.length))\n m.vaultNames = [];\n m.vaultNames.push(r.string());\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a ScanVaultNamesResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.ScanVaultNamesResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.ScanVaultNamesResponseMessage} ScanVaultNamesResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ScanVaultNamesResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return ScanVaultNamesResponseMessage;\n })();\n\n agentInterface.NewVaultRequestMessage = (function() {\n\n /**\n * Properties of a NewVaultRequestMessage.\n * @memberof agentInterface\n * @interface INewVaultRequestMessage\n * @property {string|null} [vaultName] NewVaultRequestMessage vaultName\n */\n\n /**\n * Constructs a new NewVaultRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a NewVaultRequestMessage.\n * @implements INewVaultRequestMessage\n * @constructor\n * @param {agentInterface.INewVaultRequestMessage=} [p] Properties to set\n */\n function NewVaultRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * NewVaultRequestMessage vaultName.\n * @member {string} vaultName\n * @memberof agentInterface.NewVaultRequestMessage\n * @instance\n */\n NewVaultRequestMessage.prototype.vaultName = \"\";\n\n /**\n * Creates a new NewVaultRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.NewVaultRequestMessage\n * @static\n * @param {agentInterface.INewVaultRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.NewVaultRequestMessage} NewVaultRequestMessage instance\n */\n NewVaultRequestMessage.create = function create(properties) {\n return new NewVaultRequestMessage(properties);\n };\n\n /**\n * Encodes the specified NewVaultRequestMessage message. Does not implicitly {@link agentInterface.NewVaultRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.NewVaultRequestMessage\n * @static\n * @param {agentInterface.INewVaultRequestMessage} m NewVaultRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n NewVaultRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.vaultName != null && Object.hasOwnProperty.call(m, \"vaultName\"))\n w.uint32(10).string(m.vaultName);\n return w;\n };\n\n /**\n * Encodes the specified NewVaultRequestMessage message, length delimited. Does not implicitly {@link agentInterface.NewVaultRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.NewVaultRequestMessage\n * @static\n * @param {agentInterface.INewVaultRequestMessage} message NewVaultRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n NewVaultRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a NewVaultRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.NewVaultRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.NewVaultRequestMessage} NewVaultRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n NewVaultRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.NewVaultRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.vaultName = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a NewVaultRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.NewVaultRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.NewVaultRequestMessage} NewVaultRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n NewVaultRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return NewVaultRequestMessage;\n })();\n\n agentInterface.NewVaultResponseMessage = (function() {\n\n /**\n * Properties of a NewVaultResponseMessage.\n * @memberof agentInterface\n * @interface INewVaultResponseMessage\n * @property {boolean|null} [successful] NewVaultResponseMessage successful\n */\n\n /**\n * Constructs a new NewVaultResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a NewVaultResponseMessage.\n * @implements INewVaultResponseMessage\n * @constructor\n * @param {agentInterface.INewVaultResponseMessage=} [p] Properties to set\n */\n function NewVaultResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * NewVaultResponseMessage successful.\n * @member {boolean} successful\n * @memberof agentInterface.NewVaultResponseMessage\n * @instance\n */\n NewVaultResponseMessage.prototype.successful = false;\n\n /**\n * Creates a new NewVaultResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.NewVaultResponseMessage\n * @static\n * @param {agentInterface.INewVaultResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.NewVaultResponseMessage} NewVaultResponseMessage instance\n */\n NewVaultResponseMessage.create = function create(properties) {\n return new NewVaultResponseMessage(properties);\n };\n\n /**\n * Encodes the specified NewVaultResponseMessage message. Does not implicitly {@link agentInterface.NewVaultResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.NewVaultResponseMessage\n * @static\n * @param {agentInterface.INewVaultResponseMessage} m NewVaultResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n NewVaultResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.successful != null && Object.hasOwnProperty.call(m, \"successful\"))\n w.uint32(8).bool(m.successful);\n return w;\n };\n\n /**\n * Encodes the specified NewVaultResponseMessage message, length delimited. Does not implicitly {@link agentInterface.NewVaultResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.NewVaultResponseMessage\n * @static\n * @param {agentInterface.INewVaultResponseMessage} message NewVaultResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n NewVaultResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a NewVaultResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.NewVaultResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.NewVaultResponseMessage} NewVaultResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n NewVaultResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.NewVaultResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.successful = r.bool();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a NewVaultResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.NewVaultResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.NewVaultResponseMessage} NewVaultResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n NewVaultResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return NewVaultResponseMessage;\n })();\n\n agentInterface.PullVaultRequestMessage = (function() {\n\n /**\n * Properties of a PullVaultRequestMessage.\n * @memberof agentInterface\n * @interface IPullVaultRequestMessage\n * @property {string|null} [vaultName] PullVaultRequestMessage vaultName\n * @property {string|null} [publicKey] PullVaultRequestMessage publicKey\n */\n\n /**\n * Constructs a new PullVaultRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a PullVaultRequestMessage.\n * @implements IPullVaultRequestMessage\n * @constructor\n * @param {agentInterface.IPullVaultRequestMessage=} [p] Properties to set\n */\n function PullVaultRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * PullVaultRequestMessage vaultName.\n * @member {string} vaultName\n * @memberof agentInterface.PullVaultRequestMessage\n * @instance\n */\n PullVaultRequestMessage.prototype.vaultName = \"\";\n\n /**\n * PullVaultRequestMessage publicKey.\n * @member {string} publicKey\n * @memberof agentInterface.PullVaultRequestMessage\n * @instance\n */\n PullVaultRequestMessage.prototype.publicKey = \"\";\n\n /**\n * Creates a new PullVaultRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.PullVaultRequestMessage\n * @static\n * @param {agentInterface.IPullVaultRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.PullVaultRequestMessage} PullVaultRequestMessage instance\n */\n PullVaultRequestMessage.create = function create(properties) {\n return new PullVaultRequestMessage(properties);\n };\n\n /**\n * Encodes the specified PullVaultRequestMessage message. Does not implicitly {@link agentInterface.PullVaultRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.PullVaultRequestMessage\n * @static\n * @param {agentInterface.IPullVaultRequestMessage} m PullVaultRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PullVaultRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.vaultName != null && Object.hasOwnProperty.call(m, \"vaultName\"))\n w.uint32(10).string(m.vaultName);\n if (m.publicKey != null && Object.hasOwnProperty.call(m, \"publicKey\"))\n w.uint32(18).string(m.publicKey);\n return w;\n };\n\n /**\n * Encodes the specified PullVaultRequestMessage message, length delimited. Does not implicitly {@link agentInterface.PullVaultRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.PullVaultRequestMessage\n * @static\n * @param {agentInterface.IPullVaultRequestMessage} message PullVaultRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PullVaultRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PullVaultRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.PullVaultRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.PullVaultRequestMessage} PullVaultRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PullVaultRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.PullVaultRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.vaultName = r.string();\n break;\n case 2:\n m.publicKey = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a PullVaultRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.PullVaultRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.PullVaultRequestMessage} PullVaultRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PullVaultRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return PullVaultRequestMessage;\n })();\n\n agentInterface.PullVaultResponseMessage = (function() {\n\n /**\n * Properties of a PullVaultResponseMessage.\n * @memberof agentInterface\n * @interface IPullVaultResponseMessage\n * @property {boolean|null} [successful] PullVaultResponseMessage successful\n */\n\n /**\n * Constructs a new PullVaultResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a PullVaultResponseMessage.\n * @implements IPullVaultResponseMessage\n * @constructor\n * @param {agentInterface.IPullVaultResponseMessage=} [p] Properties to set\n */\n function PullVaultResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * PullVaultResponseMessage successful.\n * @member {boolean} successful\n * @memberof agentInterface.PullVaultResponseMessage\n * @instance\n */\n PullVaultResponseMessage.prototype.successful = false;\n\n /**\n * Creates a new PullVaultResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.PullVaultResponseMessage\n * @static\n * @param {agentInterface.IPullVaultResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.PullVaultResponseMessage} PullVaultResponseMessage instance\n */\n PullVaultResponseMessage.create = function create(properties) {\n return new PullVaultResponseMessage(properties);\n };\n\n /**\n * Encodes the specified PullVaultResponseMessage message. Does not implicitly {@link agentInterface.PullVaultResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.PullVaultResponseMessage\n * @static\n * @param {agentInterface.IPullVaultResponseMessage} m PullVaultResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PullVaultResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.successful != null && Object.hasOwnProperty.call(m, \"successful\"))\n w.uint32(8).bool(m.successful);\n return w;\n };\n\n /**\n * Encodes the specified PullVaultResponseMessage message, length delimited. Does not implicitly {@link agentInterface.PullVaultResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.PullVaultResponseMessage\n * @static\n * @param {agentInterface.IPullVaultResponseMessage} message PullVaultResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PullVaultResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PullVaultResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.PullVaultResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.PullVaultResponseMessage} PullVaultResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PullVaultResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.PullVaultResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.successful = r.bool();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a PullVaultResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.PullVaultResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.PullVaultResponseMessage} PullVaultResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PullVaultResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return PullVaultResponseMessage;\n })();\n\n agentInterface.DestroyVaultRequestMessage = (function() {\n\n /**\n * Properties of a DestroyVaultRequestMessage.\n * @memberof agentInterface\n * @interface IDestroyVaultRequestMessage\n * @property {string|null} [vaultName] DestroyVaultRequestMessage vaultName\n */\n\n /**\n * Constructs a new DestroyVaultRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a DestroyVaultRequestMessage.\n * @implements IDestroyVaultRequestMessage\n * @constructor\n * @param {agentInterface.IDestroyVaultRequestMessage=} [p] Properties to set\n */\n function DestroyVaultRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * DestroyVaultRequestMessage vaultName.\n * @member {string} vaultName\n * @memberof agentInterface.DestroyVaultRequestMessage\n * @instance\n */\n DestroyVaultRequestMessage.prototype.vaultName = \"\";\n\n /**\n * Creates a new DestroyVaultRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.DestroyVaultRequestMessage\n * @static\n * @param {agentInterface.IDestroyVaultRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.DestroyVaultRequestMessage} DestroyVaultRequestMessage instance\n */\n DestroyVaultRequestMessage.create = function create(properties) {\n return new DestroyVaultRequestMessage(properties);\n };\n\n /**\n * Encodes the specified DestroyVaultRequestMessage message. Does not implicitly {@link agentInterface.DestroyVaultRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.DestroyVaultRequestMessage\n * @static\n * @param {agentInterface.IDestroyVaultRequestMessage} m DestroyVaultRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n DestroyVaultRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.vaultName != null && Object.hasOwnProperty.call(m, \"vaultName\"))\n w.uint32(10).string(m.vaultName);\n return w;\n };\n\n /**\n * Encodes the specified DestroyVaultRequestMessage message, length delimited. Does not implicitly {@link agentInterface.DestroyVaultRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.DestroyVaultRequestMessage\n * @static\n * @param {agentInterface.IDestroyVaultRequestMessage} message DestroyVaultRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n DestroyVaultRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a DestroyVaultRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.DestroyVaultRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.DestroyVaultRequestMessage} DestroyVaultRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n DestroyVaultRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DestroyVaultRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.vaultName = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a DestroyVaultRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.DestroyVaultRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.DestroyVaultRequestMessage} DestroyVaultRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n DestroyVaultRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return DestroyVaultRequestMessage;\n })();\n\n agentInterface.DestroyVaultResponseMessage = (function() {\n\n /**\n * Properties of a DestroyVaultResponseMessage.\n * @memberof agentInterface\n * @interface IDestroyVaultResponseMessage\n * @property {boolean|null} [successful] DestroyVaultResponseMessage successful\n */\n\n /**\n * Constructs a new DestroyVaultResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a DestroyVaultResponseMessage.\n * @implements IDestroyVaultResponseMessage\n * @constructor\n * @param {agentInterface.IDestroyVaultResponseMessage=} [p] Properties to set\n */\n function DestroyVaultResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * DestroyVaultResponseMessage successful.\n * @member {boolean} successful\n * @memberof agentInterface.DestroyVaultResponseMessage\n * @instance\n */\n DestroyVaultResponseMessage.prototype.successful = false;\n\n /**\n * Creates a new DestroyVaultResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.DestroyVaultResponseMessage\n * @static\n * @param {agentInterface.IDestroyVaultResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.DestroyVaultResponseMessage} DestroyVaultResponseMessage instance\n */\n DestroyVaultResponseMessage.create = function create(properties) {\n return new DestroyVaultResponseMessage(properties);\n };\n\n /**\n * Encodes the specified DestroyVaultResponseMessage message. Does not implicitly {@link agentInterface.DestroyVaultResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.DestroyVaultResponseMessage\n * @static\n * @param {agentInterface.IDestroyVaultResponseMessage} m DestroyVaultResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n DestroyVaultResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.successful != null && Object.hasOwnProperty.call(m, \"successful\"))\n w.uint32(8).bool(m.successful);\n return w;\n };\n\n /**\n * Encodes the specified DestroyVaultResponseMessage message, length delimited. Does not implicitly {@link agentInterface.DestroyVaultResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.DestroyVaultResponseMessage\n * @static\n * @param {agentInterface.IDestroyVaultResponseMessage} message DestroyVaultResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n DestroyVaultResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a DestroyVaultResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.DestroyVaultResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.DestroyVaultResponseMessage} DestroyVaultResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n DestroyVaultResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DestroyVaultResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.successful = r.bool();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a DestroyVaultResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.DestroyVaultResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.DestroyVaultResponseMessage} DestroyVaultResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n DestroyVaultResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return DestroyVaultResponseMessage;\n })();\n\n agentInterface.ListSecretsRequestMessage = (function() {\n\n /**\n * Properties of a ListSecretsRequestMessage.\n * @memberof agentInterface\n * @interface IListSecretsRequestMessage\n * @property {string|null} [vaultName] ListSecretsRequestMessage vaultName\n */\n\n /**\n * Constructs a new ListSecretsRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a ListSecretsRequestMessage.\n * @implements IListSecretsRequestMessage\n * @constructor\n * @param {agentInterface.IListSecretsRequestMessage=} [p] Properties to set\n */\n function ListSecretsRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * ListSecretsRequestMessage vaultName.\n * @member {string} vaultName\n * @memberof agentInterface.ListSecretsRequestMessage\n * @instance\n */\n ListSecretsRequestMessage.prototype.vaultName = \"\";\n\n /**\n * Creates a new ListSecretsRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.ListSecretsRequestMessage\n * @static\n * @param {agentInterface.IListSecretsRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.ListSecretsRequestMessage} ListSecretsRequestMessage instance\n */\n ListSecretsRequestMessage.create = function create(properties) {\n return new ListSecretsRequestMessage(properties);\n };\n\n /**\n * Encodes the specified ListSecretsRequestMessage message. Does not implicitly {@link agentInterface.ListSecretsRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.ListSecretsRequestMessage\n * @static\n * @param {agentInterface.IListSecretsRequestMessage} m ListSecretsRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ListSecretsRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.vaultName != null && Object.hasOwnProperty.call(m, \"vaultName\"))\n w.uint32(10).string(m.vaultName);\n return w;\n };\n\n /**\n * Encodes the specified ListSecretsRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ListSecretsRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.ListSecretsRequestMessage\n * @static\n * @param {agentInterface.IListSecretsRequestMessage} message ListSecretsRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ListSecretsRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ListSecretsRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.ListSecretsRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.ListSecretsRequestMessage} ListSecretsRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ListSecretsRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListSecretsRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.vaultName = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a ListSecretsRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.ListSecretsRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.ListSecretsRequestMessage} ListSecretsRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ListSecretsRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return ListSecretsRequestMessage;\n })();\n\n agentInterface.ListSecretsResponseMessage = (function() {\n\n /**\n * Properties of a ListSecretsResponseMessage.\n * @memberof agentInterface\n * @interface IListSecretsResponseMessage\n * @property {Array.|null} [secretNames] ListSecretsResponseMessage secretNames\n */\n\n /**\n * Constructs a new ListSecretsResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a ListSecretsResponseMessage.\n * @implements IListSecretsResponseMessage\n * @constructor\n * @param {agentInterface.IListSecretsResponseMessage=} [p] Properties to set\n */\n function ListSecretsResponseMessage(p) {\n this.secretNames = [];\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * ListSecretsResponseMessage secretNames.\n * @member {Array.} secretNames\n * @memberof agentInterface.ListSecretsResponseMessage\n * @instance\n */\n ListSecretsResponseMessage.prototype.secretNames = $util.emptyArray;\n\n /**\n * Creates a new ListSecretsResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.ListSecretsResponseMessage\n * @static\n * @param {agentInterface.IListSecretsResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.ListSecretsResponseMessage} ListSecretsResponseMessage instance\n */\n ListSecretsResponseMessage.create = function create(properties) {\n return new ListSecretsResponseMessage(properties);\n };\n\n /**\n * Encodes the specified ListSecretsResponseMessage message. Does not implicitly {@link agentInterface.ListSecretsResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.ListSecretsResponseMessage\n * @static\n * @param {agentInterface.IListSecretsResponseMessage} m ListSecretsResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ListSecretsResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.secretNames != null && m.secretNames.length) {\n for (var i = 0; i < m.secretNames.length; ++i)\n w.uint32(10).string(m.secretNames[i]);\n }\n return w;\n };\n\n /**\n * Encodes the specified ListSecretsResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ListSecretsResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.ListSecretsResponseMessage\n * @static\n * @param {agentInterface.IListSecretsResponseMessage} message ListSecretsResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ListSecretsResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ListSecretsResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.ListSecretsResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.ListSecretsResponseMessage} ListSecretsResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ListSecretsResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListSecretsResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n if (!(m.secretNames && m.secretNames.length))\n m.secretNames = [];\n m.secretNames.push(r.string());\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a ListSecretsResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.ListSecretsResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.ListSecretsResponseMessage} ListSecretsResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ListSecretsResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return ListSecretsResponseMessage;\n })();\n\n agentInterface.CreateSecretRequestMessage = (function() {\n\n /**\n * Properties of a CreateSecretRequestMessage.\n * @memberof agentInterface\n * @interface ICreateSecretRequestMessage\n * @property {string|null} [vaultName] CreateSecretRequestMessage vaultName\n * @property {string|null} [secretName] CreateSecretRequestMessage secretName\n * @property {string|null} [secretPath] CreateSecretRequestMessage secretPath\n * @property {Uint8Array|null} [secretContent] CreateSecretRequestMessage secretContent\n */\n\n /**\n * Constructs a new CreateSecretRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a CreateSecretRequestMessage.\n * @implements ICreateSecretRequestMessage\n * @constructor\n * @param {agentInterface.ICreateSecretRequestMessage=} [p] Properties to set\n */\n function CreateSecretRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * CreateSecretRequestMessage vaultName.\n * @member {string} vaultName\n * @memberof agentInterface.CreateSecretRequestMessage\n * @instance\n */\n CreateSecretRequestMessage.prototype.vaultName = \"\";\n\n /**\n * CreateSecretRequestMessage secretName.\n * @member {string} secretName\n * @memberof agentInterface.CreateSecretRequestMessage\n * @instance\n */\n CreateSecretRequestMessage.prototype.secretName = \"\";\n\n /**\n * CreateSecretRequestMessage secretPath.\n * @member {string} secretPath\n * @memberof agentInterface.CreateSecretRequestMessage\n * @instance\n */\n CreateSecretRequestMessage.prototype.secretPath = \"\";\n\n /**\n * CreateSecretRequestMessage secretContent.\n * @member {Uint8Array} secretContent\n * @memberof agentInterface.CreateSecretRequestMessage\n * @instance\n */\n CreateSecretRequestMessage.prototype.secretContent = $util.newBuffer([]);\n\n /**\n * Creates a new CreateSecretRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.CreateSecretRequestMessage\n * @static\n * @param {agentInterface.ICreateSecretRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.CreateSecretRequestMessage} CreateSecretRequestMessage instance\n */\n CreateSecretRequestMessage.create = function create(properties) {\n return new CreateSecretRequestMessage(properties);\n };\n\n /**\n * Encodes the specified CreateSecretRequestMessage message. Does not implicitly {@link agentInterface.CreateSecretRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.CreateSecretRequestMessage\n * @static\n * @param {agentInterface.ICreateSecretRequestMessage} m CreateSecretRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n CreateSecretRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.vaultName != null && Object.hasOwnProperty.call(m, \"vaultName\"))\n w.uint32(10).string(m.vaultName);\n if (m.secretName != null && Object.hasOwnProperty.call(m, \"secretName\"))\n w.uint32(18).string(m.secretName);\n if (m.secretPath != null && Object.hasOwnProperty.call(m, \"secretPath\"))\n w.uint32(26).string(m.secretPath);\n if (m.secretContent != null && Object.hasOwnProperty.call(m, \"secretContent\"))\n w.uint32(34).bytes(m.secretContent);\n return w;\n };\n\n /**\n * Encodes the specified CreateSecretRequestMessage message, length delimited. Does not implicitly {@link agentInterface.CreateSecretRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.CreateSecretRequestMessage\n * @static\n * @param {agentInterface.ICreateSecretRequestMessage} message CreateSecretRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n CreateSecretRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a CreateSecretRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.CreateSecretRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.CreateSecretRequestMessage} CreateSecretRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n CreateSecretRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.CreateSecretRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.vaultName = r.string();\n break;\n case 2:\n m.secretName = r.string();\n break;\n case 3:\n m.secretPath = r.string();\n break;\n case 4:\n m.secretContent = r.bytes();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a CreateSecretRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.CreateSecretRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.CreateSecretRequestMessage} CreateSecretRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n CreateSecretRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return CreateSecretRequestMessage;\n })();\n\n agentInterface.CreateSecretResponseMessage = (function() {\n\n /**\n * Properties of a CreateSecretResponseMessage.\n * @memberof agentInterface\n * @interface ICreateSecretResponseMessage\n * @property {boolean|null} [successful] CreateSecretResponseMessage successful\n */\n\n /**\n * Constructs a new CreateSecretResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a CreateSecretResponseMessage.\n * @implements ICreateSecretResponseMessage\n * @constructor\n * @param {agentInterface.ICreateSecretResponseMessage=} [p] Properties to set\n */\n function CreateSecretResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * CreateSecretResponseMessage successful.\n * @member {boolean} successful\n * @memberof agentInterface.CreateSecretResponseMessage\n * @instance\n */\n CreateSecretResponseMessage.prototype.successful = false;\n\n /**\n * Creates a new CreateSecretResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.CreateSecretResponseMessage\n * @static\n * @param {agentInterface.ICreateSecretResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.CreateSecretResponseMessage} CreateSecretResponseMessage instance\n */\n CreateSecretResponseMessage.create = function create(properties) {\n return new CreateSecretResponseMessage(properties);\n };\n\n /**\n * Encodes the specified CreateSecretResponseMessage message. Does not implicitly {@link agentInterface.CreateSecretResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.CreateSecretResponseMessage\n * @static\n * @param {agentInterface.ICreateSecretResponseMessage} m CreateSecretResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n CreateSecretResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.successful != null && Object.hasOwnProperty.call(m, \"successful\"))\n w.uint32(8).bool(m.successful);\n return w;\n };\n\n /**\n * Encodes the specified CreateSecretResponseMessage message, length delimited. Does not implicitly {@link agentInterface.CreateSecretResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.CreateSecretResponseMessage\n * @static\n * @param {agentInterface.ICreateSecretResponseMessage} message CreateSecretResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n CreateSecretResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a CreateSecretResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.CreateSecretResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.CreateSecretResponseMessage} CreateSecretResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n CreateSecretResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.CreateSecretResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.successful = r.bool();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a CreateSecretResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.CreateSecretResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.CreateSecretResponseMessage} CreateSecretResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n CreateSecretResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return CreateSecretResponseMessage;\n })();\n\n agentInterface.DestroySecretRequestMessage = (function() {\n\n /**\n * Properties of a DestroySecretRequestMessage.\n * @memberof agentInterface\n * @interface IDestroySecretRequestMessage\n * @property {string|null} [vaultName] DestroySecretRequestMessage vaultName\n * @property {string|null} [secretName] DestroySecretRequestMessage secretName\n */\n\n /**\n * Constructs a new DestroySecretRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a DestroySecretRequestMessage.\n * @implements IDestroySecretRequestMessage\n * @constructor\n * @param {agentInterface.IDestroySecretRequestMessage=} [p] Properties to set\n */\n function DestroySecretRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * DestroySecretRequestMessage vaultName.\n * @member {string} vaultName\n * @memberof agentInterface.DestroySecretRequestMessage\n * @instance\n */\n DestroySecretRequestMessage.prototype.vaultName = \"\";\n\n /**\n * DestroySecretRequestMessage secretName.\n * @member {string} secretName\n * @memberof agentInterface.DestroySecretRequestMessage\n * @instance\n */\n DestroySecretRequestMessage.prototype.secretName = \"\";\n\n /**\n * Creates a new DestroySecretRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.DestroySecretRequestMessage\n * @static\n * @param {agentInterface.IDestroySecretRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.DestroySecretRequestMessage} DestroySecretRequestMessage instance\n */\n DestroySecretRequestMessage.create = function create(properties) {\n return new DestroySecretRequestMessage(properties);\n };\n\n /**\n * Encodes the specified DestroySecretRequestMessage message. Does not implicitly {@link agentInterface.DestroySecretRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.DestroySecretRequestMessage\n * @static\n * @param {agentInterface.IDestroySecretRequestMessage} m DestroySecretRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n DestroySecretRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.vaultName != null && Object.hasOwnProperty.call(m, \"vaultName\"))\n w.uint32(10).string(m.vaultName);\n if (m.secretName != null && Object.hasOwnProperty.call(m, \"secretName\"))\n w.uint32(18).string(m.secretName);\n return w;\n };\n\n /**\n * Encodes the specified DestroySecretRequestMessage message, length delimited. Does not implicitly {@link agentInterface.DestroySecretRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.DestroySecretRequestMessage\n * @static\n * @param {agentInterface.IDestroySecretRequestMessage} message DestroySecretRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n DestroySecretRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a DestroySecretRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.DestroySecretRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.DestroySecretRequestMessage} DestroySecretRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n DestroySecretRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DestroySecretRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.vaultName = r.string();\n break;\n case 2:\n m.secretName = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a DestroySecretRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.DestroySecretRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.DestroySecretRequestMessage} DestroySecretRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n DestroySecretRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return DestroySecretRequestMessage;\n })();\n\n agentInterface.DestroySecretResponseMessage = (function() {\n\n /**\n * Properties of a DestroySecretResponseMessage.\n * @memberof agentInterface\n * @interface IDestroySecretResponseMessage\n * @property {boolean|null} [successful] DestroySecretResponseMessage successful\n */\n\n /**\n * Constructs a new DestroySecretResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a DestroySecretResponseMessage.\n * @implements IDestroySecretResponseMessage\n * @constructor\n * @param {agentInterface.IDestroySecretResponseMessage=} [p] Properties to set\n */\n function DestroySecretResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * DestroySecretResponseMessage successful.\n * @member {boolean} successful\n * @memberof agentInterface.DestroySecretResponseMessage\n * @instance\n */\n DestroySecretResponseMessage.prototype.successful = false;\n\n /**\n * Creates a new DestroySecretResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.DestroySecretResponseMessage\n * @static\n * @param {agentInterface.IDestroySecretResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.DestroySecretResponseMessage} DestroySecretResponseMessage instance\n */\n DestroySecretResponseMessage.create = function create(properties) {\n return new DestroySecretResponseMessage(properties);\n };\n\n /**\n * Encodes the specified DestroySecretResponseMessage message. Does not implicitly {@link agentInterface.DestroySecretResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.DestroySecretResponseMessage\n * @static\n * @param {agentInterface.IDestroySecretResponseMessage} m DestroySecretResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n DestroySecretResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.successful != null && Object.hasOwnProperty.call(m, \"successful\"))\n w.uint32(8).bool(m.successful);\n return w;\n };\n\n /**\n * Encodes the specified DestroySecretResponseMessage message, length delimited. Does not implicitly {@link agentInterface.DestroySecretResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.DestroySecretResponseMessage\n * @static\n * @param {agentInterface.IDestroySecretResponseMessage} message DestroySecretResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n DestroySecretResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a DestroySecretResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.DestroySecretResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.DestroySecretResponseMessage} DestroySecretResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n DestroySecretResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DestroySecretResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.successful = r.bool();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a DestroySecretResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.DestroySecretResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.DestroySecretResponseMessage} DestroySecretResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n DestroySecretResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return DestroySecretResponseMessage;\n })();\n\n agentInterface.GetSecretRequestMessage = (function() {\n\n /**\n * Properties of a GetSecretRequestMessage.\n * @memberof agentInterface\n * @interface IGetSecretRequestMessage\n * @property {string|null} [vaultName] GetSecretRequestMessage vaultName\n * @property {string|null} [secretName] GetSecretRequestMessage secretName\n */\n\n /**\n * Constructs a new GetSecretRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a GetSecretRequestMessage.\n * @implements IGetSecretRequestMessage\n * @constructor\n * @param {agentInterface.IGetSecretRequestMessage=} [p] Properties to set\n */\n function GetSecretRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * GetSecretRequestMessage vaultName.\n * @member {string} vaultName\n * @memberof agentInterface.GetSecretRequestMessage\n * @instance\n */\n GetSecretRequestMessage.prototype.vaultName = \"\";\n\n /**\n * GetSecretRequestMessage secretName.\n * @member {string} secretName\n * @memberof agentInterface.GetSecretRequestMessage\n * @instance\n */\n GetSecretRequestMessage.prototype.secretName = \"\";\n\n /**\n * Creates a new GetSecretRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.GetSecretRequestMessage\n * @static\n * @param {agentInterface.IGetSecretRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.GetSecretRequestMessage} GetSecretRequestMessage instance\n */\n GetSecretRequestMessage.create = function create(properties) {\n return new GetSecretRequestMessage(properties);\n };\n\n /**\n * Encodes the specified GetSecretRequestMessage message. Does not implicitly {@link agentInterface.GetSecretRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.GetSecretRequestMessage\n * @static\n * @param {agentInterface.IGetSecretRequestMessage} m GetSecretRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n GetSecretRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.vaultName != null && Object.hasOwnProperty.call(m, \"vaultName\"))\n w.uint32(10).string(m.vaultName);\n if (m.secretName != null && Object.hasOwnProperty.call(m, \"secretName\"))\n w.uint32(18).string(m.secretName);\n return w;\n };\n\n /**\n * Encodes the specified GetSecretRequestMessage message, length delimited. Does not implicitly {@link agentInterface.GetSecretRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.GetSecretRequestMessage\n * @static\n * @param {agentInterface.IGetSecretRequestMessage} message GetSecretRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n GetSecretRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a GetSecretRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.GetSecretRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.GetSecretRequestMessage} GetSecretRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n GetSecretRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.GetSecretRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.vaultName = r.string();\n break;\n case 2:\n m.secretName = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a GetSecretRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.GetSecretRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.GetSecretRequestMessage} GetSecretRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n GetSecretRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return GetSecretRequestMessage;\n })();\n\n agentInterface.GetSecretResponseMessage = (function() {\n\n /**\n * Properties of a GetSecretResponseMessage.\n * @memberof agentInterface\n * @interface IGetSecretResponseMessage\n * @property {Uint8Array|null} [secret] GetSecretResponseMessage secret\n */\n\n /**\n * Constructs a new GetSecretResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a GetSecretResponseMessage.\n * @implements IGetSecretResponseMessage\n * @constructor\n * @param {agentInterface.IGetSecretResponseMessage=} [p] Properties to set\n */\n function GetSecretResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * GetSecretResponseMessage secret.\n * @member {Uint8Array} secret\n * @memberof agentInterface.GetSecretResponseMessage\n * @instance\n */\n GetSecretResponseMessage.prototype.secret = $util.newBuffer([]);\n\n /**\n * Creates a new GetSecretResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.GetSecretResponseMessage\n * @static\n * @param {agentInterface.IGetSecretResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.GetSecretResponseMessage} GetSecretResponseMessage instance\n */\n GetSecretResponseMessage.create = function create(properties) {\n return new GetSecretResponseMessage(properties);\n };\n\n /**\n * Encodes the specified GetSecretResponseMessage message. Does not implicitly {@link agentInterface.GetSecretResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.GetSecretResponseMessage\n * @static\n * @param {agentInterface.IGetSecretResponseMessage} m GetSecretResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n GetSecretResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.secret != null && Object.hasOwnProperty.call(m, \"secret\"))\n w.uint32(10).bytes(m.secret);\n return w;\n };\n\n /**\n * Encodes the specified GetSecretResponseMessage message, length delimited. Does not implicitly {@link agentInterface.GetSecretResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.GetSecretResponseMessage\n * @static\n * @param {agentInterface.IGetSecretResponseMessage} message GetSecretResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n GetSecretResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a GetSecretResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.GetSecretResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.GetSecretResponseMessage} GetSecretResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n GetSecretResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.GetSecretResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.secret = r.bytes();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a GetSecretResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.GetSecretResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.GetSecretResponseMessage} GetSecretResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n GetSecretResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return GetSecretResponseMessage;\n })();\n\n agentInterface.DeriveKeyRequestMessage = (function() {\n\n /**\n * Properties of a DeriveKeyRequestMessage.\n * @memberof agentInterface\n * @interface IDeriveKeyRequestMessage\n * @property {string|null} [vaultName] DeriveKeyRequestMessage vaultName\n * @property {string|null} [keyName] DeriveKeyRequestMessage keyName\n * @property {string|null} [passphrase] DeriveKeyRequestMessage passphrase\n */\n\n /**\n * Constructs a new DeriveKeyRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a DeriveKeyRequestMessage.\n * @implements IDeriveKeyRequestMessage\n * @constructor\n * @param {agentInterface.IDeriveKeyRequestMessage=} [p] Properties to set\n */\n function DeriveKeyRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * DeriveKeyRequestMessage vaultName.\n * @member {string} vaultName\n * @memberof agentInterface.DeriveKeyRequestMessage\n * @instance\n */\n DeriveKeyRequestMessage.prototype.vaultName = \"\";\n\n /**\n * DeriveKeyRequestMessage keyName.\n * @member {string} keyName\n * @memberof agentInterface.DeriveKeyRequestMessage\n * @instance\n */\n DeriveKeyRequestMessage.prototype.keyName = \"\";\n\n /**\n * DeriveKeyRequestMessage passphrase.\n * @member {string} passphrase\n * @memberof agentInterface.DeriveKeyRequestMessage\n * @instance\n */\n DeriveKeyRequestMessage.prototype.passphrase = \"\";\n\n /**\n * Creates a new DeriveKeyRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.DeriveKeyRequestMessage\n * @static\n * @param {agentInterface.IDeriveKeyRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.DeriveKeyRequestMessage} DeriveKeyRequestMessage instance\n */\n DeriveKeyRequestMessage.create = function create(properties) {\n return new DeriveKeyRequestMessage(properties);\n };\n\n /**\n * Encodes the specified DeriveKeyRequestMessage message. Does not implicitly {@link agentInterface.DeriveKeyRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.DeriveKeyRequestMessage\n * @static\n * @param {agentInterface.IDeriveKeyRequestMessage} m DeriveKeyRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n DeriveKeyRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.vaultName != null && Object.hasOwnProperty.call(m, \"vaultName\"))\n w.uint32(10).string(m.vaultName);\n if (m.keyName != null && Object.hasOwnProperty.call(m, \"keyName\"))\n w.uint32(18).string(m.keyName);\n if (m.passphrase != null && Object.hasOwnProperty.call(m, \"passphrase\"))\n w.uint32(26).string(m.passphrase);\n return w;\n };\n\n /**\n * Encodes the specified DeriveKeyRequestMessage message, length delimited. Does not implicitly {@link agentInterface.DeriveKeyRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.DeriveKeyRequestMessage\n * @static\n * @param {agentInterface.IDeriveKeyRequestMessage} message DeriveKeyRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n DeriveKeyRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a DeriveKeyRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.DeriveKeyRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.DeriveKeyRequestMessage} DeriveKeyRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n DeriveKeyRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DeriveKeyRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.vaultName = r.string();\n break;\n case 2:\n m.keyName = r.string();\n break;\n case 3:\n m.passphrase = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a DeriveKeyRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.DeriveKeyRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.DeriveKeyRequestMessage} DeriveKeyRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n DeriveKeyRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return DeriveKeyRequestMessage;\n })();\n\n agentInterface.DeriveKeyResponseMessage = (function() {\n\n /**\n * Properties of a DeriveKeyResponseMessage.\n * @memberof agentInterface\n * @interface IDeriveKeyResponseMessage\n * @property {boolean|null} [successful] DeriveKeyResponseMessage successful\n */\n\n /**\n * Constructs a new DeriveKeyResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a DeriveKeyResponseMessage.\n * @implements IDeriveKeyResponseMessage\n * @constructor\n * @param {agentInterface.IDeriveKeyResponseMessage=} [p] Properties to set\n */\n function DeriveKeyResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * DeriveKeyResponseMessage successful.\n * @member {boolean} successful\n * @memberof agentInterface.DeriveKeyResponseMessage\n * @instance\n */\n DeriveKeyResponseMessage.prototype.successful = false;\n\n /**\n * Creates a new DeriveKeyResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.DeriveKeyResponseMessage\n * @static\n * @param {agentInterface.IDeriveKeyResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.DeriveKeyResponseMessage} DeriveKeyResponseMessage instance\n */\n DeriveKeyResponseMessage.create = function create(properties) {\n return new DeriveKeyResponseMessage(properties);\n };\n\n /**\n * Encodes the specified DeriveKeyResponseMessage message. Does not implicitly {@link agentInterface.DeriveKeyResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.DeriveKeyResponseMessage\n * @static\n * @param {agentInterface.IDeriveKeyResponseMessage} m DeriveKeyResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n DeriveKeyResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.successful != null && Object.hasOwnProperty.call(m, \"successful\"))\n w.uint32(8).bool(m.successful);\n return w;\n };\n\n /**\n * Encodes the specified DeriveKeyResponseMessage message, length delimited. Does not implicitly {@link agentInterface.DeriveKeyResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.DeriveKeyResponseMessage\n * @static\n * @param {agentInterface.IDeriveKeyResponseMessage} message DeriveKeyResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n DeriveKeyResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a DeriveKeyResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.DeriveKeyResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.DeriveKeyResponseMessage} DeriveKeyResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n DeriveKeyResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DeriveKeyResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.successful = r.bool();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a DeriveKeyResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.DeriveKeyResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.DeriveKeyResponseMessage} DeriveKeyResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n DeriveKeyResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return DeriveKeyResponseMessage;\n })();\n\n agentInterface.ListKeysRequestMessage = (function() {\n\n /**\n * Properties of a ListKeysRequestMessage.\n * @memberof agentInterface\n * @interface IListKeysRequestMessage\n */\n\n /**\n * Constructs a new ListKeysRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a ListKeysRequestMessage.\n * @implements IListKeysRequestMessage\n * @constructor\n * @param {agentInterface.IListKeysRequestMessage=} [p] Properties to set\n */\n function ListKeysRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * Creates a new ListKeysRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.ListKeysRequestMessage\n * @static\n * @param {agentInterface.IListKeysRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.ListKeysRequestMessage} ListKeysRequestMessage instance\n */\n ListKeysRequestMessage.create = function create(properties) {\n return new ListKeysRequestMessage(properties);\n };\n\n /**\n * Encodes the specified ListKeysRequestMessage message. Does not implicitly {@link agentInterface.ListKeysRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.ListKeysRequestMessage\n * @static\n * @param {agentInterface.IListKeysRequestMessage} m ListKeysRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ListKeysRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n return w;\n };\n\n /**\n * Encodes the specified ListKeysRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ListKeysRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.ListKeysRequestMessage\n * @static\n * @param {agentInterface.IListKeysRequestMessage} message ListKeysRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ListKeysRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ListKeysRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.ListKeysRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.ListKeysRequestMessage} ListKeysRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ListKeysRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListKeysRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a ListKeysRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.ListKeysRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.ListKeysRequestMessage} ListKeysRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ListKeysRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return ListKeysRequestMessage;\n })();\n\n agentInterface.ListKeysResponseMessage = (function() {\n\n /**\n * Properties of a ListKeysResponseMessage.\n * @memberof agentInterface\n * @interface IListKeysResponseMessage\n * @property {Array.|null} [keyNames] ListKeysResponseMessage keyNames\n */\n\n /**\n * Constructs a new ListKeysResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a ListKeysResponseMessage.\n * @implements IListKeysResponseMessage\n * @constructor\n * @param {agentInterface.IListKeysResponseMessage=} [p] Properties to set\n */\n function ListKeysResponseMessage(p) {\n this.keyNames = [];\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * ListKeysResponseMessage keyNames.\n * @member {Array.} keyNames\n * @memberof agentInterface.ListKeysResponseMessage\n * @instance\n */\n ListKeysResponseMessage.prototype.keyNames = $util.emptyArray;\n\n /**\n * Creates a new ListKeysResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.ListKeysResponseMessage\n * @static\n * @param {agentInterface.IListKeysResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.ListKeysResponseMessage} ListKeysResponseMessage instance\n */\n ListKeysResponseMessage.create = function create(properties) {\n return new ListKeysResponseMessage(properties);\n };\n\n /**\n * Encodes the specified ListKeysResponseMessage message. Does not implicitly {@link agentInterface.ListKeysResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.ListKeysResponseMessage\n * @static\n * @param {agentInterface.IListKeysResponseMessage} m ListKeysResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ListKeysResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.keyNames != null && m.keyNames.length) {\n for (var i = 0; i < m.keyNames.length; ++i)\n w.uint32(10).string(m.keyNames[i]);\n }\n return w;\n };\n\n /**\n * Encodes the specified ListKeysResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ListKeysResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.ListKeysResponseMessage\n * @static\n * @param {agentInterface.IListKeysResponseMessage} message ListKeysResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ListKeysResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ListKeysResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.ListKeysResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.ListKeysResponseMessage} ListKeysResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ListKeysResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListKeysResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n if (!(m.keyNames && m.keyNames.length))\n m.keyNames = [];\n m.keyNames.push(r.string());\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a ListKeysResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.ListKeysResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.ListKeysResponseMessage} ListKeysResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ListKeysResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return ListKeysResponseMessage;\n })();\n\n agentInterface.GetKeyRequestMessage = (function() {\n\n /**\n * Properties of a GetKeyRequestMessage.\n * @memberof agentInterface\n * @interface IGetKeyRequestMessage\n * @property {string|null} [keyName] GetKeyRequestMessage keyName\n */\n\n /**\n * Constructs a new GetKeyRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a GetKeyRequestMessage.\n * @implements IGetKeyRequestMessage\n * @constructor\n * @param {agentInterface.IGetKeyRequestMessage=} [p] Properties to set\n */\n function GetKeyRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * GetKeyRequestMessage keyName.\n * @member {string} keyName\n * @memberof agentInterface.GetKeyRequestMessage\n * @instance\n */\n GetKeyRequestMessage.prototype.keyName = \"\";\n\n /**\n * Creates a new GetKeyRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.GetKeyRequestMessage\n * @static\n * @param {agentInterface.IGetKeyRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.GetKeyRequestMessage} GetKeyRequestMessage instance\n */\n GetKeyRequestMessage.create = function create(properties) {\n return new GetKeyRequestMessage(properties);\n };\n\n /**\n * Encodes the specified GetKeyRequestMessage message. Does not implicitly {@link agentInterface.GetKeyRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.GetKeyRequestMessage\n * @static\n * @param {agentInterface.IGetKeyRequestMessage} m GetKeyRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n GetKeyRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.keyName != null && Object.hasOwnProperty.call(m, \"keyName\"))\n w.uint32(10).string(m.keyName);\n return w;\n };\n\n /**\n * Encodes the specified GetKeyRequestMessage message, length delimited. Does not implicitly {@link agentInterface.GetKeyRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.GetKeyRequestMessage\n * @static\n * @param {agentInterface.IGetKeyRequestMessage} message GetKeyRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n GetKeyRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a GetKeyRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.GetKeyRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.GetKeyRequestMessage} GetKeyRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n GetKeyRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.GetKeyRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.keyName = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a GetKeyRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.GetKeyRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.GetKeyRequestMessage} GetKeyRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n GetKeyRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return GetKeyRequestMessage;\n })();\n\n agentInterface.GetKeyResponseMessage = (function() {\n\n /**\n * Properties of a GetKeyResponseMessage.\n * @memberof agentInterface\n * @interface IGetKeyResponseMessage\n * @property {string|null} [keyName] GetKeyResponseMessage keyName\n * @property {string|null} [keyContent] GetKeyResponseMessage keyContent\n */\n\n /**\n * Constructs a new GetKeyResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a GetKeyResponseMessage.\n * @implements IGetKeyResponseMessage\n * @constructor\n * @param {agentInterface.IGetKeyResponseMessage=} [p] Properties to set\n */\n function GetKeyResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * GetKeyResponseMessage keyName.\n * @member {string} keyName\n * @memberof agentInterface.GetKeyResponseMessage\n * @instance\n */\n GetKeyResponseMessage.prototype.keyName = \"\";\n\n /**\n * GetKeyResponseMessage keyContent.\n * @member {string} keyContent\n * @memberof agentInterface.GetKeyResponseMessage\n * @instance\n */\n GetKeyResponseMessage.prototype.keyContent = \"\";\n\n /**\n * Creates a new GetKeyResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.GetKeyResponseMessage\n * @static\n * @param {agentInterface.IGetKeyResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.GetKeyResponseMessage} GetKeyResponseMessage instance\n */\n GetKeyResponseMessage.create = function create(properties) {\n return new GetKeyResponseMessage(properties);\n };\n\n /**\n * Encodes the specified GetKeyResponseMessage message. Does not implicitly {@link agentInterface.GetKeyResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.GetKeyResponseMessage\n * @static\n * @param {agentInterface.IGetKeyResponseMessage} m GetKeyResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n GetKeyResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.keyName != null && Object.hasOwnProperty.call(m, \"keyName\"))\n w.uint32(10).string(m.keyName);\n if (m.keyContent != null && Object.hasOwnProperty.call(m, \"keyContent\"))\n w.uint32(18).string(m.keyContent);\n return w;\n };\n\n /**\n * Encodes the specified GetKeyResponseMessage message, length delimited. Does not implicitly {@link agentInterface.GetKeyResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.GetKeyResponseMessage\n * @static\n * @param {agentInterface.IGetKeyResponseMessage} message GetKeyResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n GetKeyResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a GetKeyResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.GetKeyResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.GetKeyResponseMessage} GetKeyResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n GetKeyResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.GetKeyResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.keyName = r.string();\n break;\n case 2:\n m.keyContent = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a GetKeyResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.GetKeyResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.GetKeyResponseMessage} GetKeyResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n GetKeyResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return GetKeyResponseMessage;\n })();\n\n agentInterface.GetPrimaryKeyPairRequestMessage = (function() {\n\n /**\n * Properties of a GetPrimaryKeyPairRequestMessage.\n * @memberof agentInterface\n * @interface IGetPrimaryKeyPairRequestMessage\n * @property {boolean|null} [includePrivateKey] GetPrimaryKeyPairRequestMessage includePrivateKey\n */\n\n /**\n * Constructs a new GetPrimaryKeyPairRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a GetPrimaryKeyPairRequestMessage.\n * @implements IGetPrimaryKeyPairRequestMessage\n * @constructor\n * @param {agentInterface.IGetPrimaryKeyPairRequestMessage=} [p] Properties to set\n */\n function GetPrimaryKeyPairRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * GetPrimaryKeyPairRequestMessage includePrivateKey.\n * @member {boolean} includePrivateKey\n * @memberof agentInterface.GetPrimaryKeyPairRequestMessage\n * @instance\n */\n GetPrimaryKeyPairRequestMessage.prototype.includePrivateKey = false;\n\n /**\n * Creates a new GetPrimaryKeyPairRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.GetPrimaryKeyPairRequestMessage\n * @static\n * @param {agentInterface.IGetPrimaryKeyPairRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.GetPrimaryKeyPairRequestMessage} GetPrimaryKeyPairRequestMessage instance\n */\n GetPrimaryKeyPairRequestMessage.create = function create(properties) {\n return new GetPrimaryKeyPairRequestMessage(properties);\n };\n\n /**\n * Encodes the specified GetPrimaryKeyPairRequestMessage message. Does not implicitly {@link agentInterface.GetPrimaryKeyPairRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.GetPrimaryKeyPairRequestMessage\n * @static\n * @param {agentInterface.IGetPrimaryKeyPairRequestMessage} m GetPrimaryKeyPairRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n GetPrimaryKeyPairRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.includePrivateKey != null && Object.hasOwnProperty.call(m, \"includePrivateKey\"))\n w.uint32(8).bool(m.includePrivateKey);\n return w;\n };\n\n /**\n * Encodes the specified GetPrimaryKeyPairRequestMessage message, length delimited. Does not implicitly {@link agentInterface.GetPrimaryKeyPairRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.GetPrimaryKeyPairRequestMessage\n * @static\n * @param {agentInterface.IGetPrimaryKeyPairRequestMessage} message GetPrimaryKeyPairRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n GetPrimaryKeyPairRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a GetPrimaryKeyPairRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.GetPrimaryKeyPairRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.GetPrimaryKeyPairRequestMessage} GetPrimaryKeyPairRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n GetPrimaryKeyPairRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.GetPrimaryKeyPairRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.includePrivateKey = r.bool();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a GetPrimaryKeyPairRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.GetPrimaryKeyPairRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.GetPrimaryKeyPairRequestMessage} GetPrimaryKeyPairRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n GetPrimaryKeyPairRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return GetPrimaryKeyPairRequestMessage;\n })();\n\n agentInterface.GetPrimaryKeyPairResponseMessage = (function() {\n\n /**\n * Properties of a GetPrimaryKeyPairResponseMessage.\n * @memberof agentInterface\n * @interface IGetPrimaryKeyPairResponseMessage\n * @property {string|null} [publicKey] GetPrimaryKeyPairResponseMessage publicKey\n * @property {string|null} [privateKey] GetPrimaryKeyPairResponseMessage privateKey\n */\n\n /**\n * Constructs a new GetPrimaryKeyPairResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a GetPrimaryKeyPairResponseMessage.\n * @implements IGetPrimaryKeyPairResponseMessage\n * @constructor\n * @param {agentInterface.IGetPrimaryKeyPairResponseMessage=} [p] Properties to set\n */\n function GetPrimaryKeyPairResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * GetPrimaryKeyPairResponseMessage publicKey.\n * @member {string} publicKey\n * @memberof agentInterface.GetPrimaryKeyPairResponseMessage\n * @instance\n */\n GetPrimaryKeyPairResponseMessage.prototype.publicKey = \"\";\n\n /**\n * GetPrimaryKeyPairResponseMessage privateKey.\n * @member {string} privateKey\n * @memberof agentInterface.GetPrimaryKeyPairResponseMessage\n * @instance\n */\n GetPrimaryKeyPairResponseMessage.prototype.privateKey = \"\";\n\n /**\n * Creates a new GetPrimaryKeyPairResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.GetPrimaryKeyPairResponseMessage\n * @static\n * @param {agentInterface.IGetPrimaryKeyPairResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.GetPrimaryKeyPairResponseMessage} GetPrimaryKeyPairResponseMessage instance\n */\n GetPrimaryKeyPairResponseMessage.create = function create(properties) {\n return new GetPrimaryKeyPairResponseMessage(properties);\n };\n\n /**\n * Encodes the specified GetPrimaryKeyPairResponseMessage message. Does not implicitly {@link agentInterface.GetPrimaryKeyPairResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.GetPrimaryKeyPairResponseMessage\n * @static\n * @param {agentInterface.IGetPrimaryKeyPairResponseMessage} m GetPrimaryKeyPairResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n GetPrimaryKeyPairResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.publicKey != null && Object.hasOwnProperty.call(m, \"publicKey\"))\n w.uint32(10).string(m.publicKey);\n if (m.privateKey != null && Object.hasOwnProperty.call(m, \"privateKey\"))\n w.uint32(18).string(m.privateKey);\n return w;\n };\n\n /**\n * Encodes the specified GetPrimaryKeyPairResponseMessage message, length delimited. Does not implicitly {@link agentInterface.GetPrimaryKeyPairResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.GetPrimaryKeyPairResponseMessage\n * @static\n * @param {agentInterface.IGetPrimaryKeyPairResponseMessage} message GetPrimaryKeyPairResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n GetPrimaryKeyPairResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a GetPrimaryKeyPairResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.GetPrimaryKeyPairResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.GetPrimaryKeyPairResponseMessage} GetPrimaryKeyPairResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n GetPrimaryKeyPairResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.GetPrimaryKeyPairResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.publicKey = r.string();\n break;\n case 2:\n m.privateKey = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a GetPrimaryKeyPairResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.GetPrimaryKeyPairResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.GetPrimaryKeyPairResponseMessage} GetPrimaryKeyPairResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n GetPrimaryKeyPairResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return GetPrimaryKeyPairResponseMessage;\n })();\n\n agentInterface.UpdateSecretRequestMessage = (function() {\n\n /**\n * Properties of an UpdateSecretRequestMessage.\n * @memberof agentInterface\n * @interface IUpdateSecretRequestMessage\n * @property {string|null} [vaultName] UpdateSecretRequestMessage vaultName\n * @property {string|null} [secretName] UpdateSecretRequestMessage secretName\n * @property {string|null} [secretPath] UpdateSecretRequestMessage secretPath\n * @property {Uint8Array|null} [secretContent] UpdateSecretRequestMessage secretContent\n */\n\n /**\n * Constructs a new UpdateSecretRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents an UpdateSecretRequestMessage.\n * @implements IUpdateSecretRequestMessage\n * @constructor\n * @param {agentInterface.IUpdateSecretRequestMessage=} [p] Properties to set\n */\n function UpdateSecretRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * UpdateSecretRequestMessage vaultName.\n * @member {string} vaultName\n * @memberof agentInterface.UpdateSecretRequestMessage\n * @instance\n */\n UpdateSecretRequestMessage.prototype.vaultName = \"\";\n\n /**\n * UpdateSecretRequestMessage secretName.\n * @member {string} secretName\n * @memberof agentInterface.UpdateSecretRequestMessage\n * @instance\n */\n UpdateSecretRequestMessage.prototype.secretName = \"\";\n\n /**\n * UpdateSecretRequestMessage secretPath.\n * @member {string} secretPath\n * @memberof agentInterface.UpdateSecretRequestMessage\n * @instance\n */\n UpdateSecretRequestMessage.prototype.secretPath = \"\";\n\n /**\n * UpdateSecretRequestMessage secretContent.\n * @member {Uint8Array} secretContent\n * @memberof agentInterface.UpdateSecretRequestMessage\n * @instance\n */\n UpdateSecretRequestMessage.prototype.secretContent = $util.newBuffer([]);\n\n /**\n * Creates a new UpdateSecretRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.UpdateSecretRequestMessage\n * @static\n * @param {agentInterface.IUpdateSecretRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.UpdateSecretRequestMessage} UpdateSecretRequestMessage instance\n */\n UpdateSecretRequestMessage.create = function create(properties) {\n return new UpdateSecretRequestMessage(properties);\n };\n\n /**\n * Encodes the specified UpdateSecretRequestMessage message. Does not implicitly {@link agentInterface.UpdateSecretRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.UpdateSecretRequestMessage\n * @static\n * @param {agentInterface.IUpdateSecretRequestMessage} m UpdateSecretRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n UpdateSecretRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.vaultName != null && Object.hasOwnProperty.call(m, \"vaultName\"))\n w.uint32(10).string(m.vaultName);\n if (m.secretName != null && Object.hasOwnProperty.call(m, \"secretName\"))\n w.uint32(18).string(m.secretName);\n if (m.secretPath != null && Object.hasOwnProperty.call(m, \"secretPath\"))\n w.uint32(26).string(m.secretPath);\n if (m.secretContent != null && Object.hasOwnProperty.call(m, \"secretContent\"))\n w.uint32(34).bytes(m.secretContent);\n return w;\n };\n\n /**\n * Encodes the specified UpdateSecretRequestMessage message, length delimited. Does not implicitly {@link agentInterface.UpdateSecretRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.UpdateSecretRequestMessage\n * @static\n * @param {agentInterface.IUpdateSecretRequestMessage} message UpdateSecretRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n UpdateSecretRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an UpdateSecretRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.UpdateSecretRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.UpdateSecretRequestMessage} UpdateSecretRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n UpdateSecretRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.UpdateSecretRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.vaultName = r.string();\n break;\n case 2:\n m.secretName = r.string();\n break;\n case 3:\n m.secretPath = r.string();\n break;\n case 4:\n m.secretContent = r.bytes();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes an UpdateSecretRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.UpdateSecretRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.UpdateSecretRequestMessage} UpdateSecretRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n UpdateSecretRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return UpdateSecretRequestMessage;\n })();\n\n agentInterface.UpdateSecretResponseMessage = (function() {\n\n /**\n * Properties of an UpdateSecretResponseMessage.\n * @memberof agentInterface\n * @interface IUpdateSecretResponseMessage\n * @property {boolean|null} [successful] UpdateSecretResponseMessage successful\n */\n\n /**\n * Constructs a new UpdateSecretResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents an UpdateSecretResponseMessage.\n * @implements IUpdateSecretResponseMessage\n * @constructor\n * @param {agentInterface.IUpdateSecretResponseMessage=} [p] Properties to set\n */\n function UpdateSecretResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * UpdateSecretResponseMessage successful.\n * @member {boolean} successful\n * @memberof agentInterface.UpdateSecretResponseMessage\n * @instance\n */\n UpdateSecretResponseMessage.prototype.successful = false;\n\n /**\n * Creates a new UpdateSecretResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.UpdateSecretResponseMessage\n * @static\n * @param {agentInterface.IUpdateSecretResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.UpdateSecretResponseMessage} UpdateSecretResponseMessage instance\n */\n UpdateSecretResponseMessage.create = function create(properties) {\n return new UpdateSecretResponseMessage(properties);\n };\n\n /**\n * Encodes the specified UpdateSecretResponseMessage message. Does not implicitly {@link agentInterface.UpdateSecretResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.UpdateSecretResponseMessage\n * @static\n * @param {agentInterface.IUpdateSecretResponseMessage} m UpdateSecretResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n UpdateSecretResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.successful != null && Object.hasOwnProperty.call(m, \"successful\"))\n w.uint32(8).bool(m.successful);\n return w;\n };\n\n /**\n * Encodes the specified UpdateSecretResponseMessage message, length delimited. Does not implicitly {@link agentInterface.UpdateSecretResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.UpdateSecretResponseMessage\n * @static\n * @param {agentInterface.IUpdateSecretResponseMessage} message UpdateSecretResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n UpdateSecretResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an UpdateSecretResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.UpdateSecretResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.UpdateSecretResponseMessage} UpdateSecretResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n UpdateSecretResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.UpdateSecretResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.successful = r.bool();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes an UpdateSecretResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.UpdateSecretResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.UpdateSecretResponseMessage} UpdateSecretResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n UpdateSecretResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return UpdateSecretResponseMessage;\n })();\n\n agentInterface.DeleteKeyRequestMessage = (function() {\n\n /**\n * Properties of a DeleteKeyRequestMessage.\n * @memberof agentInterface\n * @interface IDeleteKeyRequestMessage\n * @property {string|null} [keyName] DeleteKeyRequestMessage keyName\n */\n\n /**\n * Constructs a new DeleteKeyRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a DeleteKeyRequestMessage.\n * @implements IDeleteKeyRequestMessage\n * @constructor\n * @param {agentInterface.IDeleteKeyRequestMessage=} [p] Properties to set\n */\n function DeleteKeyRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * DeleteKeyRequestMessage keyName.\n * @member {string} keyName\n * @memberof agentInterface.DeleteKeyRequestMessage\n * @instance\n */\n DeleteKeyRequestMessage.prototype.keyName = \"\";\n\n /**\n * Creates a new DeleteKeyRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.DeleteKeyRequestMessage\n * @static\n * @param {agentInterface.IDeleteKeyRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.DeleteKeyRequestMessage} DeleteKeyRequestMessage instance\n */\n DeleteKeyRequestMessage.create = function create(properties) {\n return new DeleteKeyRequestMessage(properties);\n };\n\n /**\n * Encodes the specified DeleteKeyRequestMessage message. Does not implicitly {@link agentInterface.DeleteKeyRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.DeleteKeyRequestMessage\n * @static\n * @param {agentInterface.IDeleteKeyRequestMessage} m DeleteKeyRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n DeleteKeyRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.keyName != null && Object.hasOwnProperty.call(m, \"keyName\"))\n w.uint32(10).string(m.keyName);\n return w;\n };\n\n /**\n * Encodes the specified DeleteKeyRequestMessage message, length delimited. Does not implicitly {@link agentInterface.DeleteKeyRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.DeleteKeyRequestMessage\n * @static\n * @param {agentInterface.IDeleteKeyRequestMessage} message DeleteKeyRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n DeleteKeyRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a DeleteKeyRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.DeleteKeyRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.DeleteKeyRequestMessage} DeleteKeyRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n DeleteKeyRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DeleteKeyRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.keyName = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a DeleteKeyRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.DeleteKeyRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.DeleteKeyRequestMessage} DeleteKeyRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n DeleteKeyRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return DeleteKeyRequestMessage;\n })();\n\n agentInterface.DeleteKeyResponseMessage = (function() {\n\n /**\n * Properties of a DeleteKeyResponseMessage.\n * @memberof agentInterface\n * @interface IDeleteKeyResponseMessage\n * @property {boolean|null} [successful] DeleteKeyResponseMessage successful\n */\n\n /**\n * Constructs a new DeleteKeyResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a DeleteKeyResponseMessage.\n * @implements IDeleteKeyResponseMessage\n * @constructor\n * @param {agentInterface.IDeleteKeyResponseMessage=} [p] Properties to set\n */\n function DeleteKeyResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * DeleteKeyResponseMessage successful.\n * @member {boolean} successful\n * @memberof agentInterface.DeleteKeyResponseMessage\n * @instance\n */\n DeleteKeyResponseMessage.prototype.successful = false;\n\n /**\n * Creates a new DeleteKeyResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.DeleteKeyResponseMessage\n * @static\n * @param {agentInterface.IDeleteKeyResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.DeleteKeyResponseMessage} DeleteKeyResponseMessage instance\n */\n DeleteKeyResponseMessage.create = function create(properties) {\n return new DeleteKeyResponseMessage(properties);\n };\n\n /**\n * Encodes the specified DeleteKeyResponseMessage message. Does not implicitly {@link agentInterface.DeleteKeyResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.DeleteKeyResponseMessage\n * @static\n * @param {agentInterface.IDeleteKeyResponseMessage} m DeleteKeyResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n DeleteKeyResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.successful != null && Object.hasOwnProperty.call(m, \"successful\"))\n w.uint32(8).bool(m.successful);\n return w;\n };\n\n /**\n * Encodes the specified DeleteKeyResponseMessage message, length delimited. Does not implicitly {@link agentInterface.DeleteKeyResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.DeleteKeyResponseMessage\n * @static\n * @param {agentInterface.IDeleteKeyResponseMessage} message DeleteKeyResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n DeleteKeyResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a DeleteKeyResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.DeleteKeyResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.DeleteKeyResponseMessage} DeleteKeyResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n DeleteKeyResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DeleteKeyResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.successful = r.bool();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a DeleteKeyResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.DeleteKeyResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.DeleteKeyResponseMessage} DeleteKeyResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n DeleteKeyResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return DeleteKeyResponseMessage;\n })();\n\n agentInterface.PeerInfoRequestMessage = (function() {\n\n /**\n * Properties of a PeerInfoRequestMessage.\n * @memberof agentInterface\n * @interface IPeerInfoRequestMessage\n * @property {boolean|null} [current] PeerInfoRequestMessage current\n * @property {string|null} [publicKey] PeerInfoRequestMessage publicKey\n */\n\n /**\n * Constructs a new PeerInfoRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a PeerInfoRequestMessage.\n * @implements IPeerInfoRequestMessage\n * @constructor\n * @param {agentInterface.IPeerInfoRequestMessage=} [p] Properties to set\n */\n function PeerInfoRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * PeerInfoRequestMessage current.\n * @member {boolean} current\n * @memberof agentInterface.PeerInfoRequestMessage\n * @instance\n */\n PeerInfoRequestMessage.prototype.current = false;\n\n /**\n * PeerInfoRequestMessage publicKey.\n * @member {string} publicKey\n * @memberof agentInterface.PeerInfoRequestMessage\n * @instance\n */\n PeerInfoRequestMessage.prototype.publicKey = \"\";\n\n /**\n * Creates a new PeerInfoRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.PeerInfoRequestMessage\n * @static\n * @param {agentInterface.IPeerInfoRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.PeerInfoRequestMessage} PeerInfoRequestMessage instance\n */\n PeerInfoRequestMessage.create = function create(properties) {\n return new PeerInfoRequestMessage(properties);\n };\n\n /**\n * Encodes the specified PeerInfoRequestMessage message. Does not implicitly {@link agentInterface.PeerInfoRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.PeerInfoRequestMessage\n * @static\n * @param {agentInterface.IPeerInfoRequestMessage} m PeerInfoRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PeerInfoRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.current != null && Object.hasOwnProperty.call(m, \"current\"))\n w.uint32(8).bool(m.current);\n if (m.publicKey != null && Object.hasOwnProperty.call(m, \"publicKey\"))\n w.uint32(18).string(m.publicKey);\n return w;\n };\n\n /**\n * Encodes the specified PeerInfoRequestMessage message, length delimited. Does not implicitly {@link agentInterface.PeerInfoRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.PeerInfoRequestMessage\n * @static\n * @param {agentInterface.IPeerInfoRequestMessage} message PeerInfoRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PeerInfoRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PeerInfoRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.PeerInfoRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.PeerInfoRequestMessage} PeerInfoRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PeerInfoRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.PeerInfoRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.current = r.bool();\n break;\n case 2:\n m.publicKey = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a PeerInfoRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.PeerInfoRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.PeerInfoRequestMessage} PeerInfoRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PeerInfoRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return PeerInfoRequestMessage;\n })();\n\n agentInterface.PeerInfoResponseMessage = (function() {\n\n /**\n * Properties of a PeerInfoResponseMessage.\n * @memberof agentInterface\n * @interface IPeerInfoResponseMessage\n * @property {string|null} [publicKey] PeerInfoResponseMessage publicKey\n * @property {string|null} [peerAddress] PeerInfoResponseMessage peerAddress\n * @property {string|null} [relayPublicKey] PeerInfoResponseMessage relayPublicKey\n */\n\n /**\n * Constructs a new PeerInfoResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a PeerInfoResponseMessage.\n * @implements IPeerInfoResponseMessage\n * @constructor\n * @param {agentInterface.IPeerInfoResponseMessage=} [p] Properties to set\n */\n function PeerInfoResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * PeerInfoResponseMessage publicKey.\n * @member {string} publicKey\n * @memberof agentInterface.PeerInfoResponseMessage\n * @instance\n */\n PeerInfoResponseMessage.prototype.publicKey = \"\";\n\n /**\n * PeerInfoResponseMessage peerAddress.\n * @member {string} peerAddress\n * @memberof agentInterface.PeerInfoResponseMessage\n * @instance\n */\n PeerInfoResponseMessage.prototype.peerAddress = \"\";\n\n /**\n * PeerInfoResponseMessage relayPublicKey.\n * @member {string} relayPublicKey\n * @memberof agentInterface.PeerInfoResponseMessage\n * @instance\n */\n PeerInfoResponseMessage.prototype.relayPublicKey = \"\";\n\n /**\n * Creates a new PeerInfoResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.PeerInfoResponseMessage\n * @static\n * @param {agentInterface.IPeerInfoResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.PeerInfoResponseMessage} PeerInfoResponseMessage instance\n */\n PeerInfoResponseMessage.create = function create(properties) {\n return new PeerInfoResponseMessage(properties);\n };\n\n /**\n * Encodes the specified PeerInfoResponseMessage message. Does not implicitly {@link agentInterface.PeerInfoResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.PeerInfoResponseMessage\n * @static\n * @param {agentInterface.IPeerInfoResponseMessage} m PeerInfoResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PeerInfoResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.publicKey != null && Object.hasOwnProperty.call(m, \"publicKey\"))\n w.uint32(10).string(m.publicKey);\n if (m.peerAddress != null && Object.hasOwnProperty.call(m, \"peerAddress\"))\n w.uint32(18).string(m.peerAddress);\n if (m.relayPublicKey != null && Object.hasOwnProperty.call(m, \"relayPublicKey\"))\n w.uint32(26).string(m.relayPublicKey);\n return w;\n };\n\n /**\n * Encodes the specified PeerInfoResponseMessage message, length delimited. Does not implicitly {@link agentInterface.PeerInfoResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.PeerInfoResponseMessage\n * @static\n * @param {agentInterface.IPeerInfoResponseMessage} message PeerInfoResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PeerInfoResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PeerInfoResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.PeerInfoResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.PeerInfoResponseMessage} PeerInfoResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PeerInfoResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.PeerInfoResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.publicKey = r.string();\n break;\n case 2:\n m.peerAddress = r.string();\n break;\n case 3:\n m.relayPublicKey = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a PeerInfoResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.PeerInfoResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.PeerInfoResponseMessage} PeerInfoResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PeerInfoResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return PeerInfoResponseMessage;\n })();\n\n agentInterface.AddPeerRequestMessage = (function() {\n\n /**\n * Properties of an AddPeerRequestMessage.\n * @memberof agentInterface\n * @interface IAddPeerRequestMessage\n * @property {string|null} [publicKey] AddPeerRequestMessage publicKey\n * @property {string|null} [peerAddress] AddPeerRequestMessage peerAddress\n * @property {string|null} [relayPublicKey] AddPeerRequestMessage relayPublicKey\n */\n\n /**\n * Constructs a new AddPeerRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents an AddPeerRequestMessage.\n * @implements IAddPeerRequestMessage\n * @constructor\n * @param {agentInterface.IAddPeerRequestMessage=} [p] Properties to set\n */\n function AddPeerRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * AddPeerRequestMessage publicKey.\n * @member {string} publicKey\n * @memberof agentInterface.AddPeerRequestMessage\n * @instance\n */\n AddPeerRequestMessage.prototype.publicKey = \"\";\n\n /**\n * AddPeerRequestMessage peerAddress.\n * @member {string} peerAddress\n * @memberof agentInterface.AddPeerRequestMessage\n * @instance\n */\n AddPeerRequestMessage.prototype.peerAddress = \"\";\n\n /**\n * AddPeerRequestMessage relayPublicKey.\n * @member {string} relayPublicKey\n * @memberof agentInterface.AddPeerRequestMessage\n * @instance\n */\n AddPeerRequestMessage.prototype.relayPublicKey = \"\";\n\n /**\n * Creates a new AddPeerRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.AddPeerRequestMessage\n * @static\n * @param {agentInterface.IAddPeerRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.AddPeerRequestMessage} AddPeerRequestMessage instance\n */\n AddPeerRequestMessage.create = function create(properties) {\n return new AddPeerRequestMessage(properties);\n };\n\n /**\n * Encodes the specified AddPeerRequestMessage message. Does not implicitly {@link agentInterface.AddPeerRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.AddPeerRequestMessage\n * @static\n * @param {agentInterface.IAddPeerRequestMessage} m AddPeerRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n AddPeerRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.publicKey != null && Object.hasOwnProperty.call(m, \"publicKey\"))\n w.uint32(10).string(m.publicKey);\n if (m.peerAddress != null && Object.hasOwnProperty.call(m, \"peerAddress\"))\n w.uint32(18).string(m.peerAddress);\n if (m.relayPublicKey != null && Object.hasOwnProperty.call(m, \"relayPublicKey\"))\n w.uint32(26).string(m.relayPublicKey);\n return w;\n };\n\n /**\n * Encodes the specified AddPeerRequestMessage message, length delimited. Does not implicitly {@link agentInterface.AddPeerRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.AddPeerRequestMessage\n * @static\n * @param {agentInterface.IAddPeerRequestMessage} message AddPeerRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n AddPeerRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an AddPeerRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.AddPeerRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.AddPeerRequestMessage} AddPeerRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n AddPeerRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.AddPeerRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.publicKey = r.string();\n break;\n case 2:\n m.peerAddress = r.string();\n break;\n case 3:\n m.relayPublicKey = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes an AddPeerRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.AddPeerRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.AddPeerRequestMessage} AddPeerRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n AddPeerRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return AddPeerRequestMessage;\n })();\n\n agentInterface.AddPeerResponseMessage = (function() {\n\n /**\n * Properties of an AddPeerResponseMessage.\n * @memberof agentInterface\n * @interface IAddPeerResponseMessage\n * @property {boolean|null} [successful] AddPeerResponseMessage successful\n */\n\n /**\n * Constructs a new AddPeerResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents an AddPeerResponseMessage.\n * @implements IAddPeerResponseMessage\n * @constructor\n * @param {agentInterface.IAddPeerResponseMessage=} [p] Properties to set\n */\n function AddPeerResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * AddPeerResponseMessage successful.\n * @member {boolean} successful\n * @memberof agentInterface.AddPeerResponseMessage\n * @instance\n */\n AddPeerResponseMessage.prototype.successful = false;\n\n /**\n * Creates a new AddPeerResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.AddPeerResponseMessage\n * @static\n * @param {agentInterface.IAddPeerResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.AddPeerResponseMessage} AddPeerResponseMessage instance\n */\n AddPeerResponseMessage.create = function create(properties) {\n return new AddPeerResponseMessage(properties);\n };\n\n /**\n * Encodes the specified AddPeerResponseMessage message. Does not implicitly {@link agentInterface.AddPeerResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.AddPeerResponseMessage\n * @static\n * @param {agentInterface.IAddPeerResponseMessage} m AddPeerResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n AddPeerResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.successful != null && Object.hasOwnProperty.call(m, \"successful\"))\n w.uint32(8).bool(m.successful);\n return w;\n };\n\n /**\n * Encodes the specified AddPeerResponseMessage message, length delimited. Does not implicitly {@link agentInterface.AddPeerResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.AddPeerResponseMessage\n * @static\n * @param {agentInterface.IAddPeerResponseMessage} message AddPeerResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n AddPeerResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an AddPeerResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.AddPeerResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.AddPeerResponseMessage} AddPeerResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n AddPeerResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.AddPeerResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.successful = r.bool();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes an AddPeerResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.AddPeerResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.AddPeerResponseMessage} AddPeerResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n AddPeerResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return AddPeerResponseMessage;\n })();\n\n agentInterface.PingPeerRequestMessage = (function() {\n\n /**\n * Properties of a PingPeerRequestMessage.\n * @memberof agentInterface\n * @interface IPingPeerRequestMessage\n * @property {string|null} [publicKey] PingPeerRequestMessage publicKey\n * @property {number|null} [timeout] PingPeerRequestMessage timeout\n */\n\n /**\n * Constructs a new PingPeerRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a PingPeerRequestMessage.\n * @implements IPingPeerRequestMessage\n * @constructor\n * @param {agentInterface.IPingPeerRequestMessage=} [p] Properties to set\n */\n function PingPeerRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * PingPeerRequestMessage publicKey.\n * @member {string} publicKey\n * @memberof agentInterface.PingPeerRequestMessage\n * @instance\n */\n PingPeerRequestMessage.prototype.publicKey = \"\";\n\n /**\n * PingPeerRequestMessage timeout.\n * @member {number} timeout\n * @memberof agentInterface.PingPeerRequestMessage\n * @instance\n */\n PingPeerRequestMessage.prototype.timeout = 0;\n\n /**\n * Creates a new PingPeerRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.PingPeerRequestMessage\n * @static\n * @param {agentInterface.IPingPeerRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.PingPeerRequestMessage} PingPeerRequestMessage instance\n */\n PingPeerRequestMessage.create = function create(properties) {\n return new PingPeerRequestMessage(properties);\n };\n\n /**\n * Encodes the specified PingPeerRequestMessage message. Does not implicitly {@link agentInterface.PingPeerRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.PingPeerRequestMessage\n * @static\n * @param {agentInterface.IPingPeerRequestMessage} m PingPeerRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PingPeerRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.publicKey != null && Object.hasOwnProperty.call(m, \"publicKey\"))\n w.uint32(10).string(m.publicKey);\n if (m.timeout != null && Object.hasOwnProperty.call(m, \"timeout\"))\n w.uint32(16).int32(m.timeout);\n return w;\n };\n\n /**\n * Encodes the specified PingPeerRequestMessage message, length delimited. Does not implicitly {@link agentInterface.PingPeerRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.PingPeerRequestMessage\n * @static\n * @param {agentInterface.IPingPeerRequestMessage} message PingPeerRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PingPeerRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PingPeerRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.PingPeerRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.PingPeerRequestMessage} PingPeerRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PingPeerRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.PingPeerRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.publicKey = r.string();\n break;\n case 2:\n m.timeout = r.int32();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a PingPeerRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.PingPeerRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.PingPeerRequestMessage} PingPeerRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PingPeerRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return PingPeerRequestMessage;\n })();\n\n agentInterface.PingPeerResponseMessage = (function() {\n\n /**\n * Properties of a PingPeerResponseMessage.\n * @memberof agentInterface\n * @interface IPingPeerResponseMessage\n * @property {boolean|null} [successful] PingPeerResponseMessage successful\n */\n\n /**\n * Constructs a new PingPeerResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a PingPeerResponseMessage.\n * @implements IPingPeerResponseMessage\n * @constructor\n * @param {agentInterface.IPingPeerResponseMessage=} [p] Properties to set\n */\n function PingPeerResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * PingPeerResponseMessage successful.\n * @member {boolean} successful\n * @memberof agentInterface.PingPeerResponseMessage\n * @instance\n */\n PingPeerResponseMessage.prototype.successful = false;\n\n /**\n * Creates a new PingPeerResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.PingPeerResponseMessage\n * @static\n * @param {agentInterface.IPingPeerResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.PingPeerResponseMessage} PingPeerResponseMessage instance\n */\n PingPeerResponseMessage.create = function create(properties) {\n return new PingPeerResponseMessage(properties);\n };\n\n /**\n * Encodes the specified PingPeerResponseMessage message. Does not implicitly {@link agentInterface.PingPeerResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.PingPeerResponseMessage\n * @static\n * @param {agentInterface.IPingPeerResponseMessage} m PingPeerResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PingPeerResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.successful != null && Object.hasOwnProperty.call(m, \"successful\"))\n w.uint32(8).bool(m.successful);\n return w;\n };\n\n /**\n * Encodes the specified PingPeerResponseMessage message, length delimited. Does not implicitly {@link agentInterface.PingPeerResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.PingPeerResponseMessage\n * @static\n * @param {agentInterface.IPingPeerResponseMessage} message PingPeerResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n PingPeerResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a PingPeerResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.PingPeerResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.PingPeerResponseMessage} PingPeerResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PingPeerResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.PingPeerResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.successful = r.bool();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a PingPeerResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.PingPeerResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.PingPeerResponseMessage} PingPeerResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n PingPeerResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return PingPeerResponseMessage;\n })();\n\n agentInterface.FindPeerRequestMessage = (function() {\n\n /**\n * Properties of a FindPeerRequestMessage.\n * @memberof agentInterface\n * @interface IFindPeerRequestMessage\n * @property {string|null} [publicKey] FindPeerRequestMessage publicKey\n * @property {number|null} [timeout] FindPeerRequestMessage timeout\n */\n\n /**\n * Constructs a new FindPeerRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a FindPeerRequestMessage.\n * @implements IFindPeerRequestMessage\n * @constructor\n * @param {agentInterface.IFindPeerRequestMessage=} [p] Properties to set\n */\n function FindPeerRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * FindPeerRequestMessage publicKey.\n * @member {string} publicKey\n * @memberof agentInterface.FindPeerRequestMessage\n * @instance\n */\n FindPeerRequestMessage.prototype.publicKey = \"\";\n\n /**\n * FindPeerRequestMessage timeout.\n * @member {number} timeout\n * @memberof agentInterface.FindPeerRequestMessage\n * @instance\n */\n FindPeerRequestMessage.prototype.timeout = 0;\n\n /**\n * Creates a new FindPeerRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.FindPeerRequestMessage\n * @static\n * @param {agentInterface.IFindPeerRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.FindPeerRequestMessage} FindPeerRequestMessage instance\n */\n FindPeerRequestMessage.create = function create(properties) {\n return new FindPeerRequestMessage(properties);\n };\n\n /**\n * Encodes the specified FindPeerRequestMessage message. Does not implicitly {@link agentInterface.FindPeerRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.FindPeerRequestMessage\n * @static\n * @param {agentInterface.IFindPeerRequestMessage} m FindPeerRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n FindPeerRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.publicKey != null && Object.hasOwnProperty.call(m, \"publicKey\"))\n w.uint32(10).string(m.publicKey);\n if (m.timeout != null && Object.hasOwnProperty.call(m, \"timeout\"))\n w.uint32(16).int32(m.timeout);\n return w;\n };\n\n /**\n * Encodes the specified FindPeerRequestMessage message, length delimited. Does not implicitly {@link agentInterface.FindPeerRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.FindPeerRequestMessage\n * @static\n * @param {agentInterface.IFindPeerRequestMessage} message FindPeerRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n FindPeerRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a FindPeerRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.FindPeerRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.FindPeerRequestMessage} FindPeerRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n FindPeerRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.FindPeerRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.publicKey = r.string();\n break;\n case 2:\n m.timeout = r.int32();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a FindPeerRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.FindPeerRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.FindPeerRequestMessage} FindPeerRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n FindPeerRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return FindPeerRequestMessage;\n })();\n\n agentInterface.FindPeerResponseMessage = (function() {\n\n /**\n * Properties of a FindPeerResponseMessage.\n * @memberof agentInterface\n * @interface IFindPeerResponseMessage\n * @property {boolean|null} [successful] FindPeerResponseMessage successful\n */\n\n /**\n * Constructs a new FindPeerResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a FindPeerResponseMessage.\n * @implements IFindPeerResponseMessage\n * @constructor\n * @param {agentInterface.IFindPeerResponseMessage=} [p] Properties to set\n */\n function FindPeerResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * FindPeerResponseMessage successful.\n * @member {boolean} successful\n * @memberof agentInterface.FindPeerResponseMessage\n * @instance\n */\n FindPeerResponseMessage.prototype.successful = false;\n\n /**\n * Creates a new FindPeerResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.FindPeerResponseMessage\n * @static\n * @param {agentInterface.IFindPeerResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.FindPeerResponseMessage} FindPeerResponseMessage instance\n */\n FindPeerResponseMessage.create = function create(properties) {\n return new FindPeerResponseMessage(properties);\n };\n\n /**\n * Encodes the specified FindPeerResponseMessage message. Does not implicitly {@link agentInterface.FindPeerResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.FindPeerResponseMessage\n * @static\n * @param {agentInterface.IFindPeerResponseMessage} m FindPeerResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n FindPeerResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.successful != null && Object.hasOwnProperty.call(m, \"successful\"))\n w.uint32(8).bool(m.successful);\n return w;\n };\n\n /**\n * Encodes the specified FindPeerResponseMessage message, length delimited. Does not implicitly {@link agentInterface.FindPeerResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.FindPeerResponseMessage\n * @static\n * @param {agentInterface.IFindPeerResponseMessage} message FindPeerResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n FindPeerResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a FindPeerResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.FindPeerResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.FindPeerResponseMessage} FindPeerResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n FindPeerResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.FindPeerResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.successful = r.bool();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a FindPeerResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.FindPeerResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.FindPeerResponseMessage} FindPeerResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n FindPeerResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return FindPeerResponseMessage;\n })();\n\n agentInterface.FindSocialPeerRequestMessage = (function() {\n\n /**\n * Properties of a FindSocialPeerRequestMessage.\n * @memberof agentInterface\n * @interface IFindSocialPeerRequestMessage\n * @property {string|null} [handle] FindSocialPeerRequestMessage handle\n * @property {string|null} [service] FindSocialPeerRequestMessage service\n * @property {number|null} [timeout] FindSocialPeerRequestMessage timeout\n */\n\n /**\n * Constructs a new FindSocialPeerRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a FindSocialPeerRequestMessage.\n * @implements IFindSocialPeerRequestMessage\n * @constructor\n * @param {agentInterface.IFindSocialPeerRequestMessage=} [p] Properties to set\n */\n function FindSocialPeerRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * FindSocialPeerRequestMessage handle.\n * @member {string} handle\n * @memberof agentInterface.FindSocialPeerRequestMessage\n * @instance\n */\n FindSocialPeerRequestMessage.prototype.handle = \"\";\n\n /**\n * FindSocialPeerRequestMessage service.\n * @member {string} service\n * @memberof agentInterface.FindSocialPeerRequestMessage\n * @instance\n */\n FindSocialPeerRequestMessage.prototype.service = \"\";\n\n /**\n * FindSocialPeerRequestMessage timeout.\n * @member {number} timeout\n * @memberof agentInterface.FindSocialPeerRequestMessage\n * @instance\n */\n FindSocialPeerRequestMessage.prototype.timeout = 0;\n\n /**\n * Creates a new FindSocialPeerRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.FindSocialPeerRequestMessage\n * @static\n * @param {agentInterface.IFindSocialPeerRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.FindSocialPeerRequestMessage} FindSocialPeerRequestMessage instance\n */\n FindSocialPeerRequestMessage.create = function create(properties) {\n return new FindSocialPeerRequestMessage(properties);\n };\n\n /**\n * Encodes the specified FindSocialPeerRequestMessage message. Does not implicitly {@link agentInterface.FindSocialPeerRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.FindSocialPeerRequestMessage\n * @static\n * @param {agentInterface.IFindSocialPeerRequestMessage} m FindSocialPeerRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n FindSocialPeerRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.handle != null && Object.hasOwnProperty.call(m, \"handle\"))\n w.uint32(10).string(m.handle);\n if (m.service != null && Object.hasOwnProperty.call(m, \"service\"))\n w.uint32(18).string(m.service);\n if (m.timeout != null && Object.hasOwnProperty.call(m, \"timeout\"))\n w.uint32(24).int32(m.timeout);\n return w;\n };\n\n /**\n * Encodes the specified FindSocialPeerRequestMessage message, length delimited. Does not implicitly {@link agentInterface.FindSocialPeerRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.FindSocialPeerRequestMessage\n * @static\n * @param {agentInterface.IFindSocialPeerRequestMessage} message FindSocialPeerRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n FindSocialPeerRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a FindSocialPeerRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.FindSocialPeerRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.FindSocialPeerRequestMessage} FindSocialPeerRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n FindSocialPeerRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.FindSocialPeerRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.handle = r.string();\n break;\n case 2:\n m.service = r.string();\n break;\n case 3:\n m.timeout = r.int32();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a FindSocialPeerRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.FindSocialPeerRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.FindSocialPeerRequestMessage} FindSocialPeerRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n FindSocialPeerRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return FindSocialPeerRequestMessage;\n })();\n\n agentInterface.FindSocialPeerResponseMessage = (function() {\n\n /**\n * Properties of a FindSocialPeerResponseMessage.\n * @memberof agentInterface\n * @interface IFindSocialPeerResponseMessage\n * @property {boolean|null} [successful] FindSocialPeerResponseMessage successful\n */\n\n /**\n * Constructs a new FindSocialPeerResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a FindSocialPeerResponseMessage.\n * @implements IFindSocialPeerResponseMessage\n * @constructor\n * @param {agentInterface.IFindSocialPeerResponseMessage=} [p] Properties to set\n */\n function FindSocialPeerResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * FindSocialPeerResponseMessage successful.\n * @member {boolean} successful\n * @memberof agentInterface.FindSocialPeerResponseMessage\n * @instance\n */\n FindSocialPeerResponseMessage.prototype.successful = false;\n\n /**\n * Creates a new FindSocialPeerResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.FindSocialPeerResponseMessage\n * @static\n * @param {agentInterface.IFindSocialPeerResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.FindSocialPeerResponseMessage} FindSocialPeerResponseMessage instance\n */\n FindSocialPeerResponseMessage.create = function create(properties) {\n return new FindSocialPeerResponseMessage(properties);\n };\n\n /**\n * Encodes the specified FindSocialPeerResponseMessage message. Does not implicitly {@link agentInterface.FindSocialPeerResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.FindSocialPeerResponseMessage\n * @static\n * @param {agentInterface.IFindSocialPeerResponseMessage} m FindSocialPeerResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n FindSocialPeerResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.successful != null && Object.hasOwnProperty.call(m, \"successful\"))\n w.uint32(8).bool(m.successful);\n return w;\n };\n\n /**\n * Encodes the specified FindSocialPeerResponseMessage message, length delimited. Does not implicitly {@link agentInterface.FindSocialPeerResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.FindSocialPeerResponseMessage\n * @static\n * @param {agentInterface.IFindSocialPeerResponseMessage} message FindSocialPeerResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n FindSocialPeerResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a FindSocialPeerResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.FindSocialPeerResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.FindSocialPeerResponseMessage} FindSocialPeerResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n FindSocialPeerResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.FindSocialPeerResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.successful = r.bool();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a FindSocialPeerResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.FindSocialPeerResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.FindSocialPeerResponseMessage} FindSocialPeerResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n FindSocialPeerResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return FindSocialPeerResponseMessage;\n })();\n\n agentInterface.ListPeersRequestMessage = (function() {\n\n /**\n * Properties of a ListPeersRequestMessage.\n * @memberof agentInterface\n * @interface IListPeersRequestMessage\n */\n\n /**\n * Constructs a new ListPeersRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a ListPeersRequestMessage.\n * @implements IListPeersRequestMessage\n * @constructor\n * @param {agentInterface.IListPeersRequestMessage=} [p] Properties to set\n */\n function ListPeersRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * Creates a new ListPeersRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.ListPeersRequestMessage\n * @static\n * @param {agentInterface.IListPeersRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.ListPeersRequestMessage} ListPeersRequestMessage instance\n */\n ListPeersRequestMessage.create = function create(properties) {\n return new ListPeersRequestMessage(properties);\n };\n\n /**\n * Encodes the specified ListPeersRequestMessage message. Does not implicitly {@link agentInterface.ListPeersRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.ListPeersRequestMessage\n * @static\n * @param {agentInterface.IListPeersRequestMessage} m ListPeersRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ListPeersRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n return w;\n };\n\n /**\n * Encodes the specified ListPeersRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ListPeersRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.ListPeersRequestMessage\n * @static\n * @param {agentInterface.IListPeersRequestMessage} message ListPeersRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ListPeersRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ListPeersRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.ListPeersRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.ListPeersRequestMessage} ListPeersRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ListPeersRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListPeersRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a ListPeersRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.ListPeersRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.ListPeersRequestMessage} ListPeersRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ListPeersRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return ListPeersRequestMessage;\n })();\n\n agentInterface.ListPeersResponseMessage = (function() {\n\n /**\n * Properties of a ListPeersResponseMessage.\n * @memberof agentInterface\n * @interface IListPeersResponseMessage\n * @property {Array.|null} [publicKeys] ListPeersResponseMessage publicKeys\n */\n\n /**\n * Constructs a new ListPeersResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a ListPeersResponseMessage.\n * @implements IListPeersResponseMessage\n * @constructor\n * @param {agentInterface.IListPeersResponseMessage=} [p] Properties to set\n */\n function ListPeersResponseMessage(p) {\n this.publicKeys = [];\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * ListPeersResponseMessage publicKeys.\n * @member {Array.} publicKeys\n * @memberof agentInterface.ListPeersResponseMessage\n * @instance\n */\n ListPeersResponseMessage.prototype.publicKeys = $util.emptyArray;\n\n /**\n * Creates a new ListPeersResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.ListPeersResponseMessage\n * @static\n * @param {agentInterface.IListPeersResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.ListPeersResponseMessage} ListPeersResponseMessage instance\n */\n ListPeersResponseMessage.create = function create(properties) {\n return new ListPeersResponseMessage(properties);\n };\n\n /**\n * Encodes the specified ListPeersResponseMessage message. Does not implicitly {@link agentInterface.ListPeersResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.ListPeersResponseMessage\n * @static\n * @param {agentInterface.IListPeersResponseMessage} m ListPeersResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ListPeersResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.publicKeys != null && m.publicKeys.length) {\n for (var i = 0; i < m.publicKeys.length; ++i)\n w.uint32(10).string(m.publicKeys[i]);\n }\n return w;\n };\n\n /**\n * Encodes the specified ListPeersResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ListPeersResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.ListPeersResponseMessage\n * @static\n * @param {agentInterface.IListPeersResponseMessage} message ListPeersResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ListPeersResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ListPeersResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.ListPeersResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.ListPeersResponseMessage} ListPeersResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ListPeersResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListPeersResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n if (!(m.publicKeys && m.publicKeys.length))\n m.publicKeys = [];\n m.publicKeys.push(r.string());\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a ListPeersResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.ListPeersResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.ListPeersResponseMessage} ListPeersResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ListPeersResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return ListPeersResponseMessage;\n })();\n\n agentInterface.ToggleStealthRequestMessage = (function() {\n\n /**\n * Properties of a ToggleStealthRequestMessage.\n * @memberof agentInterface\n * @interface IToggleStealthRequestMessage\n * @property {boolean|null} [active] ToggleStealthRequestMessage active\n */\n\n /**\n * Constructs a new ToggleStealthRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a ToggleStealthRequestMessage.\n * @implements IToggleStealthRequestMessage\n * @constructor\n * @param {agentInterface.IToggleStealthRequestMessage=} [p] Properties to set\n */\n function ToggleStealthRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * ToggleStealthRequestMessage active.\n * @member {boolean} active\n * @memberof agentInterface.ToggleStealthRequestMessage\n * @instance\n */\n ToggleStealthRequestMessage.prototype.active = false;\n\n /**\n * Creates a new ToggleStealthRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.ToggleStealthRequestMessage\n * @static\n * @param {agentInterface.IToggleStealthRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.ToggleStealthRequestMessage} ToggleStealthRequestMessage instance\n */\n ToggleStealthRequestMessage.create = function create(properties) {\n return new ToggleStealthRequestMessage(properties);\n };\n\n /**\n * Encodes the specified ToggleStealthRequestMessage message. Does not implicitly {@link agentInterface.ToggleStealthRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.ToggleStealthRequestMessage\n * @static\n * @param {agentInterface.IToggleStealthRequestMessage} m ToggleStealthRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ToggleStealthRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.active != null && Object.hasOwnProperty.call(m, \"active\"))\n w.uint32(8).bool(m.active);\n return w;\n };\n\n /**\n * Encodes the specified ToggleStealthRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ToggleStealthRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.ToggleStealthRequestMessage\n * @static\n * @param {agentInterface.IToggleStealthRequestMessage} message ToggleStealthRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ToggleStealthRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ToggleStealthRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.ToggleStealthRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.ToggleStealthRequestMessage} ToggleStealthRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ToggleStealthRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ToggleStealthRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.active = r.bool();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a ToggleStealthRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.ToggleStealthRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.ToggleStealthRequestMessage} ToggleStealthRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ToggleStealthRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return ToggleStealthRequestMessage;\n })();\n\n agentInterface.ToggleStealthResponseMessage = (function() {\n\n /**\n * Properties of a ToggleStealthResponseMessage.\n * @memberof agentInterface\n * @interface IToggleStealthResponseMessage\n * @property {boolean|null} [successful] ToggleStealthResponseMessage successful\n */\n\n /**\n * Constructs a new ToggleStealthResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a ToggleStealthResponseMessage.\n * @implements IToggleStealthResponseMessage\n * @constructor\n * @param {agentInterface.IToggleStealthResponseMessage=} [p] Properties to set\n */\n function ToggleStealthResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * ToggleStealthResponseMessage successful.\n * @member {boolean} successful\n * @memberof agentInterface.ToggleStealthResponseMessage\n * @instance\n */\n ToggleStealthResponseMessage.prototype.successful = false;\n\n /**\n * Creates a new ToggleStealthResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.ToggleStealthResponseMessage\n * @static\n * @param {agentInterface.IToggleStealthResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.ToggleStealthResponseMessage} ToggleStealthResponseMessage instance\n */\n ToggleStealthResponseMessage.create = function create(properties) {\n return new ToggleStealthResponseMessage(properties);\n };\n\n /**\n * Encodes the specified ToggleStealthResponseMessage message. Does not implicitly {@link agentInterface.ToggleStealthResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.ToggleStealthResponseMessage\n * @static\n * @param {agentInterface.IToggleStealthResponseMessage} m ToggleStealthResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ToggleStealthResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.successful != null && Object.hasOwnProperty.call(m, \"successful\"))\n w.uint32(8).bool(m.successful);\n return w;\n };\n\n /**\n * Encodes the specified ToggleStealthResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ToggleStealthResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.ToggleStealthResponseMessage\n * @static\n * @param {agentInterface.IToggleStealthResponseMessage} message ToggleStealthResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ToggleStealthResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a ToggleStealthResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.ToggleStealthResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.ToggleStealthResponseMessage} ToggleStealthResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ToggleStealthResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ToggleStealthResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.successful = r.bool();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a ToggleStealthResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.ToggleStealthResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.ToggleStealthResponseMessage} ToggleStealthResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ToggleStealthResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return ToggleStealthResponseMessage;\n })();\n\n agentInterface.UpdatePeerInfoRequestMessage = (function() {\n\n /**\n * Properties of an UpdatePeerInfoRequestMessage.\n * @memberof agentInterface\n * @interface IUpdatePeerInfoRequestMessage\n * @property {string|null} [publicKey] UpdatePeerInfoRequestMessage publicKey\n * @property {boolean|null} [currentNode] UpdatePeerInfoRequestMessage currentNode\n * @property {string|null} [peerHost] UpdatePeerInfoRequestMessage peerHost\n * @property {number|null} [peerPort] UpdatePeerInfoRequestMessage peerPort\n * @property {string|null} [relayPublicKey] UpdatePeerInfoRequestMessage relayPublicKey\n */\n\n /**\n * Constructs a new UpdatePeerInfoRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents an UpdatePeerInfoRequestMessage.\n * @implements IUpdatePeerInfoRequestMessage\n * @constructor\n * @param {agentInterface.IUpdatePeerInfoRequestMessage=} [p] Properties to set\n */\n function UpdatePeerInfoRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * UpdatePeerInfoRequestMessage publicKey.\n * @member {string} publicKey\n * @memberof agentInterface.UpdatePeerInfoRequestMessage\n * @instance\n */\n UpdatePeerInfoRequestMessage.prototype.publicKey = \"\";\n\n /**\n * UpdatePeerInfoRequestMessage currentNode.\n * @member {boolean} currentNode\n * @memberof agentInterface.UpdatePeerInfoRequestMessage\n * @instance\n */\n UpdatePeerInfoRequestMessage.prototype.currentNode = false;\n\n /**\n * UpdatePeerInfoRequestMessage peerHost.\n * @member {string} peerHost\n * @memberof agentInterface.UpdatePeerInfoRequestMessage\n * @instance\n */\n UpdatePeerInfoRequestMessage.prototype.peerHost = \"\";\n\n /**\n * UpdatePeerInfoRequestMessage peerPort.\n * @member {number} peerPort\n * @memberof agentInterface.UpdatePeerInfoRequestMessage\n * @instance\n */\n UpdatePeerInfoRequestMessage.prototype.peerPort = 0;\n\n /**\n * UpdatePeerInfoRequestMessage relayPublicKey.\n * @member {string} relayPublicKey\n * @memberof agentInterface.UpdatePeerInfoRequestMessage\n * @instance\n */\n UpdatePeerInfoRequestMessage.prototype.relayPublicKey = \"\";\n\n /**\n * Creates a new UpdatePeerInfoRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.UpdatePeerInfoRequestMessage\n * @static\n * @param {agentInterface.IUpdatePeerInfoRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.UpdatePeerInfoRequestMessage} UpdatePeerInfoRequestMessage instance\n */\n UpdatePeerInfoRequestMessage.create = function create(properties) {\n return new UpdatePeerInfoRequestMessage(properties);\n };\n\n /**\n * Encodes the specified UpdatePeerInfoRequestMessage message. Does not implicitly {@link agentInterface.UpdatePeerInfoRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.UpdatePeerInfoRequestMessage\n * @static\n * @param {agentInterface.IUpdatePeerInfoRequestMessage} m UpdatePeerInfoRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n UpdatePeerInfoRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.publicKey != null && Object.hasOwnProperty.call(m, \"publicKey\"))\n w.uint32(10).string(m.publicKey);\n if (m.currentNode != null && Object.hasOwnProperty.call(m, \"currentNode\"))\n w.uint32(16).bool(m.currentNode);\n if (m.peerHost != null && Object.hasOwnProperty.call(m, \"peerHost\"))\n w.uint32(26).string(m.peerHost);\n if (m.peerPort != null && Object.hasOwnProperty.call(m, \"peerPort\"))\n w.uint32(32).int32(m.peerPort);\n if (m.relayPublicKey != null && Object.hasOwnProperty.call(m, \"relayPublicKey\"))\n w.uint32(42).string(m.relayPublicKey);\n return w;\n };\n\n /**\n * Encodes the specified UpdatePeerInfoRequestMessage message, length delimited. Does not implicitly {@link agentInterface.UpdatePeerInfoRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.UpdatePeerInfoRequestMessage\n * @static\n * @param {agentInterface.IUpdatePeerInfoRequestMessage} message UpdatePeerInfoRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n UpdatePeerInfoRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an UpdatePeerInfoRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.UpdatePeerInfoRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.UpdatePeerInfoRequestMessage} UpdatePeerInfoRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n UpdatePeerInfoRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.UpdatePeerInfoRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.publicKey = r.string();\n break;\n case 2:\n m.currentNode = r.bool();\n break;\n case 3:\n m.peerHost = r.string();\n break;\n case 4:\n m.peerPort = r.int32();\n break;\n case 5:\n m.relayPublicKey = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes an UpdatePeerInfoRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.UpdatePeerInfoRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.UpdatePeerInfoRequestMessage} UpdatePeerInfoRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n UpdatePeerInfoRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return UpdatePeerInfoRequestMessage;\n })();\n\n agentInterface.UpdatePeerInfoResponseMessage = (function() {\n\n /**\n * Properties of an UpdatePeerInfoResponseMessage.\n * @memberof agentInterface\n * @interface IUpdatePeerInfoResponseMessage\n * @property {boolean|null} [successful] UpdatePeerInfoResponseMessage successful\n */\n\n /**\n * Constructs a new UpdatePeerInfoResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents an UpdatePeerInfoResponseMessage.\n * @implements IUpdatePeerInfoResponseMessage\n * @constructor\n * @param {agentInterface.IUpdatePeerInfoResponseMessage=} [p] Properties to set\n */\n function UpdatePeerInfoResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * UpdatePeerInfoResponseMessage successful.\n * @member {boolean} successful\n * @memberof agentInterface.UpdatePeerInfoResponseMessage\n * @instance\n */\n UpdatePeerInfoResponseMessage.prototype.successful = false;\n\n /**\n * Creates a new UpdatePeerInfoResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.UpdatePeerInfoResponseMessage\n * @static\n * @param {agentInterface.IUpdatePeerInfoResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.UpdatePeerInfoResponseMessage} UpdatePeerInfoResponseMessage instance\n */\n UpdatePeerInfoResponseMessage.create = function create(properties) {\n return new UpdatePeerInfoResponseMessage(properties);\n };\n\n /**\n * Encodes the specified UpdatePeerInfoResponseMessage message. Does not implicitly {@link agentInterface.UpdatePeerInfoResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.UpdatePeerInfoResponseMessage\n * @static\n * @param {agentInterface.IUpdatePeerInfoResponseMessage} m UpdatePeerInfoResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n UpdatePeerInfoResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.successful != null && Object.hasOwnProperty.call(m, \"successful\"))\n w.uint32(8).bool(m.successful);\n return w;\n };\n\n /**\n * Encodes the specified UpdatePeerInfoResponseMessage message, length delimited. Does not implicitly {@link agentInterface.UpdatePeerInfoResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.UpdatePeerInfoResponseMessage\n * @static\n * @param {agentInterface.IUpdatePeerInfoResponseMessage} message UpdatePeerInfoResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n UpdatePeerInfoResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes an UpdatePeerInfoResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.UpdatePeerInfoResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.UpdatePeerInfoResponseMessage} UpdatePeerInfoResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n UpdatePeerInfoResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.UpdatePeerInfoResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.successful = r.bool();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes an UpdatePeerInfoResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.UpdatePeerInfoResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.UpdatePeerInfoResponseMessage} UpdatePeerInfoResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n UpdatePeerInfoResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return UpdatePeerInfoResponseMessage;\n })();\n\n agentInterface.RequestRelayRequestMessage = (function() {\n\n /**\n * Properties of a RequestRelayRequestMessage.\n * @memberof agentInterface\n * @interface IRequestRelayRequestMessage\n * @property {string|null} [publicKey] RequestRelayRequestMessage publicKey\n */\n\n /**\n * Constructs a new RequestRelayRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a RequestRelayRequestMessage.\n * @implements IRequestRelayRequestMessage\n * @constructor\n * @param {agentInterface.IRequestRelayRequestMessage=} [p] Properties to set\n */\n function RequestRelayRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * RequestRelayRequestMessage publicKey.\n * @member {string} publicKey\n * @memberof agentInterface.RequestRelayRequestMessage\n * @instance\n */\n RequestRelayRequestMessage.prototype.publicKey = \"\";\n\n /**\n * Creates a new RequestRelayRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.RequestRelayRequestMessage\n * @static\n * @param {agentInterface.IRequestRelayRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.RequestRelayRequestMessage} RequestRelayRequestMessage instance\n */\n RequestRelayRequestMessage.create = function create(properties) {\n return new RequestRelayRequestMessage(properties);\n };\n\n /**\n * Encodes the specified RequestRelayRequestMessage message. Does not implicitly {@link agentInterface.RequestRelayRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.RequestRelayRequestMessage\n * @static\n * @param {agentInterface.IRequestRelayRequestMessage} m RequestRelayRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RequestRelayRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.publicKey != null && Object.hasOwnProperty.call(m, \"publicKey\"))\n w.uint32(10).string(m.publicKey);\n return w;\n };\n\n /**\n * Encodes the specified RequestRelayRequestMessage message, length delimited. Does not implicitly {@link agentInterface.RequestRelayRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.RequestRelayRequestMessage\n * @static\n * @param {agentInterface.IRequestRelayRequestMessage} message RequestRelayRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RequestRelayRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a RequestRelayRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.RequestRelayRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.RequestRelayRequestMessage} RequestRelayRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RequestRelayRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.RequestRelayRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.publicKey = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a RequestRelayRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.RequestRelayRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.RequestRelayRequestMessage} RequestRelayRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RequestRelayRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return RequestRelayRequestMessage;\n })();\n\n agentInterface.RequestRelayResponseMessage = (function() {\n\n /**\n * Properties of a RequestRelayResponseMessage.\n * @memberof agentInterface\n * @interface IRequestRelayResponseMessage\n * @property {boolean|null} [successful] RequestRelayResponseMessage successful\n */\n\n /**\n * Constructs a new RequestRelayResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a RequestRelayResponseMessage.\n * @implements IRequestRelayResponseMessage\n * @constructor\n * @param {agentInterface.IRequestRelayResponseMessage=} [p] Properties to set\n */\n function RequestRelayResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * RequestRelayResponseMessage successful.\n * @member {boolean} successful\n * @memberof agentInterface.RequestRelayResponseMessage\n * @instance\n */\n RequestRelayResponseMessage.prototype.successful = false;\n\n /**\n * Creates a new RequestRelayResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.RequestRelayResponseMessage\n * @static\n * @param {agentInterface.IRequestRelayResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.RequestRelayResponseMessage} RequestRelayResponseMessage instance\n */\n RequestRelayResponseMessage.create = function create(properties) {\n return new RequestRelayResponseMessage(properties);\n };\n\n /**\n * Encodes the specified RequestRelayResponseMessage message. Does not implicitly {@link agentInterface.RequestRelayResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.RequestRelayResponseMessage\n * @static\n * @param {agentInterface.IRequestRelayResponseMessage} m RequestRelayResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RequestRelayResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.successful != null && Object.hasOwnProperty.call(m, \"successful\"))\n w.uint32(8).bool(m.successful);\n return w;\n };\n\n /**\n * Encodes the specified RequestRelayResponseMessage message, length delimited. Does not implicitly {@link agentInterface.RequestRelayResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.RequestRelayResponseMessage\n * @static\n * @param {agentInterface.IRequestRelayResponseMessage} message RequestRelayResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RequestRelayResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a RequestRelayResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.RequestRelayResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.RequestRelayResponseMessage} RequestRelayResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RequestRelayResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.RequestRelayResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.successful = r.bool();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a RequestRelayResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.RequestRelayResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.RequestRelayResponseMessage} RequestRelayResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RequestRelayResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return RequestRelayResponseMessage;\n })();\n\n agentInterface.RequestPunchRequestMessage = (function() {\n\n /**\n * Properties of a RequestPunchRequestMessage.\n * @memberof agentInterface\n * @interface IRequestPunchRequestMessage\n * @property {string|null} [publicKey] RequestPunchRequestMessage publicKey\n */\n\n /**\n * Constructs a new RequestPunchRequestMessage.\n * @memberof agentInterface\n * @classdesc Represents a RequestPunchRequestMessage.\n * @implements IRequestPunchRequestMessage\n * @constructor\n * @param {agentInterface.IRequestPunchRequestMessage=} [p] Properties to set\n */\n function RequestPunchRequestMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * RequestPunchRequestMessage publicKey.\n * @member {string} publicKey\n * @memberof agentInterface.RequestPunchRequestMessage\n * @instance\n */\n RequestPunchRequestMessage.prototype.publicKey = \"\";\n\n /**\n * Creates a new RequestPunchRequestMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.RequestPunchRequestMessage\n * @static\n * @param {agentInterface.IRequestPunchRequestMessage=} [properties] Properties to set\n * @returns {agentInterface.RequestPunchRequestMessage} RequestPunchRequestMessage instance\n */\n RequestPunchRequestMessage.create = function create(properties) {\n return new RequestPunchRequestMessage(properties);\n };\n\n /**\n * Encodes the specified RequestPunchRequestMessage message. Does not implicitly {@link agentInterface.RequestPunchRequestMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.RequestPunchRequestMessage\n * @static\n * @param {agentInterface.IRequestPunchRequestMessage} m RequestPunchRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RequestPunchRequestMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.publicKey != null && Object.hasOwnProperty.call(m, \"publicKey\"))\n w.uint32(10).string(m.publicKey);\n return w;\n };\n\n /**\n * Encodes the specified RequestPunchRequestMessage message, length delimited. Does not implicitly {@link agentInterface.RequestPunchRequestMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.RequestPunchRequestMessage\n * @static\n * @param {agentInterface.IRequestPunchRequestMessage} message RequestPunchRequestMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RequestPunchRequestMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a RequestPunchRequestMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.RequestPunchRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.RequestPunchRequestMessage} RequestPunchRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RequestPunchRequestMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.RequestPunchRequestMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.publicKey = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a RequestPunchRequestMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.RequestPunchRequestMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.RequestPunchRequestMessage} RequestPunchRequestMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RequestPunchRequestMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return RequestPunchRequestMessage;\n })();\n\n agentInterface.RequestPunchResponseMessage = (function() {\n\n /**\n * Properties of a RequestPunchResponseMessage.\n * @memberof agentInterface\n * @interface IRequestPunchResponseMessage\n * @property {string|null} [address] RequestPunchResponseMessage address\n */\n\n /**\n * Constructs a new RequestPunchResponseMessage.\n * @memberof agentInterface\n * @classdesc Represents a RequestPunchResponseMessage.\n * @implements IRequestPunchResponseMessage\n * @constructor\n * @param {agentInterface.IRequestPunchResponseMessage=} [p] Properties to set\n */\n function RequestPunchResponseMessage(p) {\n if (p)\n for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)\n if (p[ks[i]] != null)\n this[ks[i]] = p[ks[i]];\n }\n\n /**\n * RequestPunchResponseMessage address.\n * @member {string} address\n * @memberof agentInterface.RequestPunchResponseMessage\n * @instance\n */\n RequestPunchResponseMessage.prototype.address = \"\";\n\n /**\n * Creates a new RequestPunchResponseMessage instance using the specified properties.\n * @function create\n * @memberof agentInterface.RequestPunchResponseMessage\n * @static\n * @param {agentInterface.IRequestPunchResponseMessage=} [properties] Properties to set\n * @returns {agentInterface.RequestPunchResponseMessage} RequestPunchResponseMessage instance\n */\n RequestPunchResponseMessage.create = function create(properties) {\n return new RequestPunchResponseMessage(properties);\n };\n\n /**\n * Encodes the specified RequestPunchResponseMessage message. Does not implicitly {@link agentInterface.RequestPunchResponseMessage.verify|verify} messages.\n * @function encode\n * @memberof agentInterface.RequestPunchResponseMessage\n * @static\n * @param {agentInterface.IRequestPunchResponseMessage} m RequestPunchResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [w] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RequestPunchResponseMessage.encode = function encode(m, w) {\n if (!w)\n w = $Writer.create();\n if (m.address != null && Object.hasOwnProperty.call(m, \"address\"))\n w.uint32(10).string(m.address);\n return w;\n };\n\n /**\n * Encodes the specified RequestPunchResponseMessage message, length delimited. Does not implicitly {@link agentInterface.RequestPunchResponseMessage.verify|verify} messages.\n * @function encodeDelimited\n * @memberof agentInterface.RequestPunchResponseMessage\n * @static\n * @param {agentInterface.IRequestPunchResponseMessage} message RequestPunchResponseMessage message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n RequestPunchResponseMessage.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n\n /**\n * Decodes a RequestPunchResponseMessage message from the specified reader or buffer.\n * @function decode\n * @memberof agentInterface.RequestPunchResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from\n * @param {number} [l] Message length if known beforehand\n * @returns {agentInterface.RequestPunchResponseMessage} RequestPunchResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RequestPunchResponseMessage.decode = function decode(r, l) {\n if (!(r instanceof $Reader))\n r = $Reader.create(r);\n var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.RequestPunchResponseMessage();\n while (r.pos < c) {\n var t = r.uint32();\n switch (t >>> 3) {\n case 1:\n m.address = r.string();\n break;\n default:\n r.skipType(t & 7);\n break;\n }\n }\n return m;\n };\n\n /**\n * Decodes a RequestPunchResponseMessage message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof agentInterface.RequestPunchResponseMessage\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {agentInterface.RequestPunchResponseMessage} RequestPunchResponseMessage\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n RequestPunchResponseMessage.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n\n return RequestPunchResponseMessage;\n })();\n\n return agentInterface;\n})();\n\nmodule.exports = $root;\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/internal/daemon-script.js b/dist/internal/daemon-script.js index 35fe366253..0af4b9d735 100644 --- a/dist/internal/daemon-script.js +++ b/dist/internal/daemon-script.js @@ -89,47 +89,21 @@ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(module) { + Object.defineProperty(exports, "__esModule", { value: true }); -const Polykey_1 = __webpack_require__(2); -process.title = 'polykey-agent'; -new Polykey_1.PolykeyAgent(); -console.log(module); +const Polykey_1 = __webpack_require__(1); +let agent; +process.on('message', async (polykeyPath) => { + agent = new Polykey_1.PolykeyAgent(polykeyPath); + await agent.startServer(); + process.send && process.send('started'); +}); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(1)(module))) /***/ }), /* 1 */ /***/ (function(module, exports) { -module.exports = function(module) { - if (!module.webpackPolyfill) { - module.deprecate = function() {}; - module.paths = []; - // module.parent = undefined by default - if (!module.children) module.children = []; - Object.defineProperty(module, "loaded", { - enumerable: true, - get: function() { - return module.l; - } - }); - Object.defineProperty(module, "id", { - enumerable: true, - get: function() { - return module.i; - } - }); - module.webpackPolyfill = 1; - } - return module; -}; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports) { - module.exports = require("../polykey.js"); /***/ }) diff --git a/dist/polykey.js b/dist/polykey.js index b54065e67a..d5815a7879 100644 --- a/dist/polykey.js +++ b/dist/polykey.js @@ -91,11 +91,17 @@ return /******/ (function(modules) { // webpackBootstrap /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 11); +/******/ return __webpack_require__(__webpack_require__.s = 12); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ +/***/ (function(module, exports) { + +module.exports = require("path"); + +/***/ }), +/* 1 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -162,15 +168,19 @@ exports.Address = Address; */ Address.AddressRegex = /^([a-zA-Z.]+|(?:[0-9]{1,3}\.){3}[0-9]{1,3})(?::)([0-9]{1,5})$/; class PeerInfo { - constructor(publicKey, connectedAddress, relayPublicKey) { + constructor(publicKey, relayPublicKey, peerAddress, apiAddress) { this.publicKey = PeerInfo.formatPublicKey(publicKey); - if (connectedAddress) { - const addr = Address.parse(connectedAddress); - this.peerAddress = addr; - } if (relayPublicKey) { this.relayPublicKey = PeerInfo.formatPublicKey(relayPublicKey); } + if (peerAddress) { + const addr = Address.parse(peerAddress); + this.peerAddress = addr; + } + if (apiAddress) { + const addr = Address.parse(apiAddress); + this.apiAddress = addr; + } } static formatPublicKey(str) { const startString = '-----BEGIN PGP PUBLIC KEY BLOCK-----'; @@ -178,33 +188,28 @@ class PeerInfo { return str.slice(str.indexOf(startString), str.indexOf(endString) + endString.length); } deepCopy() { - var _a; - return new PeerInfo(this.publicKey, (_a = this.peerAddress) === null || _a === void 0 ? void 0 : _a.toString(), this.relayPublicKey); + var _a, _b; + return new PeerInfo(this.publicKey, this.relayPublicKey, (_a = this.peerAddress) === null || _a === void 0 ? void 0 : _a.toString(), (_b = this.apiAddress) === null || _b === void 0 ? void 0 : _b.toString()); } toStringB64() { - var _a; + var _a, _b; const message = Peer_1.peerInterface.PeerInfoMessage.encodeDelimited({ publicKey: this.publicKey, - peerAddress: (_a = this.peerAddress) === null || _a === void 0 ? void 0 : _a.toString(), relayPublicKey: this.relayPublicKey, + peerAddress: (_a = this.peerAddress) === null || _a === void 0 ? void 0 : _a.toString(), + apiAddress: (_b = this.apiAddress) === null || _b === void 0 ? void 0 : _b.toString(), }).finish(); return utils_1.protobufToString(message); } static parseB64(str) { const message = utils_1.stringToProtobuf(str); const decoded = Peer_1.peerInterface.PeerInfoMessage.decodeDelimited(message); - return new PeerInfo(decoded.publicKey, decoded.peerAddress, decoded.relayPublicKey); + return new PeerInfo(decoded.publicKey, decoded.relayPublicKey, decoded.peerAddress, decoded.apiAddress); } } exports.default = PeerInfo; -/***/ }), -/* 1 */ -/***/ (function(module, exports) { - -module.exports = require("path"); - /***/ }), /* 2 */ /***/ (function(module, exports) { @@ -227,7 +232,7 @@ module.exports = require("os"); /* 5 */ /***/ (function(module, exports) { -module.exports = require("net"); +module.exports = require("fs"); /***/ }), /* 6 */ @@ -243,7 +248,7 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", { value: true }); -const protobufjs = __importStar(__webpack_require__(27)); +const protobufjs = __importStar(__webpack_require__(31)); /** * Returns a 5 character long random string of lower case letters */ @@ -300,7 +305,7 @@ exports.sleep = sleep; /* 7 */ /***/ (function(module, exports) { -module.exports = require("fs"); +module.exports = require("net"); /***/ }), /* 8 */ @@ -324,11 +329,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const dgram_1 = __importDefault(__webpack_require__(13)); -const cyclist_1 = __importDefault(__webpack_require__(35)); +const dgram_1 = __importDefault(__webpack_require__(15)); +const cyclist_1 = __importDefault(__webpack_require__(40)); const events_1 = __webpack_require__(3); const readable_stream_1 = __webpack_require__(9); -const PeerInfo_1 = __webpack_require__(0); +const PeerInfo_1 = __webpack_require__(1); const EXTENSION = 0; const VERSION = 1; const UINT16 = 0xffff; @@ -719,6 +724,12 @@ exports.connect = connect; /***/ }), /* 11 */ +/***/ (function(module, exports) { + +module.exports = require("@grpc/grpc-js"); + +/***/ }), +/* 12 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -726,20 +737,27 @@ exports.connect = connect; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; Object.defineProperty(exports, "__esModule", { value: true }); const os_1 = __importDefault(__webpack_require__(4)); -const PeerInfo_1 = __importDefault(__webpack_require__(0)); -exports.PeerInfo = PeerInfo_1.default; -const KeyManager_1 = __importDefault(__webpack_require__(28)); +const HttpApi_1 = __importDefault(__webpack_require__(26)); +const KeyManager_1 = __importDefault(__webpack_require__(32)); exports.KeyManager = KeyManager_1.default; -const PeerManager_1 = __importDefault(__webpack_require__(31)); +const PeerManager_1 = __importDefault(__webpack_require__(36)); exports.PeerManager = PeerManager_1.default; -const VaultManager_1 = __importDefault(__webpack_require__(42)); +const VaultManager_1 = __importDefault(__webpack_require__(47)); exports.VaultManager = VaultManager_1.default; -const PolykeyAgent_1 = __importDefault(__webpack_require__(59)); +const PolykeyAgent_1 = __importDefault(__webpack_require__(64)); exports.PolykeyAgent = PolykeyAgent_1.default; -const PolykeyClient_1 = __importDefault(__webpack_require__(25)); -exports.PolykeyClient = PolykeyClient_1.default; +const PeerInfo_1 = __importStar(__webpack_require__(1)); +exports.PeerInfo = PeerInfo_1.default; +exports.Address = PeerInfo_1.Address; class Polykey { constructor(polykeyPath = `${os_1.default.homedir()}/.polykey`, fileSystem, keyManager, peerManager, vaultManager) { this.polykeyPath = polykeyPath; @@ -749,61 +767,65 @@ class Polykey { this.peerManager = peerManager !== null && peerManager !== void 0 ? peerManager : new PeerManager_1.default(this.polykeyPath, fileSystem, this.keyManager); // Set or Initialize vaultManager this.vaultManager = vaultManager !== null && vaultManager !== void 0 ? vaultManager : new VaultManager_1.default(this.polykeyPath, fileSystem, this.keyManager, this.peerManager); + // start the api + this.httpApi = new HttpApi_1.default((() => this.peerManager.peerInfo).bind(this), ((apiAddress) => { + this.peerManager.peerInfo.apiAddress = apiAddress; + }).bind(this), this.keyManager.pki.handleCSR.bind(this), (() => this.keyManager.pki.RootCert).bind(this)); } } exports.default = Polykey; /***/ }), -/* 12 */ +/* 13 */ /***/ (function(module, exports) { module.exports = require("crypto"); /***/ }), -/* 13 */ +/* 14 */ /***/ (function(module, exports) { -module.exports = require("dgram"); +module.exports = require("util"); /***/ }), -/* 14 */ +/* 15 */ /***/ (function(module, exports) { -module.exports = require("@grpc/grpc-js"); +module.exports = require("dgram"); /***/ }), -/* 15 */ +/* 16 */ /***/ (function(module, exports) { module.exports = require("../proto/compiled/Peer_grpc_pb"); /***/ }), -/* 16 */ +/* 17 */ /***/ (function(module, exports) { module.exports = require("isomorphic-git"); /***/ }), -/* 17 */ +/* 18 */ /***/ (function(module, exports) { module.exports = require("encryptedfs"); /***/ }), -/* 18 */ +/* 19 */ /***/ (function(module, exports) { module.exports = require("virtualfs"); /***/ }), -/* 19 */ +/* 20 */ /***/ (function(module, exports) { module.exports = require("../proto/js/Git"); /***/ }), -/* 20 */ +/* 21 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -903,7 +925,7 @@ exports.default = GitPktLine; /***/ }), -/* 21 */ +/* 22 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -913,8 +935,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); // This is a convenience wrapper for reading and writing files in the 'refs' directory. -const path_1 = __importDefault(__webpack_require__(1)); -const GitPackedRefs_1 = __importDefault(__webpack_require__(47)); +const path_1 = __importDefault(__webpack_require__(0)); +const GitPackedRefs_1 = __importDefault(__webpack_require__(52)); // @see https://git-scm.com/docs/git-rev-parse.html#_specifying_revisions const refpaths = (ref) => [ `${ref}`, @@ -1035,13 +1057,13 @@ exports.default = GitRefManager; /***/ }), -/* 22 */ +/* 23 */ /***/ (function(module, exports) { module.exports = require("pako"); /***/ }), -/* 23 */ +/* 24 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1231,7 +1253,7 @@ exports.default = GitCommit; /***/ }), -/* 24 */ +/* 25 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1240,10 +1262,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const fs_1 = __importDefault(__webpack_require__(7)); -const pako_1 = __importDefault(__webpack_require__(22)); -const path_1 = __importDefault(__webpack_require__(1)); -const GitObject_1 = __importDefault(__webpack_require__(52)); +const fs_1 = __importDefault(__webpack_require__(5)); +const pako_1 = __importDefault(__webpack_require__(23)); +const path_1 = __importDefault(__webpack_require__(0)); +const GitObject_1 = __importDefault(__webpack_require__(57)); const PackfileCache = new Map(); class GitObjectManager { static async read(fileSystem, gitdir, oid, format = 'content') { @@ -1302,542 +1324,168 @@ exports.default = GitObjectManager; /***/ }), -/* 25 */ +/* 26 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const PeerInfo_1 = __importStar(__webpack_require__(0)); -const Agent_1 = __webpack_require__(26); -class PolykeyClient { - constructor(getStream) { - this.getStream = getStream; - } - async sendRequestToAgent(request) { - const stream = this.getStream(); - const responseList = await new Promise((resolve, reject) => { +const fs_1 = __importDefault(__webpack_require__(5)); +const http_1 = __importDefault(__webpack_require__(27)); +const path_1 = __importDefault(__webpack_require__(0)); +const js_yaml_1 = __importDefault(__webpack_require__(28)); +const connect_1 = __importDefault(__webpack_require__(29)); +const swagger_tools_1 = __importDefault(__webpack_require__(30)); +const PeerInfo_1 = __webpack_require__(1); +class ResponsePayload { + constructor(code, payload) { + this.code = code; + this.payload = payload; + } +} +class HttpApi { + constructor(getPeerInfo, updateApiAddress, handleCSR, getRootCertificate) { + this.certificateSigningRequest = async (req, res, next) => { try { - const responseList = []; - stream.on('data', (data) => { - if (data instanceof Uint8Array) { - responseList.push(data); - } - else { - responseList.push(...data); - } - }); - stream.on('error', (err) => { - reject(err); - }); - stream.on('end', () => { - resolve(responseList); - }); - if (!stream.writableEnded) { - stream.write(request); - } + const body = req.swagger.params['body'].value; + const response = await this.handleCertificateSigningRequest(body); + this.writeJson(res, response); } - catch (err) { - reject(err); + catch (error) { + this.writeJson(res, error); } - }); - return responseList; - } - async handleAgentCommunication(type, nodePath, request) { - // Encode message and sent - const agentMessage = Agent_1.agentInterface.AgentMessage.encodeDelimited({ - type: type, - isResponse: false, - nodePath: nodePath, - subMessage: request, - }).finish(); - const responseList = await this.sendRequestToAgent(agentMessage); - const agentMessageList = []; - for (const response of responseList.values()) { - const { subMessage, type } = Agent_1.agentInterface.AgentMessage.decodeDelimited(response); - if (type == Agent_1.agentInterface.AgentMessageType.ERROR) { - const { error } = Agent_1.agentInterface.ErrorMessage.decodeDelimited(subMessage); - const reason = new Error(`Agent Error: ${error}`); - throw reason; + }; + this.rootCertificate = async (req, res, next) => { + try { + const response = await this.handleRootCertificateRequest(); + this.writeJson(res, response); } - else { - agentMessageList.push(Agent_1.agentInterface.AgentMessage.decodeDelimited(response)); + catch (error) { + this.writeJson(res, error); } - } - return agentMessageList; - } - async registerNode(path, passphrase) { - var _a; - const registerNodeRequest = Agent_1.agentInterface.RegisterNodeRequestMessage.encodeDelimited({ passphrase }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.REGISTER_NODE, path, registerNodeRequest); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.REGISTER_NODE)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.RegisterNodeResponseMessage.decodeDelimited(subMessage); - return successful; - } - async newNode(path, userId, passphrase, nbits) { - var _a; - const newNodeRequest = Agent_1.agentInterface.NewNodeRequestMessage.encodeDelimited({ - userId, - passphrase, - nbits, - }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.NEW_NODE, path, newNodeRequest); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.NEW_NODE)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.NewNodeResponseMessage.decodeDelimited(subMessage); - return successful; - } - async listNodes(unlockedOnly = true) { - var _a; - const newNodeRequest = Agent_1.agentInterface.ListNodesRequestMessage.encodeDelimited({ unlockedOnly }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_NODES, undefined, newNodeRequest); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_NODES)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { nodes } = Agent_1.agentInterface.ListNodesResponseMessage.decodeDelimited(subMessage); - return nodes; - } - ///////////////////// - // Key commands // - ///////////////////// - async deriveKey(nodePath, keyName, passphrase) { - var _a; - const request = Agent_1.agentInterface.DeriveKeyRequestMessage.encodeDelimited({ keyName, passphrase }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DERIVE_KEY, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DERIVE_KEY)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.DeriveKeyResponseMessage.decodeDelimited(subMessage); - return successful; - } - async deleteKey(nodePath, keyName) { - var _a; - const request = Agent_1.agentInterface.DeleteKeyRequestMessage.encodeDelimited({ keyName }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DELETE_KEY, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DELETE_KEY)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.DeleteKeyResponseMessage.decodeDelimited(subMessage); - return successful; - } - async listKeys(nodePath) { - var _a; - const request = Agent_1.agentInterface.ListKeysRequestMessage.encodeDelimited({}).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_KEYS, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_KEYS)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { keyNames } = Agent_1.agentInterface.ListKeysResponseMessage.decodeDelimited(subMessage); - return keyNames; - } - async getKey(nodePath, keyName) { - var _a; - const request = Agent_1.agentInterface.GetKeyRequestMessage.encodeDelimited({ keyName }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.GET_KEY, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.GET_KEY)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { keyContent } = Agent_1.agentInterface.GetKeyResponseMessage.decodeDelimited(subMessage); - return keyContent; - } - async getPrimaryKeyPair(nodePath, includePrivateKey = false) { - var _a; - const request = Agent_1.agentInterface.GetPrimaryKeyPairRequestMessage.encodeDelimited({ includePrivateKey }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.GET_PRIMARY_KEYPAIR, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.GET_PRIMARY_KEYPAIR)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { publicKey, privateKey } = Agent_1.agentInterface.GetPrimaryKeyPairResponseMessage.decodeDelimited(subMessage); - return { publicKey, privateKey }; - } - ///////////////////// - // Crypto commands // - ///////////////////// - async signFile(nodePath, filePath, privateKeyPath, passphrase) { - var _a; - const request = Agent_1.agentInterface.SignFileRequestMessage.encodeDelimited({ - filePath, - privateKeyPath, - passphrase, - }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.SIGN_FILE, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.SIGN_FILE)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { signaturePath } = Agent_1.agentInterface.SignFileResponseMessage.decodeDelimited(subMessage); - return signaturePath; - } - async verifyFile(nodePath, filePath, publicKeyPath) { - var _a; - const request = Agent_1.agentInterface.VerifyFileRequestMessage.encodeDelimited({ filePath, publicKeyPath }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.VERIFY_FILE, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.VERIFY_FILE)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { verified } = Agent_1.agentInterface.VerifyFileResponseMessage.decodeDelimited(subMessage); - return verified; - } - async encryptFile(nodePath, filePath, publicKeyPath) { - var _a; - const request = Agent_1.agentInterface.EncryptFileRequestMessage.encodeDelimited({ filePath, publicKeyPath }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.ENCRYPT_FILE, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.ENCRYPT_FILE)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { encryptedPath } = Agent_1.agentInterface.EncryptFileResponseMessage.decodeDelimited(subMessage); - return encryptedPath; - } - async decryptFile(nodePath, filePath, privateKeyPath, passphrase) { - var _a; - const request = Agent_1.agentInterface.DecryptFileRequestMessage.encodeDelimited({ - filePath, - privateKeyPath, - passphrase, - }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DECRYPT_FILE, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DECRYPT_FILE)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { decryptedPath } = Agent_1.agentInterface.DecryptFileResponseMessage.decodeDelimited(subMessage); - return decryptedPath; - } - ////////////////////// - // Vault Operations // - ////////////////////// - async listVaults(nodePath) { - var _a; - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_VAULTS, nodePath); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_VAULTS)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { vaultNames } = Agent_1.agentInterface.ListVaultsResponseMessage.decodeDelimited(subMessage); - return vaultNames; - } - async scanVaultNames(nodePath, publicKey) { - var _a; - const request = Agent_1.agentInterface.ScanVaultNamesRequestMessage.encodeDelimited({ publicKey }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.SCAN_VAULT_NAMES, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.SCAN_VAULT_NAMES)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { vaultNames } = Agent_1.agentInterface.ScanVaultNamesResponseMessage.decodeDelimited(subMessage); - return vaultNames; - } - async newVault(nodePath, vaultName) { - var _a; - const request = Agent_1.agentInterface.NewVaultRequestMessage.encodeDelimited({ vaultName }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.NEW_VAULT, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.NEW_VAULT)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.NewVaultResponseMessage.decodeDelimited(subMessage); - return successful; - } - async pullVault(nodePath, vaultName, publicKey) { - var _a; - const request = Agent_1.agentInterface.PullVaultRequestMessage.encodeDelimited({ vaultName, publicKey }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.PULL_VAULT, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.PULL_VAULT)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.PullVaultResponseMessage.decodeDelimited(subMessage); - return successful; - } - async destroyVault(nodePath, vaultName) { - var _a; - const request = Agent_1.agentInterface.DestroyVaultRequestMessage.encodeDelimited({ vaultName }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DESTROY_VAULT, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DESTROY_VAULT)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.DestroyVaultResponseMessage.decodeDelimited(subMessage); - return successful; - } - /////////////////////// - // Secret Operations // - /////////////////////// - async listSecrets(nodePath, vaultName) { - var _a; - const request = Agent_1.agentInterface.ListSecretsRequestMessage.encodeDelimited({ vaultName }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_SECRETS, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_SECRETS)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { secretNames } = Agent_1.agentInterface.ListSecretsResponseMessage.decodeDelimited(subMessage); - return secretNames; + }; + this.getLocalPeerInfo = getPeerInfo; + this.updateApiAddress = updateApiAddress; + this.handleCSR = handleCSR; + this.getRootCertificate = getRootCertificate; + this.connectServer = connect_1.default(); } - async createSecret(nodePath, vaultName, secretName, secret) { - var _a; - let request; - if (typeof secret == 'string') { - request = Agent_1.agentInterface.CreateSecretRequestMessage.encodeDelimited({ - vaultName, - secretName, - secretPath: secret, - }).finish(); - } - else { - request = Agent_1.agentInterface.CreateSecretRequestMessage.encodeDelimited({ - vaultName, - secretName, - secretContent: secret, - }).finish(); - } - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.CREATE_SECRET, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.CREATE_SECRET)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.CreateSecretResponseMessage.decodeDelimited(subMessage); - return successful; + async start(port = 0) { + return await new Promise((resolve, reject) => { + // this code is needed as we can't require yaml files + let yamlDoc; + const fromSrcFolderPath = path_1.default.join(__dirname, '../../openapi.yaml'); + const fromDistFolderPath = path_1.default.join(__dirname, '../openapi.yaml'); + if (fs_1.default.existsSync(fromSrcFolderPath)) { + yamlDoc = fs_1.default.readFileSync(fromSrcFolderPath).toString(); + } + else { + yamlDoc = fs_1.default.readFileSync(fromDistFolderPath).toString(); + } + const swaggerDoc = js_yaml_1.default.load(yamlDoc); + // Initialize the Swagger middleware + swagger_tools_1.default.initializeMiddleware(swaggerDoc, (middleware) => { + // Interpret Swagger resources and attach metadata to request - must be first in swagger-tools middleware chain + this.connectServer.use(middleware.swaggerMetadata()); + // Validate Swagger requests + this.connectServer.use(middleware.swaggerValidator()); + // Route validated requests to appropriate controller + this.connectServer.use(middleware.swaggerRouter({ + controllers: this.ControllerOptions, + // controllers: path.join(__dirname, './controllers'), + useStubs: "production" === 'development', + })); + // Serve the Swagger documents and Swagger UI + this.connectServer.use(middleware.swaggerUi()); + // Start the server + this.httpServer = http_1.default.createServer(this.connectServer).listen(port, () => { + const addressInfo = this.httpServer.address(); + const address = PeerInfo_1.Address.fromAddressInfo(addressInfo); + this.updateApiAddress(address); + console.log(`HTTP API served at: http://${address.toString()}`); + console.log(`HTTP API docs served at: http://${address.toString()}/docs`); + resolve(port); + }); + }); + }); } - async destroySecret(nodePath, vaultName, secretName) { - var _a; - const request = Agent_1.agentInterface.DestroySecretRequestMessage.encodeDelimited({ vaultName, secretName }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DESTROY_SECRET, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DESTROY_SECRET)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.DestroySecretResponseMessage.decodeDelimited(subMessage); - return successful; + async handleCertificateSigningRequest(body) { + const publicKey = body.publicKey; + const csr = body.csr; + return { + publicKey: this.getLocalPeerInfo().publicKey, + csr: this.handleCSR(csr), + }; } - async getSecret(nodePath, vaultName, secretName) { - var _a; - const request = Agent_1.agentInterface.GetSecretRequestMessage.encodeDelimited({ vaultName, secretName }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.GET_SECRET, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.GET_SECRET)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { secret } = Agent_1.agentInterface.GetSecretResponseMessage.decodeDelimited(subMessage); - return Buffer.from(secret); + async handleRootCertificateRequest() { + return { + rootCert: this.getRootCertificate(), + }; } - async updateSecret(nodePath, vaultName, secretName, secret) { - var _a; - let request; - if (typeof secret == 'string') { - request = Agent_1.agentInterface.UpdateSecretRequestMessage.encodeDelimited({ - vaultName, - secretName, - secretPath: secret, - }).finish(); + //////////////////////// + // Controller methods // + //////////////////////// + get ControllerOptions() { + const options = {}; + options['certificateSigningRequest'] = this.certificateSigningRequest.bind(this); + options['rootCertificate'] = this.rootCertificate.bind(this); + return options; + } + // === Helper methods === // + writeJson(response, payload, code = 200) { + let responseString; + if (!payload) { + responseString = undefined; + } + else if (payload instanceof Error) { + code = 500; + responseString = JSON.stringify({ error: payload.message }, null, 2); } else { - request = Agent_1.agentInterface.UpdateSecretRequestMessage.encodeDelimited({ - vaultName, - secretName, - secretContent: secret, - }).finish(); - } - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.UPDATE_SECRET, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.UPDATE_SECRET)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.UpdateSecretResponseMessage.decodeDelimited(subMessage); - return successful; - } - ///////////////////// - // Peer Operations // - ///////////////////// - async addPeer(nodePath, publicKey, peerAddress, relayPublicKey) { - var _a; - const request = Agent_1.agentInterface.AddPeerRequestMessage.encodeDelimited({ - publicKey, - peerAddress, - relayPublicKey, - }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.ADD_PEER, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.ADD_PEER)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.AddPeerResponseMessage.decodeDelimited(subMessage); - return successful; - } - async getPeerInfo(nodePath, current = false, publicKey) { - var _a; - const request = Agent_1.agentInterface.PeerInfoRequestMessage.encodeDelimited({ current, publicKey }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.GET_PEER_INFO, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.GET_PEER_INFO)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { publicKey: responsePublicKey, peerAddress, relayPublicKey, } = Agent_1.agentInterface.PeerInfoResponseMessage.decodeDelimited(subMessage); - return new PeerInfo_1.default(responsePublicKey, peerAddress, relayPublicKey); - } - async pingPeer(nodePath, publicKey, timeout) { - var _a; - const request = Agent_1.agentInterface.PingPeerRequestMessage.encodeDelimited({ publicKey, timeout }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.PING_PEER, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.PING_PEER)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.PingPeerResponseMessage.decodeDelimited(subMessage); - return successful; - } - async findPeer(nodePath, publicKey, timeout) { - var _a; - const request = Agent_1.agentInterface.FindPeerRequestMessage.encodeDelimited({ publicKey, timeout }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.FIND_PEER, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.FIND_PEER)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.FindPeerResponseMessage.decodeDelimited(subMessage); - return successful; - } - async findSocialPeer(nodePath, handle, service, timeout) { - var _a; - const request = Agent_1.agentInterface.FindSocialPeerRequestMessage.encodeDelimited({ handle, service, timeout }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.FIND_SOCIAL_PEER, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.FIND_SOCIAL_PEER)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.FindSocialPeerResponseMessage.decodeDelimited(subMessage); - return successful; - } - async listPeers(nodePath) { - var _a; - const request = Agent_1.agentInterface.ListPeersRequestMessage.encodeDelimited({}).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_PEERS, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_PEERS)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { publicKeys } = Agent_1.agentInterface.ListPeersResponseMessage.decodeDelimited(subMessage); - return publicKeys; - } - async toggleStealth(nodePath, active) { - var _a; - const request = Agent_1.agentInterface.ToggleStealthRequestMessage.encodeDelimited({ active }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.TOGGLE_STEALTH, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.TOGGLE_STEALTH)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.ToggleStealthResponseMessage.decodeDelimited(subMessage); - return successful; - } - async updatePeer(nodePath, publicKey, currentNode, peerHost, peerPort, relayPublicKey) { - var _a; - const request = Agent_1.agentInterface.UpdatePeerInfoRequestMessage.encodeDelimited({ - publicKey, - currentNode, - peerHost, - peerPort, - relayPublicKey, - }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.UPDATE_PEER_INFO, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.UPDATE_PEER_INFO)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.UpdatePeerInfoResponseMessage.decodeDelimited(subMessage); - return successful; - } - async requestRelay(nodePath, publicKey) { - var _a; - const request = Agent_1.agentInterface.RequestRelayRequestMessage.encodeDelimited({ publicKey }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.REQUEST_RELAY, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.REQUEST_RELAY)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { successful } = Agent_1.agentInterface.RequestRelayResponseMessage.decodeDelimited(subMessage); - return successful; - } - async requestPunch(nodePath, publicKey) { - var _a; - const request = Agent_1.agentInterface.RequestPunchRequestMessage.encodeDelimited({ publicKey }).finish(); - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.REQUEST_PUNCH, nodePath, request); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.REQUEST_PUNCH)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { address } = Agent_1.agentInterface.RequestPunchResponseMessage.decodeDelimited(subMessage); - return PeerInfo_1.Address.parse(address); - } - /////////////////// - // Agent control // - /////////////////// - async getAgentStatus() { - var _a; - try { - const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.STATUS); - const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.STATUS)) === null || _a === void 0 ? void 0 : _a.subMessage; - if (!subMessage) { - throw Error('agent did not respond'); - } - const { status } = Agent_1.agentInterface.AgentStatusResponseMessage.decodeDelimited(subMessage); - return status; - } - catch (err) { - if (err.toString().match(/ECONNRESET|ENOENT|ECONNRESET/)) { - return Agent_1.agentInterface.AgentStatusType.OFFLINE; - } - throw err; - } - } - async stopAgent() { - try { - // Tell it to start shutting and wait for response - await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.STOP_AGENT); - return true; - } - catch (err) { - return (await this.getAgentStatus()) != Agent_1.agentInterface.AgentStatusType.ONLINE; + responseString = JSON.stringify(payload, null, 2); } + response.writeHead(code, { 'Content-Type': 'application/json' }); + response.end(responseString); } } -exports.default = PolykeyClient; +exports.default = HttpApi; /***/ }), -/* 26 */ +/* 27 */ /***/ (function(module, exports) { -module.exports = require("../proto/js/Agent"); +module.exports = require("http"); /***/ }), -/* 27 */ +/* 28 */ +/***/ (function(module, exports) { + +module.exports = require("js-yaml"); + +/***/ }), +/* 29 */ +/***/ (function(module, exports) { + +module.exports = require("connect"); + +/***/ }), +/* 30 */ +/***/ (function(module, exports) { + +module.exports = require("swagger-tools"); + +/***/ }), +/* 31 */ /***/ (function(module, exports) { module.exports = require("protobufjs"); /***/ }), -/* 28 */ +/* 32 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1847,32 +1495,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const os_1 = __importDefault(__webpack_require__(4)); -const fs_1 = __importDefault(__webpack_require__(7)); -const path_1 = __importDefault(__webpack_require__(1)); -const kbpgp_1 = __importDefault(__webpack_require__(29)); -const crypto_1 = __importDefault(__webpack_require__(12)); -const util_1 = __webpack_require__(30); +const path_1 = __importDefault(__webpack_require__(0)); +const kbpgp_1 = __importDefault(__webpack_require__(33)); +const crypto_1 = __importDefault(__webpack_require__(13)); +const util_1 = __webpack_require__(14); +const PublicKeyInfrastructure_1 = __importDefault(__webpack_require__(34)); class KeyManager { - constructor(polyKeyPath = `${os_1.default.homedir()}/.polykey`, fileSystem, useWebWorkers = false, workerPool) { + constructor(polykeyPath = `${os_1.default.homedir()}/.polykey`, fileSystem, useWebWorkers = false, workerPool) { this.primaryKeyPair = { private: null, public: null }; this.metadata = { privateKeyPath: null, publicKeyPath: null, - pkiKeyPath: null, - pkiCertPath: null, - caCertPath: null, }; - ///////// - // PKI // - ///////// - this.pkiInfo = { key: null, cert: null, caCert: null }; this.useWebWorkers = useWebWorkers; this.workerPool = workerPool; this.derivedKeys = new Map(); this.fileSystem = fileSystem; // Load key manager metadata - this.polykeyPath = polyKeyPath; - this.keypairPath = path_1.default.join(polyKeyPath, '.keys'); + this.polykeyPath = polykeyPath; + this.keypairPath = path_1.default.join(polykeyPath, '.keys'); if (!this.fileSystem.existsSync(this.keypairPath)) { this.fileSystem.mkdirSync(this.keypairPath, { recursive: true }); } @@ -1887,17 +1528,7 @@ class KeyManager { ///////// // PKI // ///////// - // Load pki keys and certs - if (this.metadata.pkiKeyPath) { - this.pkiInfo.key = fs_1.default.readFileSync(this.metadata.pkiKeyPath); - } - if (this.metadata.pkiCertPath) { - this.pkiInfo.cert = fs_1.default.readFileSync(this.metadata.pkiCertPath); - } - if (this.metadata.caCertPath) { - this.pkiInfo.caCert = fs_1.default.readFileSync(this.metadata.caCertPath); - } - this.loadPKIInfo(this.pkiInfo.key, this.pkiInfo.cert, this.pkiInfo.caCert, true); + this.pki = new PublicKeyInfrastructure_1.default(this.polykeyPath, this.fileSystem); } get identityLoaded() { return this.primaryIdentity ? true : false; @@ -1965,12 +1596,18 @@ class KeyManager { hasPublicKey() { return this.primaryKeyPair.public ? true : false; } + /** + * Determines whether public key is loaded or not + */ + hasPrivateKey() { + return this.primaryKeyPair.private ? true : false; + } /** * Get the public key of the primary keypair */ getPublicKey() { if (!this.primaryKeyPair.public) { - throw Error('Public key does not exist in memory'); + throw Error('public key does not exist in memory'); } return this.primaryKeyPair.public; } @@ -1979,7 +1616,7 @@ class KeyManager { */ getPrivateKey() { if (!this.primaryKeyPair.private) { - throw Error('Private key does not exist in memory'); + throw Error('private key does not exist in memory'); } return this.primaryKeyPair.private; } @@ -2071,6 +1708,21 @@ class KeyManager { } return key; } + /** + * Synchronously Generates a new symmetric key and stores it in the key manager + * @param name Unique name of the generated key + * @param passphrase Passphrase to derive the key from + * @param storeKey Whether to store the key in the key manager + */ + generateKeySync(name, passphrase, storeKey = true) { + const salt = crypto_1.default.randomBytes(32); + const key = crypto_1.default.pbkdf2Sync(passphrase, salt, 10000, 256 / 8, 'sha256'); + if (storeKey) { + this.derivedKeys[name] = key; + this.writeMetadata(); + } + return key; + } /** * Deletes a derived symmetric key from the key manager * @param name Name of the key to be deleted @@ -2428,39 +2080,6 @@ class KeyManager { this.fileSystem.writeFileSync(filePath, decryptedData); return filePath; } - ///////// - // PKI // - ///////// - get PKIInfo() { - return this.pkiInfo; - } - loadPKIInfo(key, cert, caCert, writeToFile = false) { - if (key) { - this.pkiInfo.key = key; - } - if (cert) { - this.pkiInfo.cert = cert; - } - if (caCert) { - this.pkiInfo.caCert = caCert; - } - if (writeToFile) { - // Store in the metadata path folder - const storagePath = path_1.default.dirname(this.metadataPath); - if (key) { - this.metadata.pkiKeyPath = path_1.default.join(storagePath, 'pki_private_key'); - fs_1.default.writeFileSync(this.metadata.pkiKeyPath, key); - } - if (cert) { - this.metadata.pkiCertPath = path_1.default.join(storagePath, 'pki_cert'); - fs_1.default.writeFileSync(this.metadata.pkiCertPath, cert); - } - if (caCert) { - this.metadata.caCertPath = path_1.default.join(storagePath, 'ca_cert'); - fs_1.default.writeFileSync(this.metadata.caCertPath, caCert); - } - } - } /* ============ HELPERS =============== */ /** * Get the key for a given name @@ -2482,6 +2101,9 @@ class KeyManager { async writeMetadata() { const metadata = JSON.stringify(this.metadata); this.fileSystem.writeFileSync(this.metadataPath, metadata); + this.writeEncryptedMetadata(); + } + async writeEncryptedMetadata() { // Store the keys if identity is loaded if (this.identityLoaded) { const derivedKeys = JSON.stringify(this.derivedKeys); @@ -2489,18 +2111,21 @@ class KeyManager { await this.fileSystem.promises.writeFile(this.derivedKeysPath, encryptedMetadata); } } - async loadMetadata() { + loadMetadata() { // Check if file exists if (this.fileSystem.existsSync(this.metadataPath)) { const metadata = this.fileSystem.readFileSync(this.metadataPath).toString(); this.metadata = JSON.parse(metadata); - if (this.identityLoaded && this.fileSystem.existsSync(this.derivedKeysPath)) { - const encryptedMetadata = this.fileSystem.readFileSync(this.derivedKeysPath); - const metadata = (await this.decryptData(encryptedMetadata)).toString(); - const derivedKeys = JSON.parse(metadata); - for (const key of Object.keys(derivedKeys)) { - this.derivedKeys[key] = Buffer.from(derivedKeys[key]); - } + this.loadEncryptedMetadata(); + } + } + async loadEncryptedMetadata() { + if (this.identityLoaded && this.fileSystem.existsSync(this.derivedKeysPath)) { + const encryptedMetadata = this.fileSystem.readFileSync(this.derivedKeysPath); + const metadata = (await this.decryptData(encryptedMetadata)).toString(); + const derivedKeys = JSON.parse(metadata); + for (const key of Object.keys(derivedKeys)) { + this.derivedKeys[key] = Buffer.from(derivedKeys[key]); } } } @@ -2509,19 +2134,437 @@ exports.default = KeyManager; /***/ }), -/* 29 */ +/* 33 */ /***/ (function(module, exports) { module.exports = require("kbpgp"); /***/ }), -/* 30 */ +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const path_1 = __importDefault(__webpack_require__(0)); +const node_forge_1 = __webpack_require__(35); +/** + * This class manages X.509 certificates for secure and authenticated communication between peers. + */ +class PublicKeyInfrastructure { + constructor(polykeyPath, fileSystem) { + var _a; + this.commonName = (_a = process.env.PK_HOST) !== null && _a !== void 0 ? _a : 'localhost'; + this.pkiPath = path_1.default.join(polykeyPath, '.pki'); + this.pkiFs = fileSystem; + this.loadMetadata(); + } + get CACertificates() { + return this.CAStore.listAllCertificates() + .map((c) => node_forge_1.pki.certificateToPem(c)) + .join('\n'); + } + get TLSClientCredentials() { + if (this.certificate) { + return { + privateKey: node_forge_1.pki.privateKeyToPem(this.keypair.privateKey), + certificate: node_forge_1.pki.certificateToPem(this.certificate), + rootCertificate: this.CACertificates, + }; + } + else { + return undefined; + } + } + get TLSServerCredentials() { + if (this.certificate) { + return { + privateKey: node_forge_1.pki.privateKeyToPem(this.keypair.privateKey), + certificate: node_forge_1.pki.certificateToPem(this.certificate), + rootCertificate: this.CACertificates, + }; + } + else { + return undefined; + } + } + get RootCert() { + return node_forge_1.pki.certificateToPem(this.rootCertificate); + } + // private createCACertificate( + createCACertificate(organizationName = 'MatrixAI') { + const certificate = node_forge_1.pki.createCertificate(); + certificate.publicKey = this.rootKeypair.publicKey; + certificate.serialNumber = '01'; + certificate.validity.notBefore = new Date(); + certificate.validity.notAfter = new Date(); + certificate.validity.notAfter.setFullYear(certificate.validity.notBefore.getFullYear() + 1); + const attrs = [ + { + name: 'commonName', + value: this.commonName, + }, + { + name: 'organizationName', + value: organizationName, + }, + ]; + certificate.setSubject(attrs); + certificate.setIssuer(attrs); + certificate.setExtensions([ + { + name: 'basicConstraints', + cA: true, + }, + { + name: 'keyUsage', + keyCertSign: true, + digitalSignature: true, + nonRepudiation: true, + keyEncipherment: true, + dataEncipherment: true, + }, + { + name: 'extKeyUsage', + serverAuth: true, + clientAuth: true, + codeSigning: true, + emailProtection: true, + timeStamping: true, + }, + { + name: 'nsCertType', + client: true, + server: true, + email: true, + objsign: true, + sslCA: true, + emailCA: true, + objCA: true, + }, + { + name: 'subjectKeyIdentifier', + }, + ]); + certificate.sign(this.rootKeypair.privateKey); + return certificate; + } + createCSR(commonName, challengePassword) { + // create a certification request (CSR) + const csr = node_forge_1.pki.createCertificationRequest(); + csr.serialNumber = '01'; + csr.publicKey = this.keypair.publicKey; + csr.setSubject([ + { + name: 'commonName', + value: commonName, + }, + { + name: 'countryName', + value: 'US', + }, + { + shortName: 'ST', + value: 'Virginia', + }, + { + name: 'localityName', + value: 'Blacksburg', + }, + { + name: 'organizationName', + value: 'Test', + }, + { + shortName: 'OU', + value: 'Test', + }, + ]); + // set (optional) attributes + csr.setAttributes([ + { + name: 'challengePassword', + value: 'password', + }, + { + name: 'unstructuredName', + value: 'My company', + }, + ]); + csr.sign(this.keypair.privateKey); + return node_forge_1.pki.certificationRequestToPem(csr); + } + createAgentServerCredentials() { + const keypair = node_forge_1.pki.rsa.generateKeyPair(); + // create a certification request (CSR) + const csr = node_forge_1.pki.createCertificationRequest(); + csr.serialNumber = '01'; + csr.publicKey = keypair.publicKey; + csr.setSubject([ + { + name: 'commonName', + value: 'localhost', + }, + { + name: 'countryName', + value: 'US', + }, + { + shortName: 'ST', + value: 'Virginia', + }, + { + name: 'localityName', + value: 'Blacksburg', + }, + { + name: 'organizationName', + value: 'Test', + }, + { + shortName: 'OU', + value: 'Test', + }, + ]); + // set (optional) attributes + csr.setAttributes([ + { + name: 'challengePassword', + value: 'password', + }, + { + name: 'unstructuredName', + value: 'My company', + }, + ]); + csr.sign(keypair.privateKey); + const csrPem = node_forge_1.pki.certificationRequestToPem(csr); + const cert = this.handleCSR(csrPem); + return { + serverCert: cert, + serverKeyPair: { + private: node_forge_1.pki.privateKeyToPem(keypair.privateKey), + public: node_forge_1.pki.publicKeyToPem(keypair.publicKey), + }, + }; + } + createAgentClientCredentials() { + const keypair = node_forge_1.pki.rsa.generateKeyPair(); + // create a certification request (CSR) + const csr = node_forge_1.pki.createCertificationRequest(); + csr.serialNumber = '01'; + csr.publicKey = keypair.publicKey; + csr.setSubject([ + { + name: 'commonName', + value: 'localhost', + }, + { + name: 'countryName', + value: 'US', + }, + { + shortName: 'ST', + value: 'Virginia', + }, + { + name: 'localityName', + value: 'Blacksburg', + }, + { + name: 'organizationName', + value: 'Test', + }, + { + shortName: 'OU', + value: 'Test', + }, + ]); + // set (optional) attributes + csr.setAttributes([ + { + name: 'challengePassword', + value: 'password', + }, + { + name: 'unstructuredName', + value: 'My company', + }, + ]); + csr.sign(keypair.privateKey); + const csrPem = node_forge_1.pki.certificationRequestToPem(csr); + const cert = this.handleCSR(csrPem); + return { + clientCert: cert, + clientKeyPair: { + private: node_forge_1.pki.privateKeyToPem(keypair.privateKey), + public: node_forge_1.pki.publicKeyToPem(keypair.publicKey), + }, + }; + } + importCertificate(certString) { + this.certificate = node_forge_1.pki.certificateFromPem(certString); + } + addCA(certString) { + this.CAStore.addCertificate(certString); + } + handleCSR(csrPem) { + var _a; + const csr = node_forge_1.pki.certificationRequestFromPem(csrPem); + // verify certification request + try { + if (!csr.verify(csr)) { + throw new Error('Signature not verified.'); + } + } + catch (err) { + throw new Error('Signature not verified.'); + } + // TODO validate challenge password + const challengePassword = csr.getAttribute({ name: 'challengePassword' }); + const cert = node_forge_1.pki.createCertificate(); + cert.serialNumber = '01'; + cert.validity.notBefore = new Date(); + cert.validity.notAfter = new Date(); + cert.validity.notAfter.setFullYear(cert.validity.notBefore.getFullYear() + 1); + cert.setSubject(csr.subject.attributes); + cert.setIssuer(this.rootCertificate.issuer.attributes); + cert.publicKey = csr.publicKey; + cert.setExtensions([ + ...((_a = csr.extensions) !== null && _a !== void 0 ? _a : []), + { + name: 'basicConstraints', + cA: true, + }, + { + name: 'keyUsage', + keyCertSign: true, + digitalSignature: true, + nonRepudiation: true, + keyEncipherment: true, + dataEncipherment: true, + }, + { + name: 'extKeyUsage', + serverAuth: true, + clientAuth: true, + codeSigning: true, + emailProtection: true, + timeStamping: true, + }, + { + name: 'nsCertType', + client: true, + server: true, + email: true, + objsign: true, + sslCA: true, + emailCA: true, + objCA: true, + }, + { + name: 'subjectKeyIdentifier', + }, + ]); + // sign certificate + cert.sign(this.rootKeypair.privateKey); + // return certificate in pem form + return node_forge_1.pki.certificateToPem(cert); + } + // ===== Helper methods ===== // + loadMetadata() { + if (this.pkiFs) { + // make the pkiPath directory + this.pkiFs.mkdirSync(this.pkiPath, { recursive: true }); + // load keypair + const keypairPath = path_1.default.join(this.pkiPath, 'keypair'); + if (this.pkiFs.existsSync(keypairPath)) { + this.keypair = this.jsonToKeyPair(this.pkiFs.readFileSync(keypairPath).toString()); + } + else { + // create the keypair if it doesn't exist + this.keypair = node_forge_1.pki.rsa.generateKeyPair(); + } + // load root keypair + const rootKeypairPath = path_1.default.join(this.pkiPath, 'root_keypair'); + if (this.pkiFs.existsSync(rootKeypairPath)) { + this.rootKeypair = this.jsonToKeyPair(this.pkiFs.readFileSync(rootKeypairPath).toString()); + } + else { + // create the keypair if it doesn't exist + this.rootKeypair = node_forge_1.pki.rsa.generateKeyPair(); + } + // load certificate + const certificatePath = path_1.default.join(this.pkiPath, 'certificate'); + if (this.pkiFs.existsSync(certificatePath)) { + this.certificate = node_forge_1.pki.certificateFromPem(this.pkiFs.readFileSync(certificatePath).toString()); + } + // load root certificate + const rootCertificatePath = path_1.default.join(this.pkiPath, 'root_certificate'); + if (this.pkiFs.existsSync(rootCertificatePath)) { + this.rootCertificate = node_forge_1.pki.certificateFromPem(this.pkiFs.readFileSync(rootCertificatePath).toString()); + } + else { + // create the certificate if it doesn't exist + this.rootCertificate = this.createCACertificate(); + } + // CA store + const parsedCertificates = []; + const caStorePath = path_1.default.join(this.pkiPath, 'ca_store_certificates'); + if (this.pkiFs.existsSync(caStorePath)) { + const certificates = JSON.parse(this.pkiFs.readFileSync(caStorePath).toString()); + parsedCertificates.push(...certificates.map((c) => node_forge_1.pki.certificateFromPem(c))); + } + this.CAStore = node_forge_1.pki.createCaStore(parsedCertificates); + // this is a little recursive but necessary since we initialize all the variables if they are empty in this method + this.writeMetadata(); + } + } + writeMetadata() { + if (this.pkiFs) { + // write keypairs + this.pkiFs.writeFileSync(path_1.default.join(this.pkiPath, 'keypair'), Buffer.from(this.keyPairToJSON(this.keypair))); + this.pkiFs.writeFileSync(path_1.default.join(this.pkiPath, 'root_keypair'), Buffer.from(this.keyPairToJSON(this.rootKeypair))); + // write certificates + if (this.certificate) { + this.pkiFs.writeFileSync(path_1.default.join(this.pkiPath, 'certificate'), Buffer.from(node_forge_1.pki.certificateToPem(this.certificate))); + } + this.pkiFs.writeFileSync(path_1.default.join(this.pkiPath, 'root_certificate'), Buffer.from(node_forge_1.pki.certificateToPem(this.rootCertificate))); + // write ca store + const certsJson = JSON.stringify(this.CAStore.listAllCertificates().map((c) => node_forge_1.pki.certificateToPem(c))); + this.pkiFs.writeFileSync(path_1.default.join(this.pkiPath, 'ca_store_certificates'), certsJson); + } + } + // === Helper Methods === // + keyPairToJSON(keypair) { + const obj = { + privateKey: node_forge_1.pki.privateKeyToPem(keypair.privateKey), + publicKey: node_forge_1.pki.publicKeyToPem(keypair.publicKey), + }; + return JSON.stringify(obj); + } + jsonToKeyPair(json) { + const obj = JSON.parse(json); + return { + privateKey: node_forge_1.pki.privateKeyFromPem(obj.privateKey), + publicKey: node_forge_1.pki.publicKeyFromPem(obj.publicKey), + }; + } +} +exports.default = PublicKeyInfrastructure; + + +/***/ }), +/* 35 */ /***/ (function(module, exports) { -module.exports = require("util"); +module.exports = require("node-forge"); /***/ }), -/* 31 */ +/* 36 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2531,13 +2574,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const os_1 = __importDefault(__webpack_require__(4)); -const path_1 = __importDefault(__webpack_require__(1)); -const TurnClient_1 = __importDefault(__webpack_require__(32)); +const path_1 = __importDefault(__webpack_require__(0)); +const TurnClient_1 = __importDefault(__webpack_require__(37)); const Peer_1 = __webpack_require__(2); -const PeerInfo_1 = __importDefault(__webpack_require__(0)); -const PeerServer_1 = __importDefault(__webpack_require__(37)); -const PeerConnection_1 = __importDefault(__webpack_require__(40)); -const MulticastBroadcaster_1 = __importDefault(__webpack_require__(41)); +const PeerInfo_1 = __importDefault(__webpack_require__(1)); +const PeerServer_1 = __importDefault(__webpack_require__(42)); +const PeerConnection_1 = __importDefault(__webpack_require__(45)); +const MulticastBroadcaster_1 = __importDefault(__webpack_require__(46)); const keybaseDiscovery = { name: 'Keybase', findUser: async (handle, service) => { @@ -2672,10 +2715,10 @@ class PeerManager { } /** * Finds an existing peer given a social service and handle - * @param handle Username or handle of the user (e.g. @john-smith) - * @param service Service on which to search for the user (e.g. github) + * @param username Username (e.g. @github/john-smith) */ async findSocialUser(handle, service, timeout) { + // parse with regex const tasks = this.socialDiscoveryServices.map((s) => s.findUser(handle, service)); const pubKeyOrFail = await Promise.race(tasks); if (!pubKeyOrFail) { @@ -2732,19 +2775,19 @@ class PeerManager { this.fileSystem.writeFileSync(this.peerStoreMetadataPath, peerStoreMetadata); } loadMetadata() { - var _a, _b; + var _a, _b, _c; // load peer info if path exists if (this.fileSystem.existsSync(this.peerInfoMetadataPath)) { const metadata = this.fileSystem.readFileSync(this.peerInfoMetadataPath); - const { publicKey, peerAddress, relayPublicKey } = Peer_1.peerInterface.PeerInfoMessage.decodeDelimited(metadata); - this.peerInfo = new PeerInfo_1.default(publicKey, peerAddress, relayPublicKey); + const { publicKey, relayPublicKey, peerAddress, apiAddress } = Peer_1.peerInterface.PeerInfoMessage.decodeDelimited(metadata); + this.peerInfo = new PeerInfo_1.default(publicKey, relayPublicKey, peerAddress, apiAddress); } // load peer store if path exists if (this.fileSystem.existsSync(this.peerStoreMetadataPath)) { const metadata = this.fileSystem.readFileSync(this.peerStoreMetadataPath); const { peerInfoList } = Peer_1.peerInterface.PeerInfoListMessage.decodeDelimited(metadata); for (const peerInfoMessage of peerInfoList) { - const peerInfo = new PeerInfo_1.default(peerInfoMessage.publicKey, (_a = peerInfoMessage.peerAddress) !== null && _a !== void 0 ? _a : undefined, (_b = peerInfoMessage.relayPublicKey) !== null && _b !== void 0 ? _b : undefined); + const peerInfo = new PeerInfo_1.default(peerInfoMessage.publicKey, (_a = peerInfoMessage.relayPublicKey) !== null && _a !== void 0 ? _a : undefined, (_b = peerInfoMessage.peerAddress) !== null && _b !== void 0 ? _b : undefined, (_c = peerInfoMessage.apiAddress) !== null && _c !== void 0 ? _c : undefined); this.peerStore.set(peerInfo.publicKey, peerInfo); } } @@ -2754,7 +2797,7 @@ exports.default = PeerManager; /***/ }), -/* 32 */ +/* 37 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2764,12 +2807,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); // adapted from https://github.com/advance512/nat-traversal -const net_1 = __importDefault(__webpack_require__(5)); +const net_1 = __importDefault(__webpack_require__(7)); const events_1 = __webpack_require__(3); -const PeerInfo_1 = __webpack_require__(0); +const PeerInfo_1 = __webpack_require__(1); const Peer_1 = __webpack_require__(2); const Peer_pb_1 = __webpack_require__(8); -const UDPHolePunchClient_1 = __importDefault(__webpack_require__(33)); +const UDPHolePunchClient_1 = __importDefault(__webpack_require__(38)); let socketPipeId = 1; class SocketPipe extends events_1.EventEmitter { constructor(localAddress, relayAddress) { @@ -2995,7 +3038,7 @@ exports.default = TurnClient; /***/ }), -/* 33 */ +/* 38 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3005,11 +3048,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const net_1 = __importDefault(__webpack_require__(5)); -const PeerInfo_1 = __webpack_require__(0); +const net_1 = __importDefault(__webpack_require__(7)); +const PeerInfo_1 = __webpack_require__(1); const Peer_1 = __webpack_require__(2); -const UDPToTCPSocketPipe_1 = __importDefault(__webpack_require__(34)); -const TCPToUDPSocketPipe_1 = __importDefault(__webpack_require__(36)); +const UDPToTCPSocketPipe_1 = __importDefault(__webpack_require__(39)); +const TCPToUDPSocketPipe_1 = __importDefault(__webpack_require__(41)); const MicroTransportProtocol_1 = __webpack_require__(10); class UDPHolePunchClient { constructor(peerManager) { @@ -3068,7 +3111,7 @@ exports.default = UDPHolePunchClient; /***/ }), -/* 34 */ +/* 39 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3181,13 +3224,13 @@ exports.default = UDPToTCPSocketPipe; /***/ }), -/* 35 */ +/* 40 */ /***/ (function(module, exports) { module.exports = require("cyclist"); /***/ }), -/* 36 */ +/* 41 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3196,7 +3239,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const net_1 = __importDefault(__webpack_require__(5)); +const net_1 = __importDefault(__webpack_require__(7)); const events_1 = __webpack_require__(3); let socketPipeId = 1; class TCPToUDPSocketPipe extends events_1.EventEmitter { @@ -3307,7 +3350,7 @@ exports.default = TCPToUDPSocketPipe; /***/ }), -/* 37 */ +/* 42 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3323,15 +3366,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const PeerInfo_1 = __webpack_require__(0); -const grpc = __importStar(__webpack_require__(14)); -const TurnServer_1 = __importDefault(__webpack_require__(38)); +const PeerInfo_1 = __webpack_require__(1); +const grpc = __importStar(__webpack_require__(11)); +const TurnServer_1 = __importDefault(__webpack_require__(43)); const utils_1 = __webpack_require__(6); -const Peer_grpc_pb_1 = __webpack_require__(15); +const Peer_grpc_pb_1 = __webpack_require__(16); const Peer_pb_1 = __webpack_require__(8); class PeerServer { constructor(peerManager, keyManager) { - var _a, _b, _c; + var _a, _b, _c, _d, _e, _f, _g, _h, _j; this.started = false; this.peerManager = peerManager; this.keyManager = keyManager; @@ -3339,31 +3382,32 @@ class PeerServer { // GRPC Server // ///////////////// this.server = new grpc.Server(); - this.server.addService(Peer_grpc_pb_1.PeerService, { - messagePeer: this.messagePeer.bind(this), - }); + this.server.addService(Peer_grpc_pb_1.PeerService, this); // Create the server credentials. SSL only if ca cert exists - const pkiInfo = this.keyManager.PKIInfo; - if (pkiInfo.caCert && pkiInfo.cert && pkiInfo.key) { - this.credentials = grpc.ServerCredentials.createSsl(pkiInfo.caCert, [ + const credentials = (_a = this.keyManager.pki) === null || _a === void 0 ? void 0 : _a.TLSServerCredentials; + if (credentials) { + this.credentials = grpc.ServerCredentials.createSsl(Buffer.from(credentials.rootCertificate), [ { - private_key: pkiInfo.key, - cert_chain: pkiInfo.cert, + private_key: Buffer.from(credentials.privateKey), + cert_chain: Buffer.from(credentials.certificate), }, ], true); } else { this.credentials = grpc.ServerCredentials.createInsecure(); } - const port = (_c = (_a = process.env.PK_PORT) !== null && _a !== void 0 ? _a : (_b = this.peerManager.peerInfo.peerAddress) === null || _b === void 0 ? void 0 : _b.port) !== null && _c !== void 0 ? _c : 0; - this.server.bindAsync(`0.0.0.0:${port}`, this.credentials, async (err, boundPort) => { + const port = (_e = (_b = process.env.PK_PORT) !== null && _b !== void 0 ? _b : (_d = (_c = this.peerManager.peerInfo) === null || _c === void 0 ? void 0 : _c.peerAddress) === null || _d === void 0 ? void 0 : _d.port) !== null && _e !== void 0 ? _e : 0; + const host = (_j = (_f = process.env.PK_HOST) !== null && _f !== void 0 ? _f : (_h = (_g = this.peerManager.peerInfo) === null || _g === void 0 ? void 0 : _g.peerAddress) === null || _h === void 0 ? void 0 : _h.host) !== null && _j !== void 0 ? _j : 'localhost'; + this.server.bindAsync(`${host}:${port}`, this.credentials, async (err, boundPort) => { if (err) { throw err; } else { - const address = new PeerInfo_1.Address('0.0.0.0', boundPort); + const address = new PeerInfo_1.Address(host, boundPort); this.server.start(); - this.peerManager.peerInfo.peerAddress = address; + if (this.peerManager.peerInfo) { + this.peerManager.peerInfo.peerAddress = address; + } console.log(`Peer Server running on: ${address}`); this.started = true; this.turnServer = new TurnServer_1.default(this.peerManager); @@ -3372,13 +3416,13 @@ class PeerServer { } async messagePeer(call, callback) { const peerRequest = call.request; - const { publickey: publickey, type, submessage } = peerRequest.toObject(); + const { publicKey, type, subMessage: requestMessage } = peerRequest.toObject(); // if we don't know publicKey, end connection - if (!this.peerManager.hasPeer(publickey)) { + if (!this.peerManager.hasPeer(publicKey)) { throw Error('unknown public key'); } // verify and decrypt request - const verifiedMessage = await this.keyManager.verifyData(Buffer.from(submessage), Buffer.from(publickey)); + const verifiedMessage = await this.keyManager.verifyData(Buffer.from(requestMessage), Buffer.from(publicKey)); const decryptedMessage = await this.keyManager.decryptData(verifiedMessage); const request = utils_1.stringToProtobuf(decryptedMessage.toString()); let response; @@ -3387,7 +3431,7 @@ class PeerServer { response = await this.handlePing(request); break; case Peer_pb_1.SubServiceType.GIT: - response = await this.handleGitRequest(request, publickey); + response = await this.handleGitRequest(request, publicKey); break; case Peer_pb_1.SubServiceType.NAT_TRAVERSAL: response = await this.handleNatRequest(request); @@ -3396,14 +3440,14 @@ class PeerServer { throw Error('peer message type not identified'); } // encrypt and sign response - const encryptedResponse = await this.keyManager.encryptData(Buffer.from(utils_1.protobufToString(response)), Buffer.from(publickey)); + const encryptedResponse = await this.keyManager.encryptData(Buffer.from(utils_1.protobufToString(response)), Buffer.from(publicKey)); const signedResponse = await this.keyManager.signData(encryptedResponse); const subMessage = signedResponse.toString(); // composes peer message const peerResponse = new Peer_pb_1.PeerMessage(); - peerResponse.setPublickey(this.peerManager.peerInfo.publicKey); + peerResponse.setPublicKey(this.peerManager.peerInfo.publicKey); peerResponse.setType(type); - peerResponse.setSubmessage(subMessage); + peerResponse.setSubMessage(subMessage); // return peer response callback(null, peerResponse); } @@ -3416,7 +3460,7 @@ exports.default = PeerServer; /***/ }), -/* 38 */ +/* 43 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3426,11 +3470,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); // adapted from https://github.com/advance512/nat-traversal -const PeerInfo_1 = __webpack_require__(0); +const PeerInfo_1 = __webpack_require__(1); const events_1 = __webpack_require__(3); -const net_1 = __importDefault(__webpack_require__(5)); +const net_1 = __importDefault(__webpack_require__(7)); const Peer_1 = __webpack_require__(2); -const UDPHolePunchServer_1 = __importDefault(__webpack_require__(39)); +const UDPHolePunchServer_1 = __importDefault(__webpack_require__(44)); class SocketPipe extends events_1.EventEmitter { constructor(serverSocket, id) { super(); @@ -3659,7 +3703,7 @@ exports.default = TurnServer; /***/ }), -/* 39 */ +/* 44 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3668,7 +3712,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const PeerInfo_1 = __importDefault(__webpack_require__(0)); +const PeerInfo_1 = __importDefault(__webpack_require__(1)); const Peer_1 = __webpack_require__(2); const MicroTransportProtocol_1 = __webpack_require__(10); class UDPHolePunchServer { @@ -3709,7 +3753,7 @@ exports.default = UDPHolePunchServer; /***/ }), -/* 40 */ +/* 45 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3725,21 +3769,22 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", { value: true }); -const PeerInfo_1 = __importDefault(__webpack_require__(0)); -const crypto_1 = __webpack_require__(12); -const grpc = __importStar(__webpack_require__(14)); +const PeerInfo_1 = __importDefault(__webpack_require__(1)); +const crypto_1 = __webpack_require__(13); +const grpc = __importStar(__webpack_require__(11)); const utils_1 = __webpack_require__(6); -const Peer_grpc_pb_1 = __webpack_require__(15); +const Peer_grpc_pb_1 = __webpack_require__(16); const Peer_pb_1 = __webpack_require__(8); class PeerConnection { constructor(publicKey, keyManager, peerManager) { + var _a; this.connected = false; this.publicKey = publicKey; this.keyManager = keyManager; this.peerManager = peerManager; - const pkiInfo = keyManager.PKIInfo; - if (pkiInfo.caCert && pkiInfo.cert && pkiInfo.key) { - this.credentials = grpc.credentials.createSsl(pkiInfo.caCert, pkiInfo.key, pkiInfo.cert); + const credentials = (_a = this.keyManager.pki) === null || _a === void 0 ? void 0 : _a.TLSClientCredentials; + if (credentials) { + this.credentials = grpc.ChannelCredentials.createSsl(Buffer.from(credentials.rootCertificate), Buffer.from(credentials.privateKey), Buffer.from(credentials.certificate)); } else { this.credentials = grpc.credentials.createInsecure(); @@ -3795,11 +3840,31 @@ class PeerConnection { throw Error('peer is already connected'); } } + async connectFirstChannel() { + return await new Promise((resolve, reject) => { + const promiseList = [this.connectDirectly(), this.connectHolePunch(), this.connectRelay()]; + const errorList = []; + for (const promise of promiseList) { + promise + .then((p) => { + resolve(p); + }) + .catch((error) => null); + promise.catch((error) => { + errorList.push(error); + // check if all have failed + if (errorList.length == promiseList.length) { + reject(errorList); + } + }); + } + }); + } async connect() { // connect if not already connected if (!this.connected) { try { - this.peerClient = await utils_1.promiseAny([this.connectDirectly(), this.connectHolePunch(), this.connectRelay()]); + this.peerClient = await this.connectFirstChannel(); } catch (error) { console.log(error); @@ -3888,20 +3953,20 @@ class PeerConnection { const subMessage = signedMessage.toString(); // encode and send message const peerRequest = new Peer_pb_1.PeerMessage(); - peerRequest.setPublickey(this.peerManager.peerInfo.publicKey); + peerRequest.setPublicKey(this.peerManager.peerInfo.publicKey); peerRequest.setType(type); - peerRequest.setSubmessage(subMessage); + peerRequest.setSubMessage(subMessage); return peerRequest; } async decodeResponse(response) { - const { publickey, type: responseType, submessage } = response.toObject(); + const { publicKey, type: responseType, subMessage } = response.toObject(); // decode peerResponse - if (PeerInfo_1.default.formatPublicKey(this.getPeerInfo().publicKey) != PeerInfo_1.default.formatPublicKey(publickey)) { + if (PeerInfo_1.default.formatPublicKey(this.getPeerInfo().publicKey) != PeerInfo_1.default.formatPublicKey(publicKey)) { // drop packet throw Error('response public key does not match request public key'); } // verify response - const verifiedResponse = await this.keyManager.verifyData(Buffer.from(submessage), Buffer.from(publickey)); + const verifiedResponse = await this.keyManager.verifyData(Buffer.from(subMessage), Buffer.from(publicKey)); // decrypt response const decryptedResponse = await this.keyManager.decryptData(verifiedResponse); const responseBuffer = utils_1.stringToProtobuf(decryptedResponse.toString()); @@ -3912,7 +3977,7 @@ exports.default = PeerConnection; /***/ }), -/* 41 */ +/* 46 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3922,8 +3987,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; var _a, _b; Object.defineProperty(exports, "__esModule", { value: true }); -const dgram_1 = __importDefault(__webpack_require__(13)); -const PeerInfo_1 = __importDefault(__webpack_require__(0)); +const dgram_1 = __importDefault(__webpack_require__(15)); +const PeerInfo_1 = __importDefault(__webpack_require__(1)); const events_1 = __webpack_require__(3); const Peer_1 = __webpack_require__(2); const utils_1 = __webpack_require__(6); @@ -4010,9 +4075,9 @@ class MulticastBroadcaster extends events_1.EventEmitter { // verify the subMessage const verifiedMessage = await this.keyManager.verifyData(subMessage, Buffer.from(signingKey)); const encodedMessage = utils_1.stringToProtobuf(verifiedMessage.toString()); - const { publicKey, peerAddress, relayPublicKey } = Peer_1.peerInterface.PeerInfoMessage.decodeDelimited(encodedMessage); + const { publicKey, relayPublicKey, peerAddress, apiAddress } = Peer_1.peerInterface.PeerInfoMessage.decodeDelimited(encodedMessage); // construct a peer info object - const peerInfo = new PeerInfo_1.default(publicKey, peerAddress, relayPublicKey); + const peerInfo = new PeerInfo_1.default(publicKey, relayPublicKey, peerAddress, apiAddress); // update the peer store this.peerManager.updatePeer(peerInfo); this.emit('found', publicKey); @@ -4027,7 +4092,7 @@ exports.default = MulticastBroadcaster; /***/ }), -/* 42 */ +/* 47 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4037,12 +4102,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const os_1 = __importDefault(__webpack_require__(4)); -const path_1 = __importDefault(__webpack_require__(1)); -const isomorphic_git_1 = __importDefault(__webpack_require__(16)); -const Vault_1 = __importDefault(__webpack_require__(43)); -const encryptedfs_1 = __webpack_require__(17); -const GitBackend_1 = __importDefault(__webpack_require__(45)); -const GitFrontend_1 = __importDefault(__webpack_require__(57)); +const path_1 = __importDefault(__webpack_require__(0)); +const isomorphic_git_1 = __importDefault(__webpack_require__(17)); +const Vault_1 = __importDefault(__webpack_require__(48)); +const encryptedfs_1 = __webpack_require__(18); +const GitBackend_1 = __importDefault(__webpack_require__(50)); +const GitFrontend_1 = __importDefault(__webpack_require__(62)); class VaultManager { constructor(polykeyPath = `${os_1.default.homedir()}/.polykey`, fileSystem, keyManager, peerManager) { this.polykeyPath = polykeyPath; @@ -4059,10 +4124,13 @@ class VaultManager { this.gitFrontend = new GitFrontend_1.default(peerManager); this.peerManager.setGitHandler(this.gitBackend.handleGitMessage.bind(this.gitBackend)); // Read in vault keys - this.loadMetadata(); + this.loadEncryptedMetadata(); } + /** + * Get the names of all vaults in memory + */ getVaultNames(publicKey) { - const vaultNames = Object.keys(this.vaults); + const vaultNames = Array.from(this.vaults.keys()); if (publicKey) { const allowedVaultNames = []; for (const vaultName of vaultNames) { @@ -4098,11 +4166,11 @@ class VaultManager { } } /** - * Get a vault from the vault manager + * Create a new vault * @param vaultName Unique name of new vault * @param key Optional key to use for the vault encryption, otherwise it is generated */ - async createVault(vaultName, key) { + async newVault(vaultName, key) { if (this.vaultExists(vaultName)) { throw Error('Vault already exists!'); } @@ -4121,40 +4189,22 @@ class VaultManager { vaultKey = key; } this.vaultKeys.set(vaultName, vaultKey); - this.writeMetadata(); + await this.writeEncryptedMetadata(); // Create vault const vault = new Vault_1.default(vaultName, vaultKey, this.polykeyPath, this.gitFrontend); - // Init repository for vault - const efs = vault.EncryptedFS; - const fileSystem = { promises: efs.promises }; - await isomorphic_git_1.default.init({ - fs: fileSystem, - dir: vaultPath, - }); - // Initial commit - await isomorphic_git_1.default.commit({ - fs: fileSystem, - dir: vaultPath, - author: { - name: vaultName, - }, - message: 'init commit', - }); - // Write packed-refs file because isomorphic git goes searching for it - // and apparently its not autogenerated - efs.writeFileSync(path_1.default.join(vaultPath, '.git', 'packed-refs'), '# pack-refs with: peeled fully-peeled sorted'); + await vault.initializeVault(); // Set vault this.vaults.set(vaultName, vault); return this.getVault(vaultName); } catch (err) { // Delete vault dir and garbage collect - this.destroyVault(vaultName); + await this.deleteVault(vaultName); throw err; } } /** - * Get a vault from the vault manager + * Clone a vault from a peer * @param vaultName Name of vault to be cloned * @param address Address of polykey node that owns vault to be cloned * @param getSocket Function to get an active connection to provided address @@ -4178,7 +4228,7 @@ class VaultManager { // Generate new key const vaultKey = await this.keyManager.generateKey(`${vaultName}-Key`, this.keyManager.getPrivateKey()); // Set filesystem - const vfsInstance = new (__webpack_require__(18).VirtualFS)(); + const vfsInstance = new (__webpack_require__(19).VirtualFS)(); const newEfs = new encryptedfs_1.EncryptedFS(vaultKey, vfsInstance, vfsInstance, this.fileSystem, process); // Clone vault from address await isomorphic_git_1.default.clone({ @@ -4199,6 +4249,15 @@ class VaultManager { const vaultNameList = await gitRequest.scanVaults(); return vaultNameList; } + /** + * Pull a vault from a specific peer + * @param vaultName Name of vault to be pulled + * @param publicKey Public key of polykey node that owns vault to be pulled + */ + async pullVault(vaultName, publicKey) { + const vault = this.getVault(vaultName); + await vault.pullVault(publicKey); + } /** * Determines whether the vault exists * @param vaultName Name of desired vault @@ -4212,10 +4271,10 @@ class VaultManager { * [WARNING] Destroys a certain vault and all its secrets * @param vaultName Name of vault to be destroyed */ - destroyVault(vaultName) { + async deleteVault(vaultName) { // this is convenience function for removing all tags // and triggering garbage collection - // destruction is a better word as we should ensure all traces is removed + // destruction is a better word as we should ensure all traces are removed const vaultPath = path_1.default.join(this.polykeyPath, vaultName); // Remove directory on file system if (this.fileSystem.existsSync(vaultPath)) { @@ -4225,18 +4284,12 @@ class VaultManager { this.vaults.delete(vaultName); this.vaultKeys.delete(vaultName); // Write to metadata file - this.writeMetadata(); + await this.writeEncryptedMetadata(); const vaultPathExists = this.fileSystem.existsSync(vaultPath); if (vaultPathExists) { - throw Error('Vault folder could not be destroyed!'); + throw Error('Vault folder could not be deleted!'); } } - /** - * List the names of all vaults in memory - */ - listVaults() { - return Array.from(this.vaults.keys()); - } /* ============ HELPERS =============== */ validateVault(vaultName) { if (!this.vaults.has(vaultName)) { @@ -4250,12 +4303,12 @@ class VaultManager { throw Error(`vault directory does not exist: '${vaultPath}'`); } } - async writeMetadata() { + async writeEncryptedMetadata() { const metadata = JSON.stringify([...this.vaultKeys]); const encryptedMetadata = await this.keyManager.encryptData(Buffer.from(metadata)); await this.fileSystem.promises.writeFile(this.metadataPath, encryptedMetadata); } - async loadMetadata() { + async loadEncryptedMetadata() { // Check if file exists if (this.fileSystem.existsSync(this.metadataPath) && this.keyManager.identityLoaded) { const encryptedMetadata = this.fileSystem.readFileSync(this.metadataPath); @@ -4265,6 +4318,8 @@ class VaultManager { } // Initialize vaults in memory for (const [vaultName, vaultKey] of this.vaultKeys.entries()) { + console.log(vaultName); + console.log(vaultKey); const vaultPath = path_1.default.join(this.polykeyPath, vaultName); if (this.fileSystem.existsSync(vaultPath)) { const vault = new Vault_1.default(vaultName, vaultKey, this.polykeyPath, this.gitFrontend); @@ -4278,7 +4333,7 @@ exports.default = VaultManager; /***/ }), -/* 43 */ +/* 48 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4287,11 +4342,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const fs_1 = __importDefault(__webpack_require__(7)); -const path_1 = __importDefault(__webpack_require__(1)); -const isomorphic_git_1 = __importDefault(__webpack_require__(16)); -const async_mutex_1 = __webpack_require__(44); -const encryptedfs_1 = __webpack_require__(17); +const fs_1 = __importDefault(__webpack_require__(5)); +const path_1 = __importDefault(__webpack_require__(0)); +const isomorphic_git_1 = __importDefault(__webpack_require__(17)); +const async_mutex_1 = __webpack_require__(49); +const encryptedfs_1 = __webpack_require__(18); class Vault { constructor(name, symKey, baseDir, gitFrontend) { // Concurrency @@ -4300,7 +4355,7 @@ class Vault { // do we use the same gpg pub/priv keypair this.key = symKey; // Set filesystem - const vfsInstance = new (__webpack_require__(18).VirtualFS)(); + const vfsInstance = new (__webpack_require__(19).VirtualFS)(); this.efs = new encryptedfs_1.EncryptedFS(this.key, vfsInstance, vfsInstance, fs_1.default, process); this.name = name; this.vaultPath = path_1.default.join(baseDir, name); @@ -4313,6 +4368,40 @@ class Vault { this.metadataPath = path_1.default.join(this.vaultPath, '.vault', 'metadata'); this.loadMetadata(); } + async initializeVault() { + // Init repository for vault + const efs = this.EncryptedFS; + const fileSystem = { promises: efs.promises }; + // first make sure its not already initialized + try { + const statusMatrix = await isomorphic_git_1.default.statusMatrix({ + fs: fileSystem, + dir: this.vaultPath, + }); + if (statusMatrix == undefined) { + return; + } + } + catch (error) { + return; + } + await isomorphic_git_1.default.init({ + fs: fileSystem, + dir: this.vaultPath, + }); + // Initial commit + await isomorphic_git_1.default.commit({ + fs: fileSystem, + dir: this.vaultPath, + author: { + name: this.name, + }, + message: 'init commit', + }); + // Write packed-refs file because isomorphic git goes searching for it + // and apparently its not autogenerated + efs.writeFileSync(path_1.default.join(this.vaultPath, '.git', 'packed-refs'), '# pack-refs with: peeled fully-peeled sorted'); + } /** * Returns the Encrypted File System used for vault operations */ @@ -4585,13 +4674,13 @@ exports.default = Vault; /***/ }), -/* 44 */ +/* 49 */ /***/ (function(module, exports) { module.exports = require("async-mutex"); /***/ }), -/* 45 */ +/* 50 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4600,12 +4689,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const path_1 = __importDefault(__webpack_require__(1)); -const Git_1 = __webpack_require__(19); +const path_1 = __importDefault(__webpack_require__(0)); +const Git_1 = __webpack_require__(20); const readable_stream_1 = __webpack_require__(9); -const uploadPack_1 = __importDefault(__webpack_require__(46)); -const GitSideBand_1 = __importDefault(__webpack_require__(48)); -const packObjects_1 = __importDefault(__webpack_require__(50)); +const uploadPack_1 = __importDefault(__webpack_require__(51)); +const GitSideBand_1 = __importDefault(__webpack_require__(53)); +const packObjects_1 = __importDefault(__webpack_require__(55)); // Here is the protocol git outlines for sending pack files over http: // https://git-scm.com/docs/pack-protocol/2.17.0 // https://github.com/git/git/blob/master/Documentation/technical/pack-protocol.txt @@ -4717,7 +4806,7 @@ exports.default = GitBackend; /***/ }), -/* 46 */ +/* 51 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4726,9 +4815,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const path_1 = __importDefault(__webpack_require__(1)); -const GitPktLine_1 = __importDefault(__webpack_require__(20)); -const GitRefManager_1 = __importDefault(__webpack_require__(21)); +const path_1 = __importDefault(__webpack_require__(0)); +const GitPktLine_1 = __importDefault(__webpack_require__(21)); +const GitRefManager_1 = __importDefault(__webpack_require__(22)); async function writeRefsAdResponse({ capabilities, refs, symrefs }) { const stream = []; // Compose capabilities string @@ -4778,7 +4867,7 @@ exports.default = uploadPack; /***/ }), -/* 47 */ +/* 52 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4825,7 +4914,7 @@ exports.default = GitPackedRefs; /***/ }), -/* 48 */ +/* 53 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4855,9 +4944,9 @@ information. If no 'side-band' capability was specified, the server will stream the entire packfile without multiplexing. */ -const buffer_1 = __webpack_require__(49); +const buffer_1 = __webpack_require__(54); const readable_stream_1 = __webpack_require__(9); -const GitPktLine_1 = __importDefault(__webpack_require__(20)); +const GitPktLine_1 = __importDefault(__webpack_require__(21)); function splitBuffer(buffer, maxBytes) { const result = []; let index = 0; @@ -4982,13 +5071,13 @@ exports.default = GitSideBand; /***/ }), -/* 49 */ +/* 54 */ /***/ (function(module, exports) { module.exports = require("buffer"); /***/ }), -/* 50 */ +/* 55 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4997,14 +5086,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const pako_1 = __importDefault(__webpack_require__(22)); -const path_1 = __importDefault(__webpack_require__(1)); -const log_1 = __importDefault(__webpack_require__(51)); -const GitTree_1 = __importDefault(__webpack_require__(55)); -const sha_js_1 = __importDefault(__webpack_require__(56)); -const GitCommit_1 = __importDefault(__webpack_require__(23)); +const pako_1 = __importDefault(__webpack_require__(23)); +const path_1 = __importDefault(__webpack_require__(0)); +const log_1 = __importDefault(__webpack_require__(56)); +const GitTree_1 = __importDefault(__webpack_require__(60)); +const sha_js_1 = __importDefault(__webpack_require__(61)); +const GitCommit_1 = __importDefault(__webpack_require__(24)); const readable_stream_1 = __webpack_require__(9); -const GitObjectManager_1 = __importDefault(__webpack_require__(24)); +const GitObjectManager_1 = __importDefault(__webpack_require__(25)); const types = { commit: 0b0010000, tree: 0b0100000, @@ -5163,7 +5252,7 @@ exports.default = packObjects; /***/ }), -/* 51 */ +/* 56 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5172,10 +5261,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const path = __webpack_require__(1); -const GitCommit_1 = __importDefault(__webpack_require__(23)); -const GitObjectManager_1 = __importDefault(__webpack_require__(24)); -const GitRefManager_1 = __importDefault(__webpack_require__(21)); +const path = __webpack_require__(0); +const GitCommit_1 = __importDefault(__webpack_require__(24)); +const GitObjectManager_1 = __importDefault(__webpack_require__(25)); +const GitRefManager_1 = __importDefault(__webpack_require__(22)); async function logCommit(fileSystem, gitdir, oid, signing) { try { let { type, object } = await GitObjectManager_1.default.read(fileSystem, gitdir, oid); @@ -5255,7 +5344,7 @@ exports.default = log; /***/ }), -/* 52 */ +/* 57 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5264,7 +5353,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const shasum_1 = __importDefault(__webpack_require__(53)); +const shasum_1 = __importDefault(__webpack_require__(58)); class GitObject { static hash({ type, object }) { let buffer = Buffer.concat([Buffer.from(`${type} ${object.byteLength.toString()}\0`), Buffer.from(object)]); @@ -5305,7 +5394,7 @@ exports.default = GitObject; /***/ }), -/* 53 */ +/* 58 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5314,7 +5403,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const sha1_1 = __importDefault(__webpack_require__(54)); +const sha1_1 = __importDefault(__webpack_require__(59)); // This is modeled after @dominictarr's "shasum" module, // but without the 'json-stable-stringify' dependency and // extra type-casting features. @@ -5325,13 +5414,13 @@ exports.default = shasum; /***/ }), -/* 54 */ +/* 59 */ /***/ (function(module, exports) { module.exports = require("sha.js/sha1"); /***/ }), -/* 55 */ +/* 60 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5437,13 +5526,13 @@ exports.default = GitTree; /***/ }), -/* 56 */ +/* 61 */ /***/ (function(module, exports) { module.exports = require("sha.js"); /***/ }), -/* 57 */ +/* 62 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5452,8 +5541,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const GitRequest_1 = __importDefault(__webpack_require__(58)); -const Git_1 = __webpack_require__(19); +const GitRequest_1 = __importDefault(__webpack_require__(63)); +const Git_1 = __webpack_require__(20); const Peer_pb_1 = __webpack_require__(8); /** * Responsible for converting HTTP messages from isomorphic-git into requests and sending them to a specific peer. @@ -5512,7 +5601,7 @@ exports.default = GitFrontend; /***/ }), -/* 58 */ +/* 63 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5603,7 +5692,7 @@ exports.default = GitRequest; /***/ }), -/* 59 */ +/* 64 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5619,629 +5708,757 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", { value: true }); -const os_1 = __importDefault(__webpack_require__(4)); -const fs_1 = __importDefault(__webpack_require__(7)); -const net_1 = __importDefault(__webpack_require__(5)); -const path_1 = __importDefault(__webpack_require__(1)); -const process_1 = __importDefault(__webpack_require__(60)); -const configstore_1 = __importDefault(__webpack_require__(61)); -const PeerInfo_1 = __importDefault(__webpack_require__(0)); -const PolykeyClient_1 = __importDefault(__webpack_require__(25)); -const Polykey_1 = __importStar(__webpack_require__(11)); -const child_process_1 = __webpack_require__(62); -const Agent_1 = __webpack_require__(26); +const fs_1 = __importDefault(__webpack_require__(5)); +const path_1 = __importDefault(__webpack_require__(0)); +const process_1 = __importDefault(__webpack_require__(65)); +const get_port_1 = __importDefault(__webpack_require__(66)); +const util_1 = __webpack_require__(14); +const configstore_1 = __importDefault(__webpack_require__(67)); +const grpc = __importStar(__webpack_require__(11)); +const child_process_1 = __webpack_require__(68); +const agent = __importStar(__webpack_require__(69)); +const Polykey_1 = __importStar(__webpack_require__(12)); +const Agent_grpc_pb_1 = __webpack_require__(70); class PolykeyAgent { - constructor() { - // For storing the state of each polykey node - // Keys are the paths to the polykey node, e.g. '~/.polykey' - this.polykeyMap = new Map(); + constructor(polykeyPath) { + ///////////// + // Polykey // + ///////////// + // construct polykey instance if already initialized + this.pk = new Polykey_1.default(polykeyPath, fs_1.default); + ////////////////// + // Config Store // + ////////////////// + this.configStore = PolykeyAgent.ConfigStore(this.pk.polykeyPath); + ///////////// + // Process // + ///////////// + process_1.default.title = 'polykey-agent'; + // set pid for stopAgent command this.pid = process_1.default.pid; - this.socketPath = PolykeyAgent.SocketPath; - this.persistentStore = new configstore_1.default('polykey', undefined, { - configPath: path_1.default.join(path_1.default.dirname(this.socketPath), '.node_path_list.json'), + this.configStore.set('pid', this.pid); + ///////////////// + // GRPC Server // + ///////////////// + this.server = new grpc.Server(); + this.server.addService(Agent_grpc_pb_1.AgentService, this); + } + failOnLocked() { + if (!this.pk.keyManager.identityLoaded) { + throw Error(`polykey is locked at ${this.pk.polykeyPath}`); + } + } + static CAStore(polykeyPath) { + return new configstore_1.default('ca', undefined, { + configPath: path_1.default.join(polykeyPath, '.agent', 'caStoreConfig.json'), }); - // Make sure the socket file doesn't already exist (agent is already running) - if (fs_1.default.existsSync(this.socketPath)) { - fs_1.default.unlinkSync(this.socketPath); - } - // Make the socket path if it doesn't exist - if (!fs_1.default.existsSync(path_1.default.dirname(this.socketPath))) { - fs_1.default.promises.mkdir(path_1.default.dirname(this.socketPath)); - } - // Load polykeys - const nodePaths = this.persistentStore.get('nodePaths'); - if (nodePaths === null || nodePaths === void 0 ? void 0 : nodePaths.values) { - for (const path of nodePaths) { - if (fs_1.default.existsSync(path)) { - this.setPolyKey(path, new Polykey_1.default(path, fs_1.default)); - } - else { - this.removeNodePath(path); - } - } + } + get ServerCredentials() { + const caStoreConfig = PolykeyAgent.CAStore(this.pk.polykeyPath); + // The agent stores its root certificate and the client cert and keypair + // in a user specific folder. + // check if credentials exist for current polykey path + let caStore; + if (caStoreConfig.has(this.pk.polykeyPath)) { + caStore = caStoreConfig.get(this.pk.polykeyPath); } else { - this.persistentStore.set('nodePaths', []); + const clientCreds = this.pk.keyManager.pki.createAgentClientCredentials(); + caStore = { + rootCert: this.pk.keyManager.pki.RootCert, + ...clientCreds, + }; + caStoreConfig.set(this.pk.polykeyPath, caStore); + } + //////////////////////// + // Server credentials // + //////////////////////// + const tlsCredentials = this.pk.keyManager.pki.createAgentServerCredentials(); + if (tlsCredentials) { + return grpc.ServerCredentials.createSsl(Buffer.from(this.pk.keyManager.pki.RootCert), [ + { + private_key: Buffer.from(tlsCredentials.serverKeyPair.private), + cert_chain: Buffer.from(tlsCredentials.serverCert), + }, + ], true); + } + else { + return grpc.ServerCredentials.createInsecure(); } - // Start the server - this.server = net_1.default.createServer().listen(this.socketPath); - this.server.on('connection', (socket) => { - this.handleClientCommunication(socket); - }); } - setPolyKey(nodePath, pk) { - this.polykeyMap.set(nodePath, pk); - const nodePathSet = new Set(this.persistentStore.get('nodePaths')); - nodePathSet.add(nodePath); - this.persistentStore.set('nodePaths', Array.from(nodePathSet.values())); - } - removeNodePath(nodePath) { - this.polykeyMap.delete(nodePath); - const nodePathSet = new Set(this.persistentStore.get('nodePaths')); - nodePathSet.delete(nodePath); - this.persistentStore.set('nodePaths', Array.from(nodePathSet.values())); - } - getPolyKey(nodePath, failOnLocked = true) { - const pk = this.polykeyMap.get(nodePath); - if (this.polykeyMap.has(nodePath) && pk) { - if (fs_1.default.existsSync(nodePath)) { - if (failOnLocked && !pk.keyManager.identityLoaded) { - throw Error(`node path exists in memory but is locked: ${nodePath}`); + async startServer() { + // first try and stop server if its still running + // don't need to catch errors + try { + await util_1.promisify(this.server.tryShutdown)(); + } + catch (error) { } + // handle port + const portString = this.configStore.get('port'); + const portOptions = portString + ? { host: 'localhost', port: parseInt(portString) } + : undefined; + const port = await get_port_1.default(portOptions); + // bind server to port and start + const boundPort = await new Promise((resolve, reject) => { + this.server.bindAsync(`localhost:${port}`, this.ServerCredentials, (error, boundPort) => { + if (error) { + reject(error); } else { - return pk; + resolve(boundPort); } + }); + }); + this.server.start(); + this.configStore.set('port', boundPort); + console.log(`Agent started on: 'localhost:${boundPort}'`); + } + async addPeer(call, callback) { + try { + this.failOnLocked(); + const { publicKey, peerAddress, relayPublicKey, apiAddress } = call.request.toObject(); + this.pk.peerManager.addPeer(new Polykey_1.PeerInfo(publicKey, peerAddress, relayPublicKey, apiAddress)); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async decryptFile(call, callback) { + try { + this.failOnLocked(); + const { filePath, privateKeyPath, passphrase } = call.request.toObject(); + const decryptedPath = await this.pk.keyManager.decryptFile(filePath, privateKeyPath, passphrase); + const response = new agent.StringMessage(); + response.setS(decryptedPath); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async deleteKey(call, callback) { + try { + this.failOnLocked(); + const { s } = call.request.toObject(); + const successful = await this.pk.keyManager.deleteKey(s); + const response = new agent.BooleanMessage(); + response.setB(successful); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async deleteSecret(call, callback) { + try { + this.failOnLocked(); + const { vaultName, secretName } = call.request.toObject(); + const vault = this.pk.vaultManager.getVault(vaultName); + await vault.removeSecret(secretName); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async deleteVault(call, callback) { + try { + this.failOnLocked(); + const { s } = call.request.toObject(); + await this.pk.vaultManager.deleteVault(s); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async deriveKey(call, callback) { + try { + this.failOnLocked(); + const { keyName, passphrase } = call.request.toObject(); + await this.pk.keyManager.generateKey(keyName, passphrase); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async encryptFile(call, callback) { + try { + this.failOnLocked(); + const { filePath, publicKeyPath } = call.request.toObject(); + const encryptedPath = await this.pk.keyManager.encryptFile(filePath, publicKeyPath); + const response = new agent.StringMessage(); + response.setS(encryptedPath); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async findPeer(call, callback) { + try { + this.failOnLocked(); + const { publicKeyOrHandle, timeout } = call.request.toObject(); + const successful = await this.pk.peerManager.findPublicKey(publicKeyOrHandle, timeout); + const response = new agent.BooleanMessage(); + response.setB(successful); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async findSocialPeer(call, callback) { + try { + this.failOnLocked(); + const { publicKeyOrHandle, timeout } = call.request.toObject(); + // eslint-disable-next-line + const usernameRegex = /^\@([a-zA-Z0-9_-]+)\/([a-zA-Z0-9_-]+)/; + const matches = publicKeyOrHandle.match(usernameRegex); + const service = matches[1]; + const handle = matches[2]; + const successful = await this.pk.peerManager.findSocialUser(handle, service, timeout); + const response = new agent.BooleanMessage(); + response.setB(successful); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async getKey(call, callback) { + try { + this.failOnLocked(); + const { s } = call.request.toObject(); + const keyContent = this.pk.keyManager.getKey(s).toString(); + const response = new agent.StringMessage(); + response.setS(keyContent); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async getLocalPeerInfo(call, callback) { + var _a, _b; + try { + this.failOnLocked(); + const { s } = call.request.toObject(); + const peerInfo = this.pk.peerManager.peerInfo; + const response = new agent.PeerInfoMessage(); + response.setPublicKey(peerInfo.publicKey); + if (peerInfo.relayPublicKey) { + response.setRelayPublicKey(peerInfo.relayPublicKey); } - else { - this.removeNodePath(nodePath); - throw Error(`node path exists in memory but does not exist on file system: ${nodePath}`); + if (peerInfo.peerAddress) { + response.setPeerAddress((_a = peerInfo.peerAddress) === null || _a === void 0 ? void 0 : _a.toString()); } + if (peerInfo.apiAddress) { + response.setApiAddress((_b = peerInfo.apiAddress) === null || _b === void 0 ? void 0 : _b.toString()); + } + callback(null, response); } - else { - this.removeNodePath(nodePath); - throw Error(`node path does not exist in memory: ${nodePath}`); + catch (error) { + callback(error, null); } } - get AllNodePaths() { - return Array.from(this.polykeyMap.keys()).filter((nodePath) => { - try { - this.getPolyKey(nodePath, false); - return true; + async getPeerInfo(call, callback) { + var _a, _b; + try { + this.failOnLocked(); + const { s } = call.request.toObject(); + if (!this.pk.peerManager.hasPeer(s)) { + throw Error('public key does not exist in peer store'); } - catch (_a) { - return false; + const peerInfo = this.pk.peerManager.getPeer(s); + const response = new agent.PeerInfoMessage(); + response.setPublicKey(peerInfo.publicKey); + if (peerInfo.relayPublicKey) { + response.setRelayPublicKey(peerInfo.relayPublicKey); } - }); - } - get UnlockedNodePaths() { - return this.AllNodePaths.filter((nodePath) => { - try { - return this.getPolyKey(nodePath, false).keyManager.identityLoaded; + if (peerInfo.peerAddress) { + response.setPeerAddress((_a = peerInfo.peerAddress) === null || _a === void 0 ? void 0 : _a.toString()); } - catch (_a) { - return false; + if (peerInfo.apiAddress) { + response.setApiAddress((_b = peerInfo.apiAddress) === null || _b === void 0 ? void 0 : _b.toString()); } - }); + callback(null, response); + } + catch (error) { + callback(error, null); + } } - stop() { - this.server.close(); - for (const nodePath of this.polykeyMap.keys()) { - const pk = this.getPolyKey(nodePath); - pk.peerManager.multicastBroadcaster.stopBroadcasting(); + async getPrimaryKeyPair(call, callback) { + try { + this.failOnLocked(); + const { b } = call.request.toObject(); + const keypair = this.pk.keyManager.getKeyPair(); + const response = new agent.KeyPairMessage(); + response.setPublicKey(keypair.public); + if (b) { + response.setPrivateKey(keypair.private); + } + callback(null, response); } - // finally kill the pid of the agent process - if (process_1.default.env.NODE_ENV !== 'test') { - process_1.default.kill(this.pid); + catch (error) { + callback(error, null); } } - handleClientCommunication(socket) { - socket.on('data', async (encodedMessage) => { - var _a; - try { - const { type, nodePath, subMessage } = Agent_1.agentInterface.AgentMessage.decodeDelimited(encodedMessage); - let response = undefined; - switch (type) { - case Agent_1.agentInterface.AgentMessageType.STATUS: - response = Agent_1.agentInterface.AgentStatusResponseMessage.encodeDelimited({ - status: Agent_1.agentInterface.AgentStatusType.ONLINE, - }).finish(); - break; - case Agent_1.agentInterface.AgentMessageType.STOP_AGENT: - this.stop(); - break; - case Agent_1.agentInterface.AgentMessageType.REGISTER_NODE: - response = await this.registerNode(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.NEW_NODE: - response = await this.newNode(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.LIST_NODES: - response = this.listNodes(subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.DERIVE_KEY: - response = await this.deriveKey(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.LIST_KEYS: - response = await this.listKeys(nodePath); - break; - case Agent_1.agentInterface.AgentMessageType.GET_KEY: - response = await this.getKey(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.GET_PRIMARY_KEYPAIR: - response = await this.getPrimaryKeyPair(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.DELETE_KEY: - response = await this.deleteKey(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.SIGN_FILE: - response = await this.signFile(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.VERIFY_FILE: - response = await this.verifyFile(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.ENCRYPT_FILE: - response = await this.encryptFile(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.DECRYPT_FILE: - response = await this.decryptFile(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.LIST_VAULTS: - response = await this.listVaults(nodePath); - break; - case Agent_1.agentInterface.AgentMessageType.SCAN_VAULT_NAMES: - response = await this.scanVaultNames(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.NEW_VAULT: - response = await this.newVault(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.PULL_VAULT: - response = await this.pullVault(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.DESTROY_VAULT: - response = await this.destroyVault(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.LIST_SECRETS: - response = await this.listSecrets(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.CREATE_SECRET: - response = await this.createSecret(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.DESTROY_SECRET: - response = await this.destroySecret(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.GET_SECRET: - response = await this.getSecret(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.UPDATE_SECRET: - response = await this.updateSecret(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.ADD_PEER: - response = await this.addPeer(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.GET_PEER_INFO: - response = await this.getPeerInfo(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.PING_PEER: - response = await this.pingPeer(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.FIND_PEER: - response = await this.findPeer(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.FIND_SOCIAL_PEER: - response = await this.findSocialPeer(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.LIST_PEERS: - response = await this.listPeers(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.TOGGLE_STEALTH: - response = await this.toggleStealth(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.UPDATE_PEER_INFO: - response = await this.updatePeerInfo(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.REQUEST_RELAY: - response = await this.requestRelay(nodePath, subMessage); - break; - case Agent_1.agentInterface.AgentMessageType.REQUEST_PUNCH: - response = await this.requestPunch(nodePath, subMessage); - break; - default: - throw Error(`message type not supported: ${Agent_1.agentInterface.AgentMessageType[type]}`); - } - if (response) { - const encodedResponse = Agent_1.agentInterface.AgentMessage.encodeDelimited({ - type: type, - isResponse: true, - nodePath: nodePath, - subMessage: response, - }).finish(); - socket.write(encodedResponse); - } - else { - throw Error('something went wrong'); - } + async getSecret(call, callback) { + try { + this.failOnLocked(); + const { vaultName, secretName } = call.request.toObject(); + const vault = this.pk.vaultManager.getVault(vaultName); + const secret = vault.getSecret(secretName).toString(); + const response = new agent.StringMessage(); + response.setS(secret); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async getStatus(call, callback) { + try { + const response = new agent.AgentStatusMessage(); + response.setStatus(agent.AgentStatusType.ONLINE); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async listKeys(call, callback) { + try { + this.failOnLocked(); + const keyNames = this.pk.keyManager.listKeys(); + const response = new agent.StringListMessage(); + response.setSList(keyNames); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + listNodes(call, callback) { + try { + const { b } = call.request.toObject(); + const response = new agent.StringListMessage(); + response.setSList([this.pk.polykeyPath]); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async listPeers(call, callback) { + try { + this.failOnLocked(); + const publicKeys = this.pk.peerManager.listPeers(); + const response = new agent.StringListMessage(); + response.setSList(publicKeys); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async listSecrets(call, callback) { + try { + this.failOnLocked(); + const { s } = call.request.toObject(); + const vault = this.pk.vaultManager.getVault(s); + const secretNames = vault.listSecrets(); + const response = new agent.StringListMessage(); + response.setSList(secretNames); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async listVaults(call, callback) { + try { + this.failOnLocked(); + const vaultNames = this.pk.vaultManager.getVaultNames(); + const response = new agent.StringListMessage(); + response.setSList(vaultNames); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async newNode(call, callback) { + try { + const { userid, passphrase, nbits } = call.request.toObject(); + // check node is already initialized + if (this.pk.keyManager.hasPrivateKey()) { + throw Error(`polykey keypair already exists at node path: '${this.pk.polykeyPath}'`); + } + const km = new Polykey_1.KeyManager(this.pk.polykeyPath, fs_1.default); + const resolvedNBits = nbits && nbits != 0 ? nbits : undefined; + await km.generateKeyPair(userid, passphrase, resolvedNBits, true); + this.pk = new Polykey_1.default(this.pk.polykeyPath, fs_1.default, km); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); + } + catch (error) { + callback(error, null); + } + } + async newSecret(call, callback) { + try { + this.failOnLocked(); + const { secretPath, secretFilePath, secretContent } = call.request.toObject(); + const vault = this.pk.vaultManager.getVault(secretPath === null || secretPath === void 0 ? void 0 : secretPath.vaultName); + let secretBuffer; + if (secretFilePath) { + secretBuffer = await fs_1.default.promises.readFile(secretFilePath); } - catch (err) { - const errorResponse = Agent_1.agentInterface.AgentMessage.encodeDelimited({ - type: Agent_1.agentInterface.AgentMessageType.ERROR, - isResponse: true, - nodePath: undefined, - subMessage: Agent_1.agentInterface.ErrorMessage.encodeDelimited({ error: (_a = err.message) !== null && _a !== void 0 ? _a : err }).finish(), - }).finish(); - socket.write(errorResponse); + else { + secretBuffer = Buffer.from(secretContent); } - // Close connection - socket.end(); - }); + await vault.addSecret(secretPath === null || secretPath === void 0 ? void 0 : secretPath.secretName, secretBuffer); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); + } + catch (error) { + callback(error, null); + } } - // Register an existing polykey agent - async registerNode(nodePath, request) { - const { passphrase } = Agent_1.agentInterface.RegisterNodeRequestMessage.decodeDelimited(request); - let pk; - if (this.polykeyMap.has(nodePath)) { - pk = this.getPolyKey(nodePath, false); - if (pk.keyManager.identityLoaded) { - throw Error(`node path is already loaded and unlocked: '${nodePath}'`); - } - await pk.keyManager.unlockIdentity(passphrase); + async newVault(call, callback) { + try { + this.failOnLocked(); + const { s } = call.request.toObject(); + await this.pk.vaultManager.newVault(s); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); + } + catch (error) { + callback(error, null); } - else { - const km = new Polykey_1.KeyManager(nodePath, fs_1.default); - await km.unlockIdentity(passphrase); - // Create polykey class - pk = new Polykey_1.default(nodePath, fs_1.default, km); - } - // Load all metadata - await pk.keyManager.loadMetadata(); - await pk.vaultManager.loadMetadata(); - // Set polykey class - this.setPolyKey(nodePath, pk); - // Encode and send response - const response = Agent_1.agentInterface.NewNodeResponseMessage.encodeDelimited({ - successful: pk.keyManager.identityLoaded && this.polykeyMap.has(nodePath), - }).finish(); - return response; } - // Create a new polykey agent - async newNode(nodePath, request) { - // Throw if path already exists - if (this.polykeyMap.has(nodePath) && fs_1.default.existsSync(nodePath)) { - throw Error(`node path '${nodePath}' is already loaded`); + async pingPeer(call, callback) { + try { + this.failOnLocked(); + const { publicKeyOrHandle, timeout } = call.request.toObject(); + const successful = await this.pk.peerManager.pingPeer(publicKeyOrHandle, timeout); + const response = new agent.BooleanMessage(); + response.setB(successful); + callback(null, response); } - else if (fs_1.default.existsSync(nodePath)) { - throw Error(`node path already exists: '${nodePath}'`); + catch (error) { + callback(error, null); } - const { userId, passphrase, nbits } = Agent_1.agentInterface.NewNodeRequestMessage.decodeDelimited(request); - const km = new Polykey_1.KeyManager(nodePath, fs_1.default); - await km.generateKeyPair(userId, passphrase, nbits == 0 ? undefined : nbits, true, (info) => { - // socket.write(JSON.stringify(info)) - }); - // Create and set polykey class - const pk = new Polykey_1.default(nodePath, fs_1.default, km); - this.setPolyKey(nodePath, pk); - // Encode and send response - const response = Agent_1.agentInterface.NewNodeResponseMessage.encodeDelimited({ - successful: km.identityLoaded && this.polykeyMap.has(nodePath), - }).finish(); - return response; } - // Create a new polykey agent - listNodes(request) { - const { unlockedOnly } = Agent_1.agentInterface.ListNodesRequestMessage.decodeDelimited(request); - if (unlockedOnly) { - return Agent_1.agentInterface.ListNodesResponseMessage.encodeDelimited({ nodes: this.UnlockedNodePaths }).finish(); + async pullVault(call, callback) { + try { + this.failOnLocked(); + const { vaultName, publicKey } = call.request.toObject(); + // pull if vault exists locally, otherwise clone + if (this.pk.vaultManager.vaultExists(vaultName)) { + const vault = this.pk.vaultManager.getVault(vaultName); + await vault.pullVault(publicKey); + } + else { + await this.pk.vaultManager.cloneVault(vaultName, publicKey); + } + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); + } + catch (error) { + callback(error, null); } - else { - return Agent_1.agentInterface.ListNodesResponseMessage.encodeDelimited({ nodes: this.AllNodePaths }).finish(); - } - } - ///////////////////////// - // KeyManager commands // - ///////////////////////// - async deriveKey(nodePath, request) { - const { keyName, passphrase } = Agent_1.agentInterface.DeriveKeyRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - await pk.keyManager.generateKey(keyName, passphrase); - return Agent_1.agentInterface.DeriveKeyResponseMessage.encodeDelimited({ successful: true }).finish(); - } - async listKeys(nodePath) { - const pk = this.getPolyKey(nodePath); - const keyNames = pk.keyManager.listKeys(); - return Agent_1.agentInterface.ListKeysResponseMessage.encodeDelimited({ keyNames }).finish(); - } - async getKey(nodePath, request) { - const { keyName } = Agent_1.agentInterface.GetKeyRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const keyContent = pk.keyManager.getKey(keyName).toString(); - return Agent_1.agentInterface.GetKeyResponseMessage.encodeDelimited({ keyContent }).finish(); - } - async getPrimaryKeyPair(nodePath, request) { - const { includePrivateKey } = Agent_1.agentInterface.GetPrimaryKeyPairRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const keypair = pk.keyManager.getKeyPair(); - return Agent_1.agentInterface.GetPrimaryKeyPairResponseMessage.encodeDelimited({ - publicKey: keypair.public, - privateKey: includePrivateKey ? keypair.private : undefined, - }).finish(); } - async deleteKey(nodePath, request) { - const { keyName } = Agent_1.agentInterface.DeleteKeyRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const successful = await pk.keyManager.deleteKey(keyName); - return Agent_1.agentInterface.DeleteKeyResponseMessage.encodeDelimited({ successful }).finish(); - } - ///////////////////// - // Crypto commands // - ///////////////////// - async signFile(nodePath, request) { - const { filePath, privateKeyPath, passphrase } = Agent_1.agentInterface.SignFileRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const signaturePath = await pk.keyManager.signFile(filePath, privateKeyPath, passphrase); - return Agent_1.agentInterface.SignFileResponseMessage.encodeDelimited({ signaturePath }).finish(); - } - async verifyFile(nodePath, request) { - const { filePath, publicKeyPath } = Agent_1.agentInterface.VerifyFileRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const verified = await pk.keyManager.verifyFile(filePath, publicKeyPath); - return Agent_1.agentInterface.VerifyFileResponseMessage.encodeDelimited({ verified }).finish(); - } - async encryptFile(nodePath, request) { - const { filePath, publicKeyPath } = Agent_1.agentInterface.EncryptFileRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const encryptedPath = await pk.keyManager.encryptFile(filePath, publicKeyPath); - return Agent_1.agentInterface.EncryptFileResponseMessage.encodeDelimited({ encryptedPath }).finish(); - } - async decryptFile(nodePath, request) { - const { filePath, privateKeyPath, passphrase } = Agent_1.agentInterface.DecryptFileRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const decryptedPath = await pk.keyManager.decryptFile(filePath, privateKeyPath, passphrase); - return Agent_1.agentInterface.DecryptFileResponseMessage.encodeDelimited({ decryptedPath }).finish(); + async registerNode(call, callback) { + try { + if (this.pk.keyManager.identityLoaded) { + throw Error('node is already unlocked'); + } + const { s } = call.request.toObject(); + await this.pk.keyManager.unlockIdentity(s); + // re-load all meta data + await this.pk.keyManager.loadEncryptedMetadata(); + this.pk.peerManager.loadMetadata(); + await this.pk.vaultManager.loadEncryptedMetadata(); + await this.pk.httpApi.start(); + // send response + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); + } + catch (error) { + callback(error, null); + } } - ////////////////////// - // Vault Operations // - ////////////////////// - async listVaults(nodePath) { - const pk = this.getPolyKey(nodePath); - const vaultNames = pk.vaultManager.listVaults(); - return Agent_1.agentInterface.ListVaultsResponseMessage.encodeDelimited({ vaultNames }).finish(); - } - async scanVaultNames(nodePath, request) { - const { publicKey } = Agent_1.agentInterface.ScanVaultNamesRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const vaultNames = await pk.vaultManager.scanVaultNames(publicKey); - return Agent_1.agentInterface.ScanVaultNamesResponseMessage.encodeDelimited({ vaultNames }).finish(); - } - async newVault(nodePath, request) { - const { vaultName } = Agent_1.agentInterface.NewVaultRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - await pk.vaultManager.createVault(vaultName); - return Agent_1.agentInterface.NewVaultResponseMessage.encodeDelimited({ successful: true }).finish(); - } - async pullVault(nodePath, request) { - const { vaultName, publicKey } = Agent_1.agentInterface.PullVaultRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - // pull if vault exists locally, otherwise clone - if (pk.vaultManager.vaultExists(vaultName)) { - const vault = pk.vaultManager.getVault(vaultName); - vault.pullVault(publicKey); + async requestHolePunch(call, callback) { + try { + this.failOnLocked(); + const { s } = call.request.toObject(); + const address = await this.pk.peerManager.turnClient.requestLocalHolePunchAddress(s); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); } - else { - pk.vaultManager.cloneVault(vaultName, publicKey); + catch (error) { + callback(error, null); } - return Agent_1.agentInterface.PullVaultResponseMessage.encodeDelimited({ successful: true }).finish(); } - async destroyVault(nodePath, request) { - const { vaultName } = Agent_1.agentInterface.DestroyVaultRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - pk.vaultManager.destroyVault(vaultName); - return Agent_1.agentInterface.DestroyVaultResponseMessage.encodeDelimited({ successful: true }).finish(); + async requestRelay(call, callback) { + try { + this.failOnLocked(); + const { s } = call.request.toObject(); + await this.pk.peerManager.turnClient.requestRelayConnection(s); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); + } + catch (error) { + callback(error, null); + } } - /////////////////////// - // Secret Operations // - /////////////////////// - async listSecrets(nodePath, request) { - const { vaultName } = Agent_1.agentInterface.ListSecretsRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const vault = pk.vaultManager.getVault(vaultName); - const secretNames = vault.listSecrets(); - return Agent_1.agentInterface.ListSecretsResponseMessage.encodeDelimited({ secretNames }).finish(); - } - async createSecret(nodePath, request) { - const { vaultName, secretName, secretPath, secretContent, } = Agent_1.agentInterface.CreateSecretRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const vault = pk.vaultManager.getVault(vaultName); - let secretBuffer; - if (secretPath) { - secretBuffer = await fs_1.default.promises.readFile(secretPath); + async scanVaultNames(call, callback) { + try { + this.failOnLocked(); + const { s } = call.request.toObject(); + const vaultNames = await this.pk.vaultManager.scanVaultNames(s); + const response = new agent.StringListMessage(); + response.setSList(vaultNames); + callback(null, response); } - else { - secretBuffer = Buffer.from(secretContent); - } - await vault.addSecret(secretName, secretBuffer); - return Agent_1.agentInterface.CreateSecretResponseMessage.encodeDelimited({ successful: true }).finish(); - } - async destroySecret(nodePath, request) { - const { vaultName, secretName } = Agent_1.agentInterface.DestroySecretRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const vault = pk.vaultManager.getVault(vaultName); - await vault.removeSecret(secretName); - return Agent_1.agentInterface.DestroySecretResponseMessage.encodeDelimited({ successful: true }).finish(); - } - async getSecret(nodePath, request) { - const { vaultName, secretName } = Agent_1.agentInterface.GetSecretRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const vault = pk.vaultManager.getVault(vaultName); - const secret = Buffer.from(vault.getSecret(secretName)); - return Agent_1.agentInterface.GetSecretResponseMessage.encodeDelimited({ secret: secret }).finish(); - } - async updateSecret(nodePath, request) { - const { vaultName, secretName, secretPath, secretContent, } = Agent_1.agentInterface.UpdateSecretRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const vault = pk.vaultManager.getVault(vaultName); - let secretBuffer; - if (secretPath) { - secretBuffer = await fs_1.default.promises.readFile(secretPath); + catch (error) { + callback(error, null); } - else { - secretBuffer = Buffer.from(secretContent); + } + async signFile(call, callback) { + try { + this.failOnLocked(); + const { filePath, privateKeyPath, passphrase } = call.request.toObject(); + const signaturePath = await this.pk.keyManager.signFile(filePath, privateKeyPath, passphrase); + const response = new agent.StringMessage(); + response.setS(signaturePath); + callback(null, response); + } + catch (error) { + callback(error, null); } - await vault.updateSecret(secretName, secretBuffer); - return Agent_1.agentInterface.UpdateSecretResponseMessage.encodeDelimited({ successful: true }).finish(); } - ///////////////////// - // Peer Operations // - ///////////////////// - async addPeer(nodePath, request) { - const { publicKey, peerAddress, relayPublicKey } = Agent_1.agentInterface.AddPeerRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - pk.peerManager.addPeer(new PeerInfo_1.default(publicKey, peerAddress, relayPublicKey)); - return Agent_1.agentInterface.AddPeerResponseMessage.encodeDelimited({ successful: true }).finish(); + async stopAgent(call, callback) { + try { + this.pk.peerManager.multicastBroadcaster.stopBroadcasting(); + const response = new agent.BooleanMessage(); + response.setB(true); + this.configStore.clear(); + callback(null, response); + await util_1.promisify(this.server.tryShutdown)(); + // finally kill the pid of the agent process + if (process_1.default.env.NODE_ENV !== 'test') { + process_1.default.kill(this.pid); + } + } + catch (error) { + callback(error, null); + } } - async getPeerInfo(nodePath, request) { - var _a; - const { current, publicKey } = Agent_1.agentInterface.PeerInfoRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - let peerInfo; - if (current) { - peerInfo = pk.peerManager.peerInfo; + async toggleStealthMode(call, callback) { + try { + this.failOnLocked(); + const { b } = call.request.toObject(); + this.pk.peerManager.toggleStealthMode(b); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); } - else { - if (!pk.peerManager.hasPeer(publicKey)) { - throw Error('public key does not exist in peer store'); - } - peerInfo = pk.peerManager.getPeer(publicKey); + catch (error) { + callback(error, null); } - return Agent_1.agentInterface.PeerInfoResponseMessage.encodeDelimited({ - publicKey: peerInfo.publicKey, - peerAddress: (_a = peerInfo.peerAddress) === null || _a === void 0 ? void 0 : _a.toString(), - relayPublicKey: peerInfo.relayPublicKey, - }).finish(); } - async pingPeer(nodePath, request) { - const { publicKey, timeout } = Agent_1.agentInterface.PingPeerRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const successful = await pk.peerManager.pingPeer(publicKey, timeout); - return Agent_1.agentInterface.PingPeerResponseMessage.encodeDelimited({ successful }).finish(); - } - async findPeer(nodePath, request) { - const { publicKey, timeout } = Agent_1.agentInterface.FindPeerRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const successful = await pk.peerManager.findPublicKey(publicKey, timeout); - return Agent_1.agentInterface.FindPeerResponseMessage.encodeDelimited({ successful }).finish(); - } - async findSocialPeer(nodePath, request) { - const { handle, service, timeout } = Agent_1.agentInterface.FindSocialPeerRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const successful = await pk.peerManager.findSocialUser(handle, service, timeout); - return Agent_1.agentInterface.FindSocialPeerResponseMessage.encodeDelimited({ successful }).finish(); - } - async listPeers(nodePath, request) { - const pk = this.getPolyKey(nodePath); - const publicKeys = pk.peerManager.listPeers(); - return Agent_1.agentInterface.ListPeersResponseMessage.encodeDelimited({ publicKeys }).finish(); - } - async toggleStealth(nodePath, request) { - const { active } = Agent_1.agentInterface.ToggleStealthRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - pk.peerManager.toggleStealthMode(active); - return Agent_1.agentInterface.ToggleStealthResponseMessage.encodeDelimited({ successful: true }).finish(); - } - async updatePeerInfo(nodePath, request) { - var _a, _b; - const { publicKey, currentNode, peerHost, peerPort, relayPublicKey, } = Agent_1.agentInterface.UpdatePeerInfoRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - let currentPeerInfo; - if (currentNode) { - currentPeerInfo = pk.peerManager.peerInfo; + async updateLocalPeerInfo(call, callback) { + try { + this.failOnLocked(); + const { publicKey, relayPublicKey, peerAddress, apiAddress } = call.request.toObject(); + this.pk.peerManager.peerInfo.relayPublicKey = relayPublicKey; + this.pk.peerManager.peerInfo.peerAddress = Polykey_1.Address.parse(peerAddress); + this.pk.peerManager.peerInfo.apiAddress = Polykey_1.Address.parse(apiAddress); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); } - else { - if (!pk.peerManager.hasPeer(publicKey)) { + catch (error) { + callback(error, null); + } + } + async updatePeerInfo(call, callback) { + try { + this.failOnLocked(); + const { publicKey, relayPublicKey, peerAddress, apiAddress } = call.request.toObject(); + if (!this.pk.peerManager.hasPeer(publicKey)) { throw Error('peer does not exist in store'); } - currentPeerInfo = pk.peerManager.getPeer(publicKey); + const peerInfo = this.pk.peerManager.getPeer(publicKey); + peerInfo.relayPublicKey = relayPublicKey; + peerInfo.peerAddress = Polykey_1.Address.parse(peerAddress); + peerInfo.apiAddress = Polykey_1.Address.parse(apiAddress); + this.pk.peerManager.updatePeer(peerInfo); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); } - (_a = currentPeerInfo.peerAddress) === null || _a === void 0 ? void 0 : _a.updateHost(peerHost); - (_b = currentPeerInfo.peerAddress) === null || _b === void 0 ? void 0 : _b.updatePort(peerPort); - currentPeerInfo.relayPublicKey = relayPublicKey; - if (!currentNode) { - pk.peerManager.updatePeer(currentPeerInfo); + catch (error) { + callback(error, null); } - return Agent_1.agentInterface.UpdatePeerInfoResponseMessage.encodeDelimited({ successful: true }).finish(); } - async requestRelay(nodePath, request) { - const { publicKey } = Agent_1.agentInterface.RequestRelayRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - await pk.peerManager.turnClient.requestRelayConnection(publicKey); - return Agent_1.agentInterface.RequestRelayResponseMessage.encodeDelimited({ successful: true }).finish(); + async updateSecret(call, callback) { + try { + this.failOnLocked(); + const { secretPath, secretFilePath, secretContent } = call.request.toObject(); + const vault = this.pk.vaultManager.getVault(secretPath === null || secretPath === void 0 ? void 0 : secretPath.vaultName); + let secretBuffer; + if (secretFilePath) { + secretBuffer = await fs_1.default.promises.readFile(secretFilePath); + } + else { + secretBuffer = Buffer.from(secretContent); + } + await vault.updateSecret(secretPath === null || secretPath === void 0 ? void 0 : secretPath.secretName, secretBuffer); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); + } + catch (error) { + callback(error, null); + } } - async requestPunch(nodePath, request) { - const { publicKey } = Agent_1.agentInterface.RequestPunchRequestMessage.decodeDelimited(request); - const pk = this.getPolyKey(nodePath); - const address = await pk.peerManager.turnClient.requestLocalHolePunchAddress(publicKey); - return Agent_1.agentInterface.RequestPunchResponseMessage.encodeDelimited({ address: address.toString() }).finish(); + async verifyFile(call, callback) { + try { + this.failOnLocked(); + const { publicKeyPath, filePath } = call.request.toObject(); + const verified = await this.pk.keyManager.verifyFile(filePath, publicKeyPath); + const response = new agent.BooleanMessage(); + response.setB(true); + callback(null, response); + } + catch (error) { + callback(error, null); + } } /////////////////////// // Client Connection // /////////////////////// - static connectToAgent(getStream) { - const defaultStream = () => { - const socket = net_1.default.createConnection(PolykeyAgent.SocketPath); - return socket; - }; - const client = new PolykeyClient_1.default(getStream !== null && getStream !== void 0 ? getStream : defaultStream); - return client; - } - // ===== Helper methods===== // - static get SocketPath() { - const platform = os_1.default.platform(); - const userInfo = os_1.default.userInfo(); - if (process_1.default.env.PK_SOCKET_PATH) { - return process_1.default.env.PK_SOCKET_PATH; - } - else if (platform == 'win32') { - return path_1.default.join('\\\\?\\pipe', process_1.default.cwd(), 'polykey-agent'); + static connectToAgent(polykeyPath) { + const configStore = PolykeyAgent.ConfigStore(polykeyPath); + const port = parseInt(configStore.get('port')); + if (!port) { + throw Error(`polykey agent is not started at polykey path: '${polykeyPath}'`); } else { - return `/run/user/${userInfo.uid}/polykey/S.polykey-agent`; + // get credentials + const caStoreConfig = PolykeyAgent.CAStore(polykeyPath); + // check if credentials exist for current polykey path + let credentials; + if (caStoreConfig.has(polykeyPath)) { + const caStore = caStoreConfig.get(polykeyPath); + credentials = grpc.ChannelCredentials.createSsl(Buffer.from(caStore.rootCert), Buffer.from(caStore.clientKeyPair.private), Buffer.from(caStore.clientCert)); + } + else { + credentials = grpc.credentials.createInsecure(); + } + const client = new Agent_grpc_pb_1.AgentClient(`localhost:${port}`, credentials); + return client; } } - static get LogPath() { - const platform = os_1.default.platform(); - const userInfo = os_1.default.userInfo(); - if (process_1.default.env.PK_LOG_PATH) { - return process_1.default.env.PK_LOG_PATH; - } - else if (platform == 'win32') { - return path_1.default.join(os_1.default.tmpdir(), 'polykey', 'log'); + static ConfigStore(polykeyPath) { + const configStore = new configstore_1.default('polykey', undefined, { + configPath: path_1.default.join(polykeyPath, '.agent', '.config.json'), + }); + return configStore; + } + static AgentIsRunning(polykeyPath) { + const existingPid = PolykeyAgent.AgentPid(polykeyPath); + if (existingPid) { + try { + process_1.default.kill(existingPid, 0); + return true; + } + catch (e) { + return false; + } } else { - return `/run/user/${userInfo.uid}/polykey/log`; + return false; } } - static async startAgent(daemon = false) { + static AgentPid(polykeyPath) { + const configStore = PolykeyAgent.ConfigStore(polykeyPath); + return parseInt(configStore.get('pid')); + } + static async startAgent(polykeyPath, daemon = false, failOnNotInitialized = true) { + // either resolves a newly started process ID or true if the process is running already return new Promise((resolve, reject) => { try { - if (fs_1.default.existsSync(PolykeyAgent.LogPath)) { - fs_1.default.rmdirSync(PolykeyAgent.LogPath, { recursive: true }); + if (failOnNotInitialized && !fs_1.default.existsSync(path_1.default.join(polykeyPath, '.keys', 'private_key'))) { + throw Error(`polykey node has not been initialized, initialize with 'pk agent init'`); + } + // check if agent is already running + if (PolykeyAgent.AgentIsRunning(polykeyPath)) { + resolve(true); + } + else { + const logPath = path_1.default.join(polykeyPath, '.agent', 'log'); + if (fs_1.default.existsSync(logPath)) { + fs_1.default.rmdirSync(logPath, { recursive: true }); + } + fs_1.default.mkdirSync(logPath, { recursive: true }); + let options = { + uid: process_1.default.getuid(), + detached: daemon, + stdio: [ + 'ignore', + fs_1.default.openSync(path_1.default.join(logPath, 'output.log'), 'a'), + fs_1.default.openSync(path_1.default.join(logPath, 'error.log'), 'a'), + 'ipc', + ], + }; + const agentProcess = child_process_1.spawn(PolykeyAgent.DAEMON_SCRIPT_PATH.includes('.js') ? 'node' : 'ts-node', [PolykeyAgent.DAEMON_SCRIPT_PATH], options); + agentProcess.send(polykeyPath, (err) => { + if (err) { + agentProcess.kill('SIGTERM'); + reject(err); + } + else { + const pid = agentProcess.pid; + agentProcess.on('message', (msg) => { + agentProcess.unref(); + agentProcess.disconnect(); + if (msg === 'started') { + resolve(pid); + } + else { + reject('something went wrong, child process did not start polykey agent'); + } + }); + } + }); } - fs_1.default.mkdirSync(PolykeyAgent.LogPath, { recursive: true }); - let options = { - uid: process_1.default.getuid(), - detached: daemon, - stdio: [ - 'ipc', - fs_1.default.openSync(path_1.default.join(PolykeyAgent.LogPath, 'output.log'), 'a'), - fs_1.default.openSync(path_1.default.join(PolykeyAgent.LogPath, 'error.log'), 'a'), - ], - }; - const agentProcess = child_process_1.spawn(PolykeyAgent.DAEMON_SCRIPT_PATH.includes('.js') ? 'node' : 'ts-node', [PolykeyAgent.DAEMON_SCRIPT_PATH], options); - const pid = agentProcess.pid; - agentProcess.unref(); - agentProcess.disconnect(); - resolve(pid); } - catch (err) { - reject(err); + catch (error) { + reject(error); } }); } @@ -6256,23 +6473,41 @@ exports.default = PolykeyAgent; /***/ }), -/* 60 */ +/* 65 */ /***/ (function(module, exports) { module.exports = require("process"); /***/ }), -/* 61 */ +/* 66 */ +/***/ (function(module, exports) { + +module.exports = require("get-port"); + +/***/ }), +/* 67 */ /***/ (function(module, exports) { module.exports = require("configstore"); /***/ }), -/* 62 */ +/* 68 */ /***/ (function(module, exports) { module.exports = require("child_process"); +/***/ }), +/* 69 */ +/***/ (function(module, exports) { + +module.exports = require("../proto/compiled/Agent_pb"); + +/***/ }), +/* 70 */ +/***/ (function(module, exports) { + +module.exports = require("../proto/compiled/Agent_grpc_pb"); + /***/ }) /******/ ]); }); diff --git a/dist/polykey.js.map b/dist/polykey.js.map index 21990e6d78..7b0cd01d9a 100644 --- a/dist/polykey.js.map +++ b/dist/polykey.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://polykey/webpack/universalModuleDefinition","webpack://polykey/webpack/bootstrap","webpack://polykey/./src/peers/PeerInfo.ts","webpack://polykey/external \"path\"","webpack://polykey/external \"../proto/js/Peer\"","webpack://polykey/external \"events\"","webpack://polykey/external \"os\"","webpack://polykey/external \"net\"","webpack://polykey/./src/utils.ts","webpack://polykey/external \"fs\"","webpack://polykey/external \"../proto/compiled/Peer_pb\"","webpack://polykey/external \"readable-stream\"","webpack://polykey/./src/peers/udp-hole-punch/MicroTransportProtocol.ts","webpack://polykey/./src/Polykey.ts","webpack://polykey/external \"crypto\"","webpack://polykey/external \"dgram\"","webpack://polykey/external \"@grpc/grpc-js\"","webpack://polykey/external \"../proto/compiled/Peer_grpc_pb\"","webpack://polykey/external \"isomorphic-git\"","webpack://polykey/external \"encryptedfs\"","webpack://polykey/external \"virtualfs\"","webpack://polykey/external \"../proto/js/Git\"","webpack://polykey/./src/git/upload-pack/GitPktLine.ts","webpack://polykey/./src/git/upload-pack/GitRefManager.ts","webpack://polykey/external \"pako\"","webpack://polykey/./src/git/pack-objects/GitCommit.ts","webpack://polykey/./src/git/pack-objects/GitObjectManager.ts","webpack://polykey/./src/agent/PolykeyClient.ts","webpack://polykey/external \"../proto/js/Agent\"","webpack://polykey/external \"protobufjs\"","webpack://polykey/./src/keys/KeyManager.ts","webpack://polykey/external \"kbpgp\"","webpack://polykey/external \"util\"","webpack://polykey/./src/peers/PeerManager.ts","webpack://polykey/./src/peers/turn/TurnClient.ts","webpack://polykey/./src/peers/udp-hole-punch/UDPHolePunchClient.ts","webpack://polykey/./src/peers/udp-hole-punch/socket-pipes/UDPToTCPSocketPipe.ts","webpack://polykey/external \"cyclist\"","webpack://polykey/./src/peers/udp-hole-punch/socket-pipes/TCPToUDPSocketPipe.ts","webpack://polykey/./src/peers/peer-connection/PeerServer.ts","webpack://polykey/./src/peers/turn/TurnServer.ts","webpack://polykey/./src/peers/udp-hole-punch/UDPHolePunchServer.ts","webpack://polykey/./src/peers/peer-connection/PeerConnection.ts","webpack://polykey/./src/peers/MulticastBroadcaster.ts","webpack://polykey/./src/vaults/VaultManager.ts","webpack://polykey/./src/vaults/Vault.ts","webpack://polykey/external \"async-mutex\"","webpack://polykey/./src/git/GitBackend.ts","webpack://polykey/./src/git/upload-pack/uploadPack.ts","webpack://polykey/./src/git/upload-pack/GitPackedRefs.ts","webpack://polykey/./src/git/side-band/GitSideBand.ts","webpack://polykey/external \"buffer\"","webpack://polykey/./src/git/pack-objects/packObjects.ts","webpack://polykey/./src/git/pack-objects/log.ts","webpack://polykey/./src/git/pack-objects/GitObject.ts","webpack://polykey/./src/git/pack-objects/shasum.ts","webpack://polykey/external \"sha.js/sha1\"","webpack://polykey/./src/git/pack-objects/GitTree.ts","webpack://polykey/external \"sha.js\"","webpack://polykey/./src/git/GitFrontend.ts","webpack://polykey/./src/git/GitRequest.ts","webpack://polykey/./src/agent/PolykeyAgent.ts","webpack://polykey/external \"process\"","webpack://polykey/external \"configstore\"","webpack://polykey/external \"child_process\""],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;AACb,8CAA8C,cAAc;AAC5D,eAAe,mBAAO,CAAC,CAAqB;AAC5C,gBAAgB,mBAAO,CAAC,CAAU;AAClC;AACA;AACA,qDAAqD,KAAK,GAAG,KAAK;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,QAAQ,GAAG,UAAU;AACpF;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,UAAU,GAAG,UAAU;AACvE;AACA;AACA,kBAAkB,UAAU,GAAG,UAAU;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,cAAc;AACvE;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,IAAI,IAAI,EAAE,MAAM,IAAI,aAAa,IAAI;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACjGA,iC;;;;;;ACAA,6C;;;;;;ACAA,mC;;;;;;ACAA,+B;;;;;;ACAA,gC;;;;;;;ACAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D,gCAAgC,mBAAO,CAAC,EAAY;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;AC3DA,+B;;;;;;ACAA,sD;;;;;;ACAA,4C;;;;;;;ACAa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,gCAAgC,mBAAO,CAAC,EAAO;AAC/C,kCAAkC,mBAAO,CAAC,EAAS;AACnD,iBAAiB,mBAAO,CAAC,CAAQ;AACjC,0BAA0B,mBAAO,CAAC,CAAiB;AACnD,mBAAmB,mBAAO,CAAC,CAAa;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA,uBAAuB,WAAW;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;AC3Ya;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,6BAA6B,mBAAO,CAAC,CAAI;AACzC,mCAAmC,mBAAO,CAAC,CAAkB;AAC7D;AACA,qCAAqC,mBAAO,CAAC,EAAmB;AAChE;AACA,sCAAsC,mBAAO,CAAC,EAAqB;AACnE;AACA,uCAAuC,mBAAO,CAAC,EAAuB;AACtE;AACA,uCAAuC,mBAAO,CAAC,EAAsB;AACrE;AACA,wCAAwC,mBAAO,CAAC,EAAuB;AACvE;AACA;AACA,iCAAiC,uBAAuB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC7BA,mC;;;;;;ACAA,kC;;;;;;ACAA,0C;;;;;;ACAA,2D;;;;;;ACAA,2C;;;;;;ACAA,wC;;;;;;ACAA,sC;;;;;;ACAA,4C;;;;;;;ACAa;AACb;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Fa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D;AACA,+BAA+B,mBAAO,CAAC,CAAM;AAC7C,wCAAwC,mBAAO,CAAC,EAAiB;AACjE;AACA;AACA,OAAO,IAAI;AACX,YAAY,IAAI;AAChB,iBAAiB,IAAI;AACrB,kBAAkB,IAAI;AACtB,oBAAoB,IAAI;AACxB,oBAAoB,IAAI;AACxB;AACA;AACA;AACA,8BAA8B,EAAE;AAChC,8BAA8B,EAAE;AAChC;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA,gDAAgD,OAAO,gBAAgB,mBAAmB;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO,GAAG,SAAS;AACvE,kDAAkD,OAAO,GAAG,SAAS;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,GAAG;AAC9C;AACA;AACA;AACA;AACA;AACA,6EAA6E;AAC7E;AACA,mDAAmD,OAAO,GAAG,IAAI,IAAI,mBAAmB;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5HA,iC;;;;;;;ACAa;AACb;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,qBAAqB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,0BAA0B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,SAAS;AACxC;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,EAAE;AACvC;AACA;AACA;AACA,6BAA6B,YAAY,IAAI,aAAa,IAAI,iBAAiB,GAAG,4CAA4C;AAC9H;AACA,gCAAgC,eAAe,IAAI,gBAAgB,IAAI,oBAAoB,GAAG,+CAA+C;AAC7I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtLa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,6BAA6B,mBAAO,CAAC,CAAI;AACzC,+BAA+B,mBAAO,CAAC,EAAM;AAC7C,+BAA+B,mBAAO,CAAC,CAAM;AAC7C,oCAAoC,mBAAO,CAAC,EAAa;AACzD;AACA;AACA;AACA;AACA,8CAA8C,OAAO,WAAW,gBAAgB,GAAG,aAAa;AAChG,kCAAkC,gBAAgB,GAAG,aAAa;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,OAAO,gBAAgB,SAAS;AAChG,sCAAsC,OAAO;AAC7C;AACA;AACA,+CAA+C,2BAA2B;AAC1E,sDAAsD,SAAS;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO,YAAY,mBAAmB;AACxF;AACA,0DAA0D,IAAI;AAC9D;AACA;AACA;AACA;AACA,+CAA+C,IAAI;AACnD;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA,oBAAoB;AACpB;AACA,aAAa,eAAe,+BAA+B,cAAc;AACzE;AACA,oBAAoB;AACpB;AACA;AACA;;;;;;;;AC/Da;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D,gCAAgC,mBAAO,CAAC,CAAmB;AAC3D,gBAAgB,mBAAO,CAAC,EAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA,uBAAuB,QAAQ;AAC/B,yDAAyD,MAAM;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uGAAuG,aAAa;AACpH;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,+FAA+F,eAAe;AAC9G;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF,sBAAsB;AAC9G;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,wFAAwF,UAAU;AAClG;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,wFAAwF;AACxF;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B;AACA;AACA;AACA;AACA,qFAAqF,UAAU;AAC/F;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,gGAAgG,oBAAoB;AACpH;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA,yFAAyF,0BAA0B;AACnH;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B;AACA;AACA;AACA;AACA,0FAA0F,0BAA0B;AACpH;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,6FAA6F,YAAY;AACzG;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,uFAAuF,YAAY;AACnG;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,wFAAwF,uBAAuB;AAC/G;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,2FAA2F,YAAY;AACvG;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,YAAY;AACtG;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,4FAA4F,wBAAwB;AACpH;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,wFAAwF,wBAAwB;AAChH;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,uFAAuF,qBAAqB;AAC5G;AACA;AACA;AACA;AACA;AACA,eAAe,6DAA6D;AAC5E;AACA;AACA;AACA;AACA,uFAAuF,qBAAqB;AAC5G;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,uFAAuF,qBAAqB;AAC5G;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,6FAA6F,2BAA2B;AACxH;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,yFAAyF;AACzF;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,4FAA4F,SAAS;AACrG;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,2FAA2F,YAAY;AACvG;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,2FAA2F,YAAY;AACvG;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACngBA,8C;;;;;;ACAA,uC;;;;;;;ACAa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,6BAA6B,mBAAO,CAAC,CAAI;AACzC,6BAA6B,mBAAO,CAAC,CAAI;AACzC,+BAA+B,mBAAO,CAAC,CAAM;AAC7C,gCAAgC,mBAAO,CAAC,EAAO;AAC/C,iCAAiC,mBAAO,CAAC,EAAQ;AACjD,eAAe,mBAAO,CAAC,EAAM;AAC7B;AACA,iCAAiC,uBAAuB;AACxD,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,kBAAkB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,kCAAkC;AAC/F;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,+DAA+D;AAC/D;AACA,8FAA8F;AAC9F;AACA,+FAA+F,yBAAyB;AACxH;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qGAAqG,qBAAqB;AAC1H,2EAA2E,sBAAsB;AACjG;AACA,wEAAwE,yBAAyB;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,KAAK;AACjE;AACA;AACA,qEAAqE,kBAAkB;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,KAAK;AACjE;AACA;AACA,gFAAgF,kBAAkB;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qGAAqG,qBAAqB;AAC1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qGAAqG,sBAAsB;AAC3H;AACA,wEAAwE,aAAa;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,SAAS;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxpBA,kC;;;;;;ACAA,iC;;;;;;;ACAa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,6BAA6B,mBAAO,CAAC,CAAI;AACzC,+BAA+B,mBAAO,CAAC,CAAM;AAC7C,qCAAqC,mBAAO,CAAC,EAAmB;AAChE,eAAe,mBAAO,CAAC,CAAqB;AAC5C,mCAAmC,mBAAO,CAAC,CAAmB;AAC9D,qCAAqC,mBAAO,CAAC,EAA8B;AAC3E,yCAAyC,mBAAO,CAAC,EAAkC;AACnF,+CAA+C,mBAAO,CAAC,EAA+B;AACtF;AACA;AACA;AACA,qEAAqE,QAAQ,GAAG,OAAO;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,YAAY;AAC3D;AACA,KAAK;AACL;AACA;AACA,iCAAiC,uBAAuB;AACxD;AACA;AACA,gDAAgD,kBAAkB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,4FAA4F,eAAe;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D;AACA;AACA;AACA;AACA;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjOa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D;AACA,8BAA8B,mBAAO,CAAC,CAAK;AAC3C,iBAAiB,mBAAO,CAAC,CAAQ;AACjC,mBAAmB,mBAAO,CAAC,CAAa;AACxC,eAAe,mBAAO,CAAC,CAAwB;AAC/C,kBAAkB,mBAAO,CAAC,CAAiC;AAC3D,6CAA6C,mBAAO,CAAC,EAAsC;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,2CAA2C,QAAQ;AACnD,SAAS;AACT;AACA;AACA,qCAAqC,QAAQ,kEAAkE,6BAA6B;AAC5I,sCAAsC,QAAQ;AAC9C;AACA;AACA,0CAA0C,QAAQ,qCAAqC,6BAA6B;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,QAAQ;AAChD;AACA,SAAS;AACT;AACA;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA,SAAS;AACT;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,eAAe,6CAA6C;AAC5D;AACA;AACA;AACA;AACA,2FAA2F,2BAA2B;AACtH;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2FAA2F,2BAA2B;AACtH;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzOa;AACb;AACA;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,8BAA8B,mBAAO,CAAC,CAAK;AAC3C,mBAAmB,mBAAO,CAAC,CAAa;AACxC,eAAe,mBAAO,CAAC,CAAwB;AAC/C,6CAA6C,mBAAO,CAAC,EAAmC;AACxF,6CAA6C,mBAAO,CAAC,EAAmC;AACxF,iCAAiC,mBAAO,CAAC,EAA0B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,8DAA8D,2BAA2B,GAAG,2BAA2B;AACvH;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;AACA;AACA,+BAA+B;AAC/B,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;;;;;;;;ACjEa;AACb,8CAA8C,cAAc;AAC5D,iBAAiB,mBAAO,CAAC,CAAQ;AACjC,iCAAiC,mBAAO,CAAC,EAA2B;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,QAAQ;AAC5D;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,4CAA4C,QAAQ;AACpD,SAAS;AACT;AACA;AACA,sCAAsC,QAAQ,kEAAkE,2BAA2B;AAC3I,uCAAuC,QAAQ;AAC/C;AACA;AACA,uCAAuC,QAAQ,qCAAqC,2BAA2B;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,QAAQ;AAChD;AACA,SAAS;AACT;AACA;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA,SAAS;AACT;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA;AACA;;;;;;;ACzGA,oC;;;;;;;ACAa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,8BAA8B,mBAAO,CAAC,CAAK;AAC3C,iBAAiB,mBAAO,CAAC,CAAQ;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,QAAQ;AAC5D;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,4CAA4C,QAAQ;AACpD,SAAS;AACT;AACA;AACA,sCAAsC,QAAQ,kEAAkE,6BAA6B;AAC7I,uCAAuC,QAAQ;AAC/C;AACA;AACA,2CAA2C,QAAQ,qCAAqC,6BAA6B;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,QAAQ;AACzD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,QAAQ;AAChD;AACA,SAAS;AACT;AACA;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA,SAAS;AACT;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA;AACA;;;;;;;;AChHa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,mBAAmB,mBAAO,CAAC,CAAa;AACxC,0BAA0B,mBAAO,CAAC,EAAe;AACjD,qCAAqC,mBAAO,CAAC,EAAoB;AACjE,gBAAgB,mBAAO,CAAC,CAAa;AACrC,uBAAuB,mBAAO,CAAC,EAAsC;AACrE,kBAAkB,mBAAO,CAAC,CAAiC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,KAAK;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,QAAQ;AAC/D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,eAAe,yCAAyC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrGa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D;AACA,mBAAmB,mBAAO,CAAC,CAAa;AACxC,iBAAiB,mBAAO,CAAC,CAAQ;AACjC,8BAA8B,mBAAO,CAAC,CAAK;AAC3C,eAAe,mBAAO,CAAC,CAAwB;AAC/C,6CAA6C,mBAAO,CAAC,EAAsC;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kCAAkC,KAAK;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,2CAA2C,IAAI;AAC/C,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,KAAK;AACrC;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,cAAc;AAC1C;AACA;AACA,iDAAiD,cAAc,iCAAiC,qBAAqB,GAAG,kBAAkB;AAC1I;AACA,aAAa;AACb;AACA;AACA,gCAAgC,cAAc,wBAAwB,wBAAwB;AAC9F;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,wBAAwB,cAAc,uBAAuB,iBAAiB;AAC9E;AACA;AACA,4BAA4B,cAAc,uBAAuB,iBAAiB;AAClF;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,cAAc,iEAAiE,cAAc,GAAG,qBAAqB,OAAO,oBAAoB,GAAG,wBAAwB;AACvM;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,cAAc,uBAAuB,oBAAoB,GAAG,wBAAwB;AAChH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,cAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,KAAK;AACxD;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA,6FAA6F,cAAc;AAC3G;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA,8FAA8F,gBAAgB;AAC9G;AACA;AACA;AACA;AACA;AACA,yFAAyF,UAAU;AACnG;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA;AACA,6FAA6F,UAAU;AACvG;AACA;AACA;AACA,qCAAqC,iBAAiB;AACtD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;;;;;;AC3Oa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,mCAAmC,mBAAO,CAAC,CAAa;AACxD,eAAe,mBAAO,CAAC,CAAwB;AAC/C,iCAAiC,mBAAO,CAAC,EAA0B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,YAAY;AACnC;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,2BAA2B;AAC3B,SAAS;AACT;AACA;AACA;;;;;;;;AC1Ca;AACb;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D,mCAAmC,mBAAO,CAAC,CAAa;AACxD,iBAAiB,mBAAO,CAAC,EAAQ;AACjC,0BAA0B,mBAAO,CAAC,EAAe;AACjD,gBAAgB,mBAAO,CAAC,CAAa;AACrC,uBAAuB,mBAAO,CAAC,EAAsC;AACrE,kBAAkB,mBAAO,CAAC,CAAiC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA,uBAAuB,+BAA+B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;;;;;;;;ACnMa;AACb;AACA,4CAA4C;AAC5C;AACA;AACA,8CAA8C,cAAc;AAC5D,gCAAgC,mBAAO,CAAC,EAAO;AAC/C,mCAAmC,mBAAO,CAAC,CAAY;AACvD,iBAAiB,mBAAO,CAAC,CAAQ;AACjC,eAAe,mBAAO,CAAC,CAAqB;AAC5C,gBAAgB,mBAAO,CAAC,CAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,gCAAgC;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,0CAA0C;AACpH;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ga;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,6BAA6B,mBAAO,CAAC,CAAI;AACzC,+BAA+B,mBAAO,CAAC,CAAM;AAC7C,yCAAyC,mBAAO,CAAC,EAAgB;AACjE,gCAAgC,mBAAO,CAAC,EAAiB;AACzD,sBAAsB,mBAAO,CAAC,EAAa;AAC3C,qCAAqC,mBAAO,CAAC,EAAmB;AAChE,sCAAsC,mBAAO,CAAC,EAAoB;AAClE;AACA,iCAAiC,uBAAuB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,kBAAkB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,UAAU;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,kBAAkB;AACpE;AACA;AACA;AACA;AACA,gEAAgE,UAAU;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,UAAU;AACrD;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,sDAAsD,UAAU;AAChE;AACA;AACA;AACA,8DAA8D,UAAU;AACxE;AACA,iCAAiC,mBAAO,CAAC,EAAW;AACpD;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,kBAAkB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,UAAU;AACtE;AACA;AACA,gEAAgE,UAAU;AAC1E;AACA;AACA;AACA,4DAA4D,UAAU;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnPa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,6BAA6B,mBAAO,CAAC,CAAI;AACzC,+BAA+B,mBAAO,CAAC,CAAM;AAC7C,yCAAyC,mBAAO,CAAC,EAAgB;AACjE,sBAAsB,mBAAO,CAAC,EAAa;AAC3C,sBAAsB,mBAAO,CAAC,EAAa;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,mBAAO,CAAC,EAAW;AACpD;AACA;AACA;AACA;AACA,4CAA4C,kBAAkB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA,oDAAoD,WAAW;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA,uDAAuD,WAAW;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,WAAW;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,8BAA8B;AACnD;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qBAAqB,8BAA8B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,uEAAuE,kBAAkB;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,8BAA8B;AACnD;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qBAAqB,8BAA8B;AACnD;AACA;AACA,aAAa;AACb;AACA;AACA,iBAAiB,8BAA8B;AAC/C;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3SA,wC;;;;;;;ACAa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,+BAA+B,mBAAO,CAAC,CAAM;AAC7C,cAAc,mBAAO,CAAC,EAAoB;AAC1C,0BAA0B,mBAAO,CAAC,CAAiB;AACnD,qCAAqC,mBAAO,CAAC,EAA0B;AACvE,sCAAsC,mBAAO,CAAC,EAAyB;AACvE,sCAAsC,mBAAO,CAAC,EAA4B;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA,2BAA2B,YAAY;AACvC;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,6BAA6B;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,SAAS;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtHa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,+BAA+B,mBAAO,CAAC,CAAM;AAC7C,qCAAqC,mBAAO,CAAC,EAAc;AAC3D,wCAAwC,mBAAO,CAAC,EAAiB;AACjE,oCAAoC,8BAA8B;AAClE;AACA;AACA;AACA;AACA,0BAA0B,IAAI,GAAG,MAAM;AACvC;AACA,sBAAsB,4BAA4B,GAAG,KAAK;AAC1D,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA,mDAAmD,MAAM,GAAG,IAAI,EAAE,KAAK;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,IAAI;AACjD;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrDa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,4CAA4C;AAC5C,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvCa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,EAAQ;AACjC,0BAA0B,mBAAO,CAAC,CAAiB;AACnD,qCAAqC,mBAAO,CAAC,EAA2B;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;;;;;;ACrJA,mC;;;;;;;ACAa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,+BAA+B,mBAAO,CAAC,EAAM;AAC7C,+BAA+B,mBAAO,CAAC,CAAM;AAC7C,8BAA8B,mBAAO,CAAC,EAAO;AAC7C,kCAAkC,mBAAO,CAAC,EAAW;AACrD,iCAAiC,mBAAO,CAAC,EAAQ;AACjD,oCAAoC,mBAAO,CAAC,EAAa;AACzD,0BAA0B,mBAAO,CAAC,CAAiB;AACnD,2CAA2C,mBAAO,CAAC,EAAoB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvKa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,aAAa,mBAAO,CAAC,CAAM;AAC3B,oCAAoC,mBAAO,CAAC,EAAa;AACzD,2CAA2C,mBAAO,CAAC,EAAoB;AACvE,wCAAwC,mBAAO,CAAC,EAA8B;AAC9E;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA,sCAAsC,MAAM;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpFa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,iCAAiC,mBAAO,CAAC,EAAU;AACnD;AACA,iBAAiB,eAAe;AAChC,mDAAmD,KAAK,GAAG,6BAA6B;AACxF;AACA;AACA;AACA,iBAAiB,eAAe;AAChC,mDAAmD,KAAK,GAAG,6BAA6B;AACxF;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;AACA,8DAA8D,IAAI,aAAa,IAAI;AACnF;AACA;AACA,mCAAmC;AACnC,kCAAkC;AAClC,uDAAuD;AACvD,6DAA6D;AAC7D;AACA;AACA;AACA,yDAAyD,OAAO,iBAAiB,aAAa;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1Ca;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,+BAA+B,mBAAO,CAAC,EAAa;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACZA,wC;;;;;;;ACAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E,OAAO;AACrF;AACA;AACA;AACA,8EAA8E,OAAO;AACrF;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,wBAAwB;AACxB;AACA,wBAAwB;AACxB;AACA,wBAAwB;AACxB;AACA,wBAAwB;AACxB,uDAAuD,KAAK;AAC5D;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,gDAAgD;AAChD;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,WAAW,GAAG,WAAW,GAAG,UAAU,MAAM,WAAW;AACtG;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,mBAAmB;AACtE;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AClGA,mC;;;;;;;ACAa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,qCAAqC,mBAAO,CAAC,EAAc;AAC3D,cAAc,mBAAO,CAAC,EAAoB;AAC1C,kBAAkB,mBAAO,CAAC,CAA8B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,YAAY;AACpF,2IAA2I,oEAAoE;AAC/M,eAAe,mBAAmB;AAClC,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,kBAAkB;AAC1F,2IAA2I,oEAAoE;AAC/M,eAAe,mBAAmB;AAClC,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,eAAe,mBAAmB;AAClC,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Da;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,aAAa;AACrD;AACA;AACA;AACA,iCAAiC,2BAA2B;AAC5D;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;;;;;;;;ACnFa;AACb;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D,6BAA6B,mBAAO,CAAC,CAAI;AACzC,6BAA6B,mBAAO,CAAC,CAAI;AACzC,8BAA8B,mBAAO,CAAC,CAAK;AAC3C,+BAA+B,mBAAO,CAAC,CAAM;AAC7C,kCAAkC,mBAAO,CAAC,EAAS;AACnD,sCAAsC,mBAAO,CAAC,EAAa;AAC3D,mCAAmC,mBAAO,CAAC,CAAmB;AAC9D,wCAAwC,mBAAO,CAAC,EAAiB;AACjE,+BAA+B,mBAAO,CAAC,EAAY;AACnD,wBAAwB,mBAAO,CAAC,EAAe;AAC/C,gBAAgB,mBAAO,CAAC,EAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,SAAS;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6FAA6F,SAAS;AACtG;AACA;AACA;AACA;AACA,+DAA+D,SAAS;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,6BAA6B;AACpD;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,8CAA8C;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF,iEAAiE;AACtJ,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,0EAA0E,SAAS;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,sDAAsD,SAAS;AAC/D;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA,oFAAoF,gCAAgC;AACpH;AACA;AACA,oFAAoF,2BAA2B;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA;AACA,gFAAgF,mBAAmB;AACnG;AACA;AACA;AACA;AACA,+EAA+E,WAAW;AAC1F;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA,6EAA6E,aAAa;AAC1F;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA,gFAAgF,aAAa;AAC7F;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD;AACA;AACA,+EAA+E,gBAAgB;AAC/F;AACA;AACA,eAAe,0BAA0B;AACzC;AACA;AACA,iFAAiF,WAAW;AAC5F;AACA;AACA,eAAe,0BAA0B;AACzC;AACA;AACA,kFAAkF,gBAAgB;AAClG;AACA;AACA,eAAe,uCAAuC;AACtD;AACA;AACA,kFAAkF,gBAAgB;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,aAAa;AAC9F;AACA;AACA,eAAe,YAAY;AAC3B;AACA;AACA,qFAAqF,aAAa;AAClG;AACA;AACA,eAAe,YAAY;AAC3B;AACA;AACA,+EAA+E,mBAAmB;AAClG;AACA;AACA,eAAe,uBAAuB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,mBAAmB;AACnG;AACA;AACA,eAAe,YAAY;AAC3B;AACA;AACA,mFAAmF,mBAAmB;AACtG;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA;AACA;AACA,kFAAkF,cAAc;AAChG;AACA;AACA,eAAe,oDAAoD;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF,mBAAmB;AACtG;AACA;AACA,eAAe,wBAAwB;AACvC;AACA;AACA;AACA,oFAAoF,mBAAmB;AACvG;AACA;AACA,eAAe,wBAAwB;AACvC;AACA;AACA;AACA,gFAAgF,iBAAiB;AACjG;AACA;AACA,eAAe,oDAAoD;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF,mBAAmB;AACtG;AACA;AACA;AACA;AACA;AACA,eAAe,yCAAyC;AACxD;AACA;AACA,8EAA8E,mBAAmB;AACjG;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA,+EAA+E,aAAa;AAC5F;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA,+EAA+E,aAAa;AAC5F;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA;AACA,qFAAqF,aAAa;AAClG;AACA;AACA;AACA;AACA,gFAAgF,aAAa;AAC7F;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA,oFAAoF,mBAAmB;AACvG;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF,mBAAmB;AACxG;AACA;AACA,eAAe,YAAY;AAC3B;AACA;AACA,mFAAmF,mBAAmB;AACtG;AACA;AACA,eAAe,YAAY;AAC3B;AACA;AACA,mFAAmF,8BAA8B;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,aAAa;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,aAAa;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,kBAAkB;AACpF;AACA,8DAA8D,kBAAkB;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACroBA,oC;;;;;;ACAA,wC;;;;;;ACAA,0C","file":"polykey.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"polykey\"] = factory();\n\telse\n\t\troot[\"polykey\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 11);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Peer_1 = require(\"../../proto/js/Peer\");\nconst utils_1 = require(\"../utils\");\nclass Address {\n constructor(host, port) {\n const parsedAddress = Address.parseHelper(`${host}:${port}`);\n this.host = parsedAddress.host;\n this.port = parsedAddress.port;\n }\n updateHost(host) {\n if (host != undefined && host != '') {\n this.host = host;\n }\n }\n updatePort(port) {\n if (port != undefined && port != 0) {\n this.port = port;\n }\n }\n /**\n * Create an address object from a address string\n * @param addressString Address string in the format of `${this.ip}:${this.port}`\n */\n static parse(addressString) {\n const { host, port } = Address.parseHelper(addressString);\n return new Address(host, port);\n }\n /**\n * Create an address object from a net.AddressInfo\n * @param addressInfo AddressInfo of desired address\n */\n static fromAddressInfo(addressInfo) {\n const host = addressInfo.address == '::' ? 'localhost' : addressInfo.address;\n return new Address(host, addressInfo.port);\n }\n /**\n * Convert address into string of format `${this.host}:${this.port}`\n */\n toString() {\n return `${this.host}:${this.port}`;\n }\n static parseHelper(addressString) {\n var _a;\n if (!addressString || addressString == '') {\n throw Error(`cannot parse empty or undefined string`);\n }\n if (!Address.AddressRegex.test(addressString)) {\n throw Error(`cannot parse address string: '${addressString}'`);\n }\n // parse using regex\n const components = (_a = addressString.match(Address.AddressRegex)) === null || _a === void 0 ? void 0 : _a.slice(1, 3);\n const host = components[0];\n const port = parseInt(components[1]);\n return { host, port };\n }\n}\nexports.Address = Address;\n/**\n * Parses an address string in the format of `host:port` with the help of regex\n */\nAddress.AddressRegex = /^([a-zA-Z.]+|(?:[0-9]{1,3}\\.){3}[0-9]{1,3})(?::)([0-9]{1,5})$/;\nclass PeerInfo {\n constructor(publicKey, connectedAddress, relayPublicKey) {\n this.publicKey = PeerInfo.formatPublicKey(publicKey);\n if (connectedAddress) {\n const addr = Address.parse(connectedAddress);\n this.peerAddress = addr;\n }\n if (relayPublicKey) {\n this.relayPublicKey = PeerInfo.formatPublicKey(relayPublicKey);\n }\n }\n static formatPublicKey(str) {\n const startString = '-----BEGIN PGP PUBLIC KEY BLOCK-----';\n const endString = '-----END PGP PUBLIC KEY BLOCK-----';\n return str.slice(str.indexOf(startString), str.indexOf(endString) + endString.length);\n }\n deepCopy() {\n var _a;\n return new PeerInfo(this.publicKey, (_a = this.peerAddress) === null || _a === void 0 ? void 0 : _a.toString(), this.relayPublicKey);\n }\n toStringB64() {\n var _a;\n const message = Peer_1.peerInterface.PeerInfoMessage.encodeDelimited({\n publicKey: this.publicKey,\n peerAddress: (_a = this.peerAddress) === null || _a === void 0 ? void 0 : _a.toString(),\n relayPublicKey: this.relayPublicKey,\n }).finish();\n return utils_1.protobufToString(message);\n }\n static parseB64(str) {\n const message = utils_1.stringToProtobuf(str);\n const decoded = Peer_1.peerInterface.PeerInfoMessage.decodeDelimited(message);\n return new PeerInfo(decoded.publicKey, decoded.peerAddress, decoded.relayPublicKey);\n }\n}\nexports.default = PeerInfo;\n","module.exports = require(\"path\");","module.exports = require(\"../proto/js/Peer\");","module.exports = require(\"events\");","module.exports = require(\"os\");","module.exports = require(\"net\");","\"use strict\";\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst protobufjs = __importStar(require(\"protobufjs\"));\n/**\n * Returns a 5 character long random string of lower case letters\n */\nfunction randomString() {\n return Math.random()\n .toString(36)\n .replace(/[^a-z]+/g, '')\n .substr(0, 5);\n}\nexports.randomString = randomString;\n/**\n * Gets the first promise fulfiled\n * @param promiseList List of promises\n */\nasync function promiseAny(promiseList) {\n return await new Promise((resolve, reject) => {\n const errorList = [];\n for (const promise of promiseList) {\n promise\n .then((p) => {\n resolve(p);\n })\n .catch((_) => null);\n promise.catch((error) => {\n errorList.push(error);\n // check if all have failed\n if (errorList.length == promiseList.length) {\n reject(errorList);\n }\n });\n }\n });\n}\nexports.promiseAny = promiseAny;\nfunction protobufToString(message) {\n return protobufjs.util.base64.encode(message, 0, message.length);\n}\nexports.protobufToString = protobufToString;\nfunction stringToProtobuf(str) {\n const buffer = protobufjs.util.newBuffer(protobufjs.util.base64.length(str));\n protobufjs.util.base64.decode(str, buffer, 0);\n return buffer;\n}\nexports.stringToProtobuf = stringToProtobuf;\nasync function sleep(ms) {\n await new Promise((resolve, reject) => {\n setTimeout(() => resolve(), ms);\n });\n}\nexports.sleep = sleep;\n","module.exports = require(\"fs\");","module.exports = require(\"../proto/compiled/Peer_pb\");","module.exports = require(\"readable-stream\");","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst dgram_1 = __importDefault(require(\"dgram\"));\nconst cyclist_1 = __importDefault(require(\"cyclist\"));\nconst events_1 = require(\"events\");\nconst readable_stream_1 = require(\"readable-stream\");\nconst PeerInfo_1 = require(\"../PeerInfo\");\nconst EXTENSION = 0;\nconst VERSION = 1;\nconst UINT16 = 0xffff;\nconst ID_MASK = 0xf << 4;\nconst MTU = 1400;\nconst PACKET_DATA = 0 << 4;\nconst PACKET_FIN = 1 << 4;\nconst PACKET_STATE = 2 << 4;\nconst PACKET_RESET = 3 << 4;\nconst PACKET_SYN = 4 << 4;\nconst MIN_PACKET_SIZE = 20;\nconst DEFAULT_WINDOW_SIZE = 1 << 18;\nconst CLOSE_GRACE = 5000;\nconst BUFFER_SIZE = 512;\nconst uint32 = function (n) {\n return n >>> 0;\n};\nconst uint16 = function (n) {\n return n & UINT16;\n};\nconst timestamp = (function () {\n const offset = process.hrtime();\n const then = Date.now() * 1000;\n return function () {\n const diff = process.hrtime(offset);\n return uint32(then + 1000000 * diff[0] + ((diff[1] / 1000) | 0));\n };\n})();\nconst bufferToPacket = function (buffer) {\n const packet = {\n id: buffer[0] & ID_MASK,\n connection: buffer.readUInt16BE(2),\n timestamp: buffer.readUInt32BE(4),\n timediff: buffer.readUInt32BE(8),\n window: buffer.readUInt32BE(12),\n seq: buffer.readUInt16BE(16),\n ack: buffer.readUInt16BE(18),\n data: buffer.length > 20 ? buffer.slice(20) : null,\n };\n return packet;\n};\nconst packetToBuffer = function (packet) {\n const buffer = Buffer.alloc(20 + (packet.data ? packet.data.length : 0));\n buffer[0] = packet.id | VERSION;\n buffer[1] = EXTENSION;\n buffer.writeUInt16BE(packet.connection, 2);\n buffer.writeUInt32BE(packet.timestamp, 4);\n buffer.writeUInt32BE(packet.timediff, 8);\n buffer.writeUInt32BE(packet.window, 12);\n buffer.writeUInt16BE(packet.seq, 16);\n buffer.writeUInt16BE(packet.ack, 18);\n if (packet.data) {\n packet.data.copy(buffer, 20);\n }\n return buffer;\n};\nconst createPacket = function (connection, id, data) {\n return {\n id: id,\n connection: id === PACKET_SYN ? connection._recvId : connection._sendId,\n seq: connection._seq,\n ack: connection._ack,\n timestamp: timestamp(),\n timediff: 0,\n window: DEFAULT_WINDOW_SIZE,\n data: data,\n sent: 0,\n };\n};\nclass MTPConnection extends readable_stream_1.Duplex {\n constructor(port, host, socket, syn) {\n super();\n this.remoteAddress = new PeerInfo_1.Address(host, port);\n if (isNaN(port)) {\n throw Error('port cannot be NaN');\n }\n this.port = port;\n this.host = host;\n this.socket = socket;\n this._outgoing = cyclist_1.default(BUFFER_SIZE);\n this._incoming = cyclist_1.default(BUFFER_SIZE);\n this._closed = false;\n this._inflightPackets = 0;\n this._closed = false;\n this._alive = false;\n if (syn) {\n this._connecting = false;\n this._recvId = uint16(syn.connection + 1);\n this._sendId = syn.connection;\n this._seq = (Math.random() * UINT16) | 0;\n this._ack = syn.seq;\n this._synack = createPacket(this, PACKET_STATE, null);\n this._transmit(this._synack);\n }\n else {\n this._connecting = true;\n this._recvId = 0; // tmp value for v8 opt\n this._sendId = 0; // tmp value for v8 opt\n this._seq = (Math.random() * UINT16) | 0;\n this._ack = 0;\n this._synack = undefined;\n socket.on('listening', () => {\n this._recvId = socket.address().port; // using the port gives us system wide clash protection\n this._sendId = uint16(this._recvId + 1);\n this._sendOutgoing(createPacket(this, PACKET_SYN, null));\n });\n socket.on('error', (err) => {\n this.emit('error', err);\n });\n socket.bind();\n }\n const resend = setInterval(this._resend.bind(this), 500);\n const keepAlive = setInterval(this._keepAlive.bind(this), 10 * 1000);\n let tick = 0;\n const closed = () => {\n if (++tick === 2) {\n this._closing();\n }\n };\n const sendFin = () => {\n if (this._connecting) {\n return this.once('connect', sendFin);\n }\n this._sendOutgoing(createPacket(this, PACKET_FIN, null));\n this.once('flush', closed);\n };\n this.once('finish', sendFin);\n this.once('close', () => {\n if (!syn) {\n setTimeout(socket.close.bind(socket), CLOSE_GRACE);\n }\n clearInterval(resend);\n clearInterval(keepAlive);\n });\n this.once('end', () => {\n process.nextTick(closed);\n });\n }\n get RecvID() {\n return this._recvId;\n }\n destroy(err, callback) {\n this.end();\n return this;\n }\n address() {\n return new PeerInfo_1.Address(this.host, this.port);\n }\n _read() {\n // do nothing...\n }\n _write(data, enc, callback) {\n if (this._connecting) {\n return this._writeOnce('connect', data, enc, callback);\n }\n while (this._writable()) {\n const payload = this._payload(data);\n this._sendOutgoing(createPacket(this, PACKET_DATA, payload));\n if (payload.length === data.length) {\n return callback();\n }\n data = data.slice(payload.length);\n }\n this._writeOnce('flush', data, enc, callback);\n }\n _writeOnce(event, data, enc, callback) {\n this.once(event, () => {\n this._write(data, enc, callback);\n });\n }\n _writable() {\n return this._inflightPackets < BUFFER_SIZE - 1;\n }\n _payload(data) {\n if (data.length > MTU) {\n return data.slice(0, MTU);\n }\n return data;\n }\n _resend() {\n const offset = this._seq - this._inflightPackets;\n const first = this._outgoing.get(offset);\n if (!first) {\n return;\n }\n const timeout = 500000;\n const now = timestamp();\n if (uint32(first.sent - now) < timeout) {\n return;\n }\n for (let i = 0; i < this._inflightPackets; i++) {\n const packet = this._outgoing.get(offset + i);\n if (uint32(packet.sent - now) >= timeout) {\n this._transmit(packet);\n }\n }\n }\n _keepAlive() {\n if (this._alive) {\n return (this._alive = false);\n }\n this._sendAck();\n }\n _closing() {\n if (this._closed) {\n return;\n }\n this._closed = true;\n process.nextTick(this.emit.bind(this, 'close'));\n }\n // packet handling\n _recvAck(ack) {\n const offset = this._seq - this._inflightPackets;\n const acked = uint16(ack - offset) + 1;\n if (acked >= BUFFER_SIZE) {\n return; // sanity check\n }\n for (let i = 0; i < acked; i++) {\n this._outgoing.del(offset + i);\n this._inflightPackets--;\n }\n if (!this._inflightPackets) {\n this.emit('flush');\n }\n }\n _recvIncoming(packet) {\n if (this._closed) {\n return;\n }\n if (packet.id === PACKET_SYN && this._connecting) {\n this._transmit(this._synack);\n return;\n }\n if (packet.id === PACKET_RESET) {\n this.push(null);\n this.end();\n this._closing();\n return;\n }\n if (this._connecting) {\n if (packet.id !== PACKET_STATE) {\n return this._incoming.put(packet.seq, packet);\n }\n this._ack = uint16(packet.seq - 1);\n this._recvAck(packet.ack);\n this._connecting = false;\n this.emit('connect');\n packet = this._incoming.del(packet.seq);\n if (!packet) {\n return;\n }\n }\n if (uint16(packet.seq - this._ack) >= BUFFER_SIZE) {\n return this._sendAck(); // old packet\n }\n this._recvAck(packet.ack); // TODO: other calcs as well\n if (packet.id === PACKET_STATE) {\n return;\n }\n this._incoming.put(packet.seq, packet);\n while ((packet = this._incoming.del(this._ack + 1))) {\n this._ack = uint16(this._ack + 1);\n if (packet.id === PACKET_DATA) {\n this.push(packet.data);\n }\n if (packet.id === PACKET_FIN) {\n this.push(null);\n }\n }\n this._sendAck();\n }\n _sendAck() {\n this._transmit(createPacket(this, PACKET_STATE, null)); // TODO: make this delayed\n }\n _sendOutgoing(packet) {\n this._outgoing.put(packet.seq, packet);\n this._seq = uint16(this._seq + 1);\n this._inflightPackets++;\n this._transmit(packet);\n }\n _transmit(packet) {\n try {\n packet.sent = packet.sent === 0 ? packet.timestamp : timestamp();\n const message = packetToBuffer(packet);\n this._alive = true;\n this.socket.send(message, 0, message.length, this.port, this.host);\n }\n catch (error) { }\n }\n}\nexports.MTPConnection = MTPConnection;\nclass UTPServer extends events_1.EventEmitter {\n constructor() {\n super();\n this._connections = {};\n }\n address() {\n return PeerInfo_1.Address.fromAddressInfo(this._socket.address());\n }\n listenSocket(socket, onlistening) {\n this._socket = socket;\n const connections = this._connections;\n socket.on('message', (message, rinfo) => {\n if (message.length < MIN_PACKET_SIZE) {\n return;\n }\n const packet = bufferToPacket(message);\n const id = rinfo.address + ':' + (packet.id === PACKET_SYN ? uint16(packet.connection + 1) : packet.connection);\n if (connections[id]) {\n return connections[id]._recvIncoming(packet);\n }\n if (packet.id !== PACKET_SYN || this._closed) {\n return;\n }\n connections[id] = new MTPConnection(rinfo.port, rinfo.address, socket, packet);\n connections[id].on('close', () => {\n delete connections[id];\n });\n this.emit('connection', connections[id]);\n });\n socket.once('listening', () => {\n this.emit('listening');\n });\n if (onlistening) {\n this.once('listening', onlistening);\n }\n }\n listen(connection, onlistening) {\n this.listenSocket(connection.socket, onlistening);\n }\n listenPort(port, onlistening) {\n const socket = dgram_1.default.createSocket('udp4');\n this.listenSocket(socket, onlistening);\n socket.bind(port);\n }\n close(cb) {\n let openConnections = 0;\n this._closed = true;\n function onClose() {\n if (--openConnections === 0) {\n if (this._socket) {\n this._socket.close();\n }\n if (cb) {\n cb();\n }\n }\n }\n for (const id in this._connections) {\n if (this._connections[id]._closed) {\n continue;\n }\n openConnections++;\n this._connections[id].once('close', onClose);\n this._connections[id].end();\n }\n }\n}\nexports.UTPServer = UTPServer;\nfunction createServer(onconnection) {\n const server = new UTPServer();\n if (onconnection) {\n server.on('connection', onconnection);\n }\n return server;\n}\nexports.createServer = createServer;\nfunction connect(port, host) {\n const socket = dgram_1.default.createSocket('udp4');\n const connection = new MTPConnection(port, host || '127.0.0.1', socket, undefined);\n socket.on('message', (message) => {\n if (message.length < MIN_PACKET_SIZE) {\n return;\n }\n const packet = bufferToPacket(message);\n if (packet.id === PACKET_SYN) {\n return;\n }\n if (packet.connection !== connection.RecvID) {\n return;\n }\n connection._recvIncoming(packet);\n });\n return connection;\n}\nexports.connect = connect;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst os_1 = __importDefault(require(\"os\"));\nconst PeerInfo_1 = __importDefault(require(\"./peers/PeerInfo\"));\nexports.PeerInfo = PeerInfo_1.default;\nconst KeyManager_1 = __importDefault(require(\"./keys/KeyManager\"));\nexports.KeyManager = KeyManager_1.default;\nconst PeerManager_1 = __importDefault(require(\"./peers/PeerManager\"));\nexports.PeerManager = PeerManager_1.default;\nconst VaultManager_1 = __importDefault(require(\"./vaults/VaultManager\"));\nexports.VaultManager = VaultManager_1.default;\nconst PolykeyAgent_1 = __importDefault(require(\"./agent/PolykeyAgent\"));\nexports.PolykeyAgent = PolykeyAgent_1.default;\nconst PolykeyClient_1 = __importDefault(require(\"./agent/PolykeyClient\"));\nexports.PolykeyClient = PolykeyClient_1.default;\nclass Polykey {\n constructor(polykeyPath = `${os_1.default.homedir()}/.polykey`, fileSystem, keyManager, peerManager, vaultManager) {\n this.polykeyPath = polykeyPath;\n // Set key manager\n this.keyManager = keyManager !== null && keyManager !== void 0 ? keyManager : new KeyManager_1.default(this.polykeyPath, fileSystem);\n // Initialize peer store and peer discovery classes\n this.peerManager = peerManager !== null && peerManager !== void 0 ? peerManager : new PeerManager_1.default(this.polykeyPath, fileSystem, this.keyManager);\n // Set or Initialize vaultManager\n this.vaultManager = vaultManager !== null && vaultManager !== void 0 ? vaultManager : new VaultManager_1.default(this.polykeyPath, fileSystem, this.keyManager, this.peerManager);\n }\n}\nexports.default = Polykey;\n","module.exports = require(\"crypto\");","module.exports = require(\"dgram\");","module.exports = require(\"@grpc/grpc-js\");","module.exports = require(\"../proto/compiled/Peer_grpc_pb\");","module.exports = require(\"isomorphic-git\");","module.exports = require(\"encryptedfs\");","module.exports = require(\"virtualfs\");","module.exports = require(\"../proto/js/Git\");","\"use strict\";\n/**\npkt-line Format\n---------------\n\nMuch (but not all) of the payload is described around pkt-lines.\n\nA pkt-line is a variable length binary string. The first four bytes\nof the line, the pkt-len, indicates the total length of the line,\nin hexadecimal. The pkt-len includes the 4 bytes used to contain\nthe length's hexadecimal representation.\n\nA pkt-line MAY contain binary data, so implementors MUST ensure\npkt-line parsing/formatting routines are 8-bit clean.\n\nA non-binary line SHOULD BE terminated by an LF, which if present\nMUST be included in the total length. Receivers MUST treat pkt-lines\nwith non-binary data the same whether or not they contain the trailing\nLF (stripping the LF if present, and not complaining when it is\nmissing).\n\nThe maximum length of a pkt-line's data component is 65516 bytes.\nImplementations MUST NOT send pkt-line whose length exceeds 65520\n(65516 bytes of payload + 4 bytes of length data).\n\nImplementations SHOULD NOT send an empty pkt-line (\"0004\").\n\nA pkt-line with a length field of 0 (\"0000\"), called a flush-pkt,\nis a special case and MUST be handled differently than an empty\npkt-line (\"0004\").\n\n----\n pkt-line = data-pkt / flush-pkt\n\n data-pkt = pkt-len pkt-payload\n pkt-len = 4*(HEXDIG)\n pkt-payload = (pkt-len - 4)*(OCTET)\n\n flush-pkt = \"0000\"\n----\n\nExamples (as C-style strings):\n\n----\n pkt-line actual value\n ---------------------------------\n \"0006a\\n\" \"a\\n\"\n \"0005a\" \"a\"\n \"000bfoobar\\n\" \"foobar\\n\"\n \"0004\" \"\"\n----\n*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction padHex(b, n) {\n const s = n.toString(16);\n return '0'.repeat(b - s.length) + s;\n}\n// I'm really using this more as a namespace.\n// There's not a lot of \"state\" in a pkt-line\nclass GitPktLine {\n static flush() {\n return Buffer.from('0000', 'utf8');\n }\n static encode(line) {\n if (typeof line === 'string') {\n line = Buffer.from(line);\n }\n const length = line.length + 4;\n const hexlength = padHex(4, length);\n return Buffer.concat([Buffer.from(hexlength, 'utf8'), line]);\n }\n static streamReader(stream) {\n return async function read() {\n try {\n let length = await stream.slice(4);\n if (length === null)\n return true;\n length = parseInt(length.toString('utf8'), 16);\n if (length === 0)\n return null;\n let buffer = await stream.slice(length - 4);\n if (buffer === null)\n return true;\n return buffer;\n }\n catch (err) {\n console.log('error', err);\n return true;\n }\n };\n }\n}\nexports.default = GitPktLine;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// This is a convenience wrapper for reading and writing files in the 'refs' directory.\nconst path_1 = __importDefault(require(\"path\"));\nconst GitPackedRefs_1 = __importDefault(require(\"./GitPackedRefs\"));\n// @see https://git-scm.com/docs/git-rev-parse.html#_specifying_revisions\nconst refpaths = (ref) => [\n `${ref}`,\n `refs/${ref}`,\n `refs/tags/${ref}`,\n `refs/heads/${ref}`,\n `refs/remotes/${ref}`,\n `refs/remotes/${ref}/HEAD`,\n];\nfunction compareRefNames(a, b) {\n // https://stackoverflow.com/a/40355107/2168416\n const _a = a.replace(/\\^\\{\\}$/, '');\n const _b = b.replace(/\\^\\{\\}$/, '');\n const tmp = -(_a < _b) || +(_a > _b);\n if (tmp === 0) {\n return a.endsWith('^{}') ? 1 : -1;\n }\n return tmp;\n}\n// @see https://git-scm.com/docs/gitrepository-layout\nconst GIT_FILES = ['config', 'description', 'index', 'shallow', 'commondir'];\n// This function is used to get all the files in the refs folder for listRefs function\nasync function recursiveDirectoryWalk(dir, fileSystem) {\n return new Promise((resolve, reject) => {\n let results = [];\n fileSystem.promises\n .readdir(dir)\n .then(async (list) => {\n var pending = list.length;\n if (!pending)\n return resolve(results);\n list.forEach(async function (file) {\n file = path_1.default.resolve(dir, file);\n fileSystem.promises.stat(file).then(async (stat) => {\n if (stat && stat.isDirectory()) {\n const res = await recursiveDirectoryWalk(file, fileSystem);\n results = results.concat(res);\n if (!--pending)\n resolve(results);\n }\n else {\n results.push(file);\n if (!--pending)\n resolve(results);\n }\n });\n });\n })\n .catch((err) => {\n if (err)\n return reject(err);\n });\n });\n}\nclass GitRefManager {\n static async packedRefs(fileSystem, gitdir) {\n const text = fileSystem.readFileSync(`${gitdir}/packed-refs`, { encoding: 'utf8' });\n const packed = GitPackedRefs_1.default.from(text);\n return packed.refs;\n }\n // List all the refs that match the `filepath` prefix\n static async listRefs(fileSystem, gitdir, filepath) {\n const packedMap = GitRefManager.packedRefs(fileSystem, gitdir);\n let files = [];\n try {\n files = await recursiveDirectoryWalk(`${gitdir}/${filepath}`, fileSystem);\n files = files.map((x) => x.replace(`${gitdir}/${filepath}/`, ''));\n }\n catch (err) {\n files = [];\n }\n for (let key of (await packedMap).keys()) {\n // filter by prefix\n if (key.startsWith(filepath)) {\n // remove prefix\n key = key.replace(filepath + '/', '');\n // Don't include duplicates; the loose files have precedence anyway\n if (!files.includes(key)) {\n files.push(key);\n }\n }\n }\n // since we just appended things onto an array, we need to sort them now\n files.sort(compareRefNames);\n return files;\n }\n static async resolve(fileSystem, gitdir, ref, depth) {\n if (depth !== undefined) {\n depth--;\n if (depth === -1) {\n return ref;\n }\n }\n // Is it a ref pointer?\n if (ref.startsWith('ref: ')) {\n ref = ref.slice('ref: '.length);\n return GitRefManager.resolve(fileSystem, gitdir, ref, depth);\n }\n // Is it a complete and valid SHA?\n if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) {\n return ref;\n }\n // We need to alternate between the file system and the packed-refs\n const packedMap = await GitRefManager.packedRefs(fileSystem, gitdir);\n // Look in all the proper paths, in this order\n const allpaths = refpaths(ref).filter((p) => !GIT_FILES.includes(p)); // exclude git system files (#709)\n for (const ref of allpaths) {\n const sha = fileSystem.readFileSync(`${gitdir}/${ref}`, { encoding: 'utf8' }).toString() || packedMap.get(ref);\n if (sha) {\n return GitRefManager.resolve(fileSystem, gitdir, sha.trim(), depth);\n }\n }\n // Do we give up?\n throw Error('RefNotFound');\n }\n}\nexports.default = GitRefManager;\n","module.exports = require(\"pako\");","\"use strict\";\n// The amount of work that went into crafting these cases to handle\n// -0 (just so we don't lose that information when parsing and reconstructing)\n// but can also default to +0 was extraordinary.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction simpleSign(n) {\n return Math.sign(n) || (Object.is(n, -0) ? -1 : 1);\n}\nfunction negateExceptForZero(n) {\n return n === 0 ? n : -n;\n}\nfunction formatTimezoneOffset(minutes) {\n let sign = simpleSign(negateExceptForZero(minutes));\n minutes = Math.abs(minutes);\n let hours = Math.floor(minutes / 60);\n minutes -= hours * 60;\n let strHours = String(hours);\n let strMinutes = String(minutes);\n if (strHours.length < 2)\n strHours = '0' + strHours;\n if (strMinutes.length < 2)\n strMinutes = '0' + strMinutes;\n return (sign === -1 ? '-' : '+') + strHours + strMinutes;\n}\nfunction parseTimezoneOffset(offset) {\n let [, sign, hours, minutes] = offset.match(/(\\+|-)(\\d\\d)(\\d\\d)/);\n minutes = (sign === '+' ? 1 : -1) * (Number(hours) * 60 + Number(minutes));\n return negateExceptForZero(minutes);\n}\nfunction parseAuthor(author) {\n let [, name, email, timestamp, offset] = author.match(/^(.*) <(.*)> (.*) (.*)$/);\n return {\n name: name,\n email: email,\n timestamp: Number(timestamp),\n timezoneOffset: parseTimezoneOffset(offset),\n };\n}\nfunction normalize(str) {\n // remove all \n str = str.replace(/\\r/g, '');\n // no extra newlines up front\n str = str.replace(/^\\n+/, '');\n // and a single newline at the end\n str = str.replace(/\\n+$/, '') + '\\n';\n return str;\n}\nfunction indent(str) {\n return (str\n .trim()\n .split('\\n')\n .map((x) => ' ' + x)\n .join('\\n') + '\\n');\n}\nfunction outdent(str) {\n return str\n .split('\\n')\n .map((x) => x.replace(/^ /, ''))\n .join('\\n');\n}\n// TODO: Make all functions have static async signature?\nclass GitCommit {\n constructor(commit) {\n if (typeof commit === 'string') {\n this._commit = commit;\n }\n else if (Buffer.isBuffer(commit)) {\n this._commit = commit.toString('utf8');\n }\n else if (typeof commit === 'object') {\n this._commit = GitCommit.render(commit);\n }\n else {\n throw new Error('invalid type passed to GitCommit constructor');\n }\n }\n static fromPayloadSignature({ payload, signature }) {\n let headers = GitCommit.justHeaders(payload);\n let message = GitCommit.justMessage(payload);\n let commit = normalize(headers + '\\ngpgsig' + indent(signature) + '\\n' + message);\n return new GitCommit(commit);\n }\n static from(commit) {\n return new GitCommit(commit);\n }\n toObject() {\n return Buffer.from(this._commit, 'utf8');\n }\n // Todo: allow setting the headers and message\n headers() {\n return this.parseHeaders();\n }\n // Todo: allow setting the headers and message\n message() {\n return GitCommit.justMessage(this._commit);\n }\n parse() {\n return Object.assign({ message: this.message() }, this.headers());\n }\n static justMessage(commit) {\n return normalize(commit.slice(commit.indexOf('\\n\\n') + 2));\n }\n static justHeaders(commit) {\n return commit.slice(0, commit.indexOf('\\n\\n'));\n }\n parseHeaders() {\n let headers = GitCommit.justHeaders(this._commit).split('\\n');\n let hs = [];\n for (let h of headers) {\n if (h[0] === ' ') {\n // combine with previous header (without space indent)\n hs[hs.length - 1] += '\\n' + h.slice(1);\n }\n else {\n hs.push(h);\n }\n }\n let obj = {\n parent: [],\n };\n for (let h of hs) {\n let key = h.slice(0, h.indexOf(' '));\n let value = h.slice(h.indexOf(' ') + 1);\n if (Array.isArray(obj[key])) {\n obj[key].push(value);\n }\n else {\n obj[key] = value;\n }\n }\n if (obj.author) {\n obj.author = parseAuthor(obj.author);\n }\n if (obj.committer) {\n obj.committer = parseAuthor(obj.committer);\n }\n return obj;\n }\n static renderHeaders(obj) {\n let headers = '';\n if (obj.tree) {\n headers += `tree ${obj.tree}\\n`;\n }\n else {\n headers += `tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\\n`; // the null tree\n }\n if (obj.parent) {\n if (obj.parent.length === undefined) {\n throw new Error(`commit 'parent' property should be an array`);\n }\n for (let p of obj.parent) {\n headers += `parent ${p}\\n`;\n }\n }\n let author = obj.author;\n headers += `author ${author.name} <${author.email}> ${author.timestamp} ${formatTimezoneOffset(author.timezoneOffset)}\\n`;\n let committer = obj.committer || obj.author;\n headers += `committer ${committer.name} <${committer.email}> ${committer.timestamp} ${formatTimezoneOffset(committer.timezoneOffset)}\\n`;\n if (obj.gpgsig) {\n headers += 'gpgsig' + indent(obj.gpgsig);\n }\n return headers;\n }\n static render(obj) {\n return GitCommit.renderHeaders(obj) + '\\n' + normalize(obj.message);\n }\n render() {\n return this._commit;\n }\n withoutSignature() {\n let commit = normalize(this._commit);\n if (commit.indexOf('\\ngpgsig') === -1)\n return commit;\n let headers = commit.slice(0, commit.indexOf('\\ngpgsig'));\n let message = commit.slice(commit.indexOf('-----END PGP SIGNATURE-----\\n') + '-----END PGP SIGNATURE-----\\n'.length);\n return normalize(headers + '\\n' + message);\n }\n isolateSignature() {\n let signature = this._commit.slice(this._commit.indexOf('-----BEGIN PGP SIGNATURE-----'), this._commit.indexOf('-----END PGP SIGNATURE-----') + '-----END PGP SIGNATURE-----'.length);\n return outdent(signature);\n }\n}\nexports.default = GitCommit;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst fs_1 = __importDefault(require(\"fs\"));\nconst pako_1 = __importDefault(require(\"pako\"));\nconst path_1 = __importDefault(require(\"path\"));\nconst GitObject_1 = __importDefault(require(\"./GitObject\"));\nconst PackfileCache = new Map();\nclass GitObjectManager {\n static async read(fileSystem, gitdir, oid, format = 'content') {\n // Look for it in the loose object directory.\n let file = fileSystem.readFileSync(`${gitdir}/objects/${oid.slice(0, 2)}/${oid.slice(2)}`);\n let source = `./objects/${oid.slice(0, 2)}/${oid.slice(2)}`;\n // Check to see if it's in a packfile.\n if (!file) {\n // Curry the current read method so that the packfile un-deltification\n // process can acquire external ref-deltas.\n const getExternalRefDelta = (oid) => GitObjectManager.read(fileSystem, gitdir, oid);\n // Iterate through all the .pack files\n let list = fs_1.default.readdirSync(path_1.default.join(gitdir, '/objects/pack'));\n list = list.filter((x) => x.endsWith('.pack'));\n for (let filename of list) {\n // Try to get the packfile from the in-memory cache\n let p = PackfileCache.get(filename);\n // If the packfile DOES have the oid we're looking for...\n if (p.offsets.has(oid)) {\n // Make sure the packfile is loaded in memory\n if (!p.pack) {\n const pack = fileSystem.readFileSync(`${gitdir}/objects/pack/${filename}`);\n await p.load({ pack });\n }\n // Get the resolved git object from the packfile\n let result = await p.read({ oid, getExternalRefDelta });\n result.source = `./objects/pack/${filename}`;\n return result;\n }\n }\n }\n // Check to see if it's in shallow commits.\n if (!file) {\n let text = fileSystem.readFileSync(`${gitdir}/shallow`, { encoding: 'utf8' });\n if (text !== null && text.includes(oid)) {\n throw new Error(`ReadShallowObjectFail: ${oid}`);\n }\n }\n // Finally\n if (!file) {\n throw new Error(`ReadObjectFail: ${oid}`);\n }\n if (format === 'deflated') {\n return { format: 'deflated', object: file, source };\n }\n let buffer = Buffer.from(pako_1.default.inflate(file));\n if (format === 'wrapped') {\n return { format: 'wrapped', object: buffer, source };\n }\n let { type, object } = GitObject_1.default.unwrap({ oid, buffer });\n if (format === 'content')\n return { type, format: 'content', object, source };\n }\n}\nexports.default = GitObjectManager;\n","\"use strict\";\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst PeerInfo_1 = __importStar(require(\"../peers/PeerInfo\"));\nconst Agent_1 = require(\"../../proto/js/Agent\");\nclass PolykeyClient {\n constructor(getStream) {\n this.getStream = getStream;\n }\n async sendRequestToAgent(request) {\n const stream = this.getStream();\n const responseList = await new Promise((resolve, reject) => {\n try {\n const responseList = [];\n stream.on('data', (data) => {\n if (data instanceof Uint8Array) {\n responseList.push(data);\n }\n else {\n responseList.push(...data);\n }\n });\n stream.on('error', (err) => {\n reject(err);\n });\n stream.on('end', () => {\n resolve(responseList);\n });\n if (!stream.writableEnded) {\n stream.write(request);\n }\n }\n catch (err) {\n reject(err);\n }\n });\n return responseList;\n }\n async handleAgentCommunication(type, nodePath, request) {\n // Encode message and sent\n const agentMessage = Agent_1.agentInterface.AgentMessage.encodeDelimited({\n type: type,\n isResponse: false,\n nodePath: nodePath,\n subMessage: request,\n }).finish();\n const responseList = await this.sendRequestToAgent(agentMessage);\n const agentMessageList = [];\n for (const response of responseList.values()) {\n const { subMessage, type } = Agent_1.agentInterface.AgentMessage.decodeDelimited(response);\n if (type == Agent_1.agentInterface.AgentMessageType.ERROR) {\n const { error } = Agent_1.agentInterface.ErrorMessage.decodeDelimited(subMessage);\n const reason = new Error(`Agent Error: ${error}`);\n throw reason;\n }\n else {\n agentMessageList.push(Agent_1.agentInterface.AgentMessage.decodeDelimited(response));\n }\n }\n return agentMessageList;\n }\n async registerNode(path, passphrase) {\n var _a;\n const registerNodeRequest = Agent_1.agentInterface.RegisterNodeRequestMessage.encodeDelimited({ passphrase }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.REGISTER_NODE, path, registerNodeRequest);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.REGISTER_NODE)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.RegisterNodeResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async newNode(path, userId, passphrase, nbits) {\n var _a;\n const newNodeRequest = Agent_1.agentInterface.NewNodeRequestMessage.encodeDelimited({\n userId,\n passphrase,\n nbits,\n }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.NEW_NODE, path, newNodeRequest);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.NEW_NODE)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.NewNodeResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async listNodes(unlockedOnly = true) {\n var _a;\n const newNodeRequest = Agent_1.agentInterface.ListNodesRequestMessage.encodeDelimited({ unlockedOnly }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_NODES, undefined, newNodeRequest);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_NODES)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { nodes } = Agent_1.agentInterface.ListNodesResponseMessage.decodeDelimited(subMessage);\n return nodes;\n }\n /////////////////////\n // Key commands //\n /////////////////////\n async deriveKey(nodePath, keyName, passphrase) {\n var _a;\n const request = Agent_1.agentInterface.DeriveKeyRequestMessage.encodeDelimited({ keyName, passphrase }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DERIVE_KEY, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DERIVE_KEY)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.DeriveKeyResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async deleteKey(nodePath, keyName) {\n var _a;\n const request = Agent_1.agentInterface.DeleteKeyRequestMessage.encodeDelimited({ keyName }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DELETE_KEY, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DELETE_KEY)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.DeleteKeyResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async listKeys(nodePath) {\n var _a;\n const request = Agent_1.agentInterface.ListKeysRequestMessage.encodeDelimited({}).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_KEYS, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_KEYS)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { keyNames } = Agent_1.agentInterface.ListKeysResponseMessage.decodeDelimited(subMessage);\n return keyNames;\n }\n async getKey(nodePath, keyName) {\n var _a;\n const request = Agent_1.agentInterface.GetKeyRequestMessage.encodeDelimited({ keyName }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.GET_KEY, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.GET_KEY)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { keyContent } = Agent_1.agentInterface.GetKeyResponseMessage.decodeDelimited(subMessage);\n return keyContent;\n }\n async getPrimaryKeyPair(nodePath, includePrivateKey = false) {\n var _a;\n const request = Agent_1.agentInterface.GetPrimaryKeyPairRequestMessage.encodeDelimited({ includePrivateKey }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.GET_PRIMARY_KEYPAIR, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.GET_PRIMARY_KEYPAIR)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { publicKey, privateKey } = Agent_1.agentInterface.GetPrimaryKeyPairResponseMessage.decodeDelimited(subMessage);\n return { publicKey, privateKey };\n }\n /////////////////////\n // Crypto commands //\n /////////////////////\n async signFile(nodePath, filePath, privateKeyPath, passphrase) {\n var _a;\n const request = Agent_1.agentInterface.SignFileRequestMessage.encodeDelimited({\n filePath,\n privateKeyPath,\n passphrase,\n }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.SIGN_FILE, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.SIGN_FILE)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { signaturePath } = Agent_1.agentInterface.SignFileResponseMessage.decodeDelimited(subMessage);\n return signaturePath;\n }\n async verifyFile(nodePath, filePath, publicKeyPath) {\n var _a;\n const request = Agent_1.agentInterface.VerifyFileRequestMessage.encodeDelimited({ filePath, publicKeyPath }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.VERIFY_FILE, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.VERIFY_FILE)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { verified } = Agent_1.agentInterface.VerifyFileResponseMessage.decodeDelimited(subMessage);\n return verified;\n }\n async encryptFile(nodePath, filePath, publicKeyPath) {\n var _a;\n const request = Agent_1.agentInterface.EncryptFileRequestMessage.encodeDelimited({ filePath, publicKeyPath }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.ENCRYPT_FILE, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.ENCRYPT_FILE)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { encryptedPath } = Agent_1.agentInterface.EncryptFileResponseMessage.decodeDelimited(subMessage);\n return encryptedPath;\n }\n async decryptFile(nodePath, filePath, privateKeyPath, passphrase) {\n var _a;\n const request = Agent_1.agentInterface.DecryptFileRequestMessage.encodeDelimited({\n filePath,\n privateKeyPath,\n passphrase,\n }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DECRYPT_FILE, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DECRYPT_FILE)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { decryptedPath } = Agent_1.agentInterface.DecryptFileResponseMessage.decodeDelimited(subMessage);\n return decryptedPath;\n }\n //////////////////////\n // Vault Operations //\n //////////////////////\n async listVaults(nodePath) {\n var _a;\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_VAULTS, nodePath);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_VAULTS)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { vaultNames } = Agent_1.agentInterface.ListVaultsResponseMessage.decodeDelimited(subMessage);\n return vaultNames;\n }\n async scanVaultNames(nodePath, publicKey) {\n var _a;\n const request = Agent_1.agentInterface.ScanVaultNamesRequestMessage.encodeDelimited({ publicKey }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.SCAN_VAULT_NAMES, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.SCAN_VAULT_NAMES)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { vaultNames } = Agent_1.agentInterface.ScanVaultNamesResponseMessage.decodeDelimited(subMessage);\n return vaultNames;\n }\n async newVault(nodePath, vaultName) {\n var _a;\n const request = Agent_1.agentInterface.NewVaultRequestMessage.encodeDelimited({ vaultName }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.NEW_VAULT, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.NEW_VAULT)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.NewVaultResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async pullVault(nodePath, vaultName, publicKey) {\n var _a;\n const request = Agent_1.agentInterface.PullVaultRequestMessage.encodeDelimited({ vaultName, publicKey }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.PULL_VAULT, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.PULL_VAULT)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.PullVaultResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async destroyVault(nodePath, vaultName) {\n var _a;\n const request = Agent_1.agentInterface.DestroyVaultRequestMessage.encodeDelimited({ vaultName }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DESTROY_VAULT, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DESTROY_VAULT)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.DestroyVaultResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n ///////////////////////\n // Secret Operations //\n ///////////////////////\n async listSecrets(nodePath, vaultName) {\n var _a;\n const request = Agent_1.agentInterface.ListSecretsRequestMessage.encodeDelimited({ vaultName }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_SECRETS, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_SECRETS)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { secretNames } = Agent_1.agentInterface.ListSecretsResponseMessage.decodeDelimited(subMessage);\n return secretNames;\n }\n async createSecret(nodePath, vaultName, secretName, secret) {\n var _a;\n let request;\n if (typeof secret == 'string') {\n request = Agent_1.agentInterface.CreateSecretRequestMessage.encodeDelimited({\n vaultName,\n secretName,\n secretPath: secret,\n }).finish();\n }\n else {\n request = Agent_1.agentInterface.CreateSecretRequestMessage.encodeDelimited({\n vaultName,\n secretName,\n secretContent: secret,\n }).finish();\n }\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.CREATE_SECRET, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.CREATE_SECRET)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.CreateSecretResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async destroySecret(nodePath, vaultName, secretName) {\n var _a;\n const request = Agent_1.agentInterface.DestroySecretRequestMessage.encodeDelimited({ vaultName, secretName }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.DESTROY_SECRET, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.DESTROY_SECRET)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.DestroySecretResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async getSecret(nodePath, vaultName, secretName) {\n var _a;\n const request = Agent_1.agentInterface.GetSecretRequestMessage.encodeDelimited({ vaultName, secretName }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.GET_SECRET, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.GET_SECRET)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { secret } = Agent_1.agentInterface.GetSecretResponseMessage.decodeDelimited(subMessage);\n return Buffer.from(secret);\n }\n async updateSecret(nodePath, vaultName, secretName, secret) {\n var _a;\n let request;\n if (typeof secret == 'string') {\n request = Agent_1.agentInterface.UpdateSecretRequestMessage.encodeDelimited({\n vaultName,\n secretName,\n secretPath: secret,\n }).finish();\n }\n else {\n request = Agent_1.agentInterface.UpdateSecretRequestMessage.encodeDelimited({\n vaultName,\n secretName,\n secretContent: secret,\n }).finish();\n }\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.UPDATE_SECRET, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.UPDATE_SECRET)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.UpdateSecretResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n /////////////////////\n // Peer Operations //\n /////////////////////\n async addPeer(nodePath, publicKey, peerAddress, relayPublicKey) {\n var _a;\n const request = Agent_1.agentInterface.AddPeerRequestMessage.encodeDelimited({\n publicKey,\n peerAddress,\n relayPublicKey,\n }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.ADD_PEER, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.ADD_PEER)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.AddPeerResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async getPeerInfo(nodePath, current = false, publicKey) {\n var _a;\n const request = Agent_1.agentInterface.PeerInfoRequestMessage.encodeDelimited({ current, publicKey }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.GET_PEER_INFO, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.GET_PEER_INFO)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { publicKey: responsePublicKey, peerAddress, relayPublicKey, } = Agent_1.agentInterface.PeerInfoResponseMessage.decodeDelimited(subMessage);\n return new PeerInfo_1.default(responsePublicKey, peerAddress, relayPublicKey);\n }\n async pingPeer(nodePath, publicKey, timeout) {\n var _a;\n const request = Agent_1.agentInterface.PingPeerRequestMessage.encodeDelimited({ publicKey, timeout }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.PING_PEER, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.PING_PEER)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.PingPeerResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async findPeer(nodePath, publicKey, timeout) {\n var _a;\n const request = Agent_1.agentInterface.FindPeerRequestMessage.encodeDelimited({ publicKey, timeout }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.FIND_PEER, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.FIND_PEER)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.FindPeerResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async findSocialPeer(nodePath, handle, service, timeout) {\n var _a;\n const request = Agent_1.agentInterface.FindSocialPeerRequestMessage.encodeDelimited({ handle, service, timeout }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.FIND_SOCIAL_PEER, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.FIND_SOCIAL_PEER)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.FindSocialPeerResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async listPeers(nodePath) {\n var _a;\n const request = Agent_1.agentInterface.ListPeersRequestMessage.encodeDelimited({}).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.LIST_PEERS, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.LIST_PEERS)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { publicKeys } = Agent_1.agentInterface.ListPeersResponseMessage.decodeDelimited(subMessage);\n return publicKeys;\n }\n async toggleStealth(nodePath, active) {\n var _a;\n const request = Agent_1.agentInterface.ToggleStealthRequestMessage.encodeDelimited({ active }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.TOGGLE_STEALTH, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.TOGGLE_STEALTH)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.ToggleStealthResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async updatePeer(nodePath, publicKey, currentNode, peerHost, peerPort, relayPublicKey) {\n var _a;\n const request = Agent_1.agentInterface.UpdatePeerInfoRequestMessage.encodeDelimited({\n publicKey,\n currentNode,\n peerHost,\n peerPort,\n relayPublicKey,\n }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.UPDATE_PEER_INFO, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.UPDATE_PEER_INFO)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.UpdatePeerInfoResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async requestRelay(nodePath, publicKey) {\n var _a;\n const request = Agent_1.agentInterface.RequestRelayRequestMessage.encodeDelimited({ publicKey }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.REQUEST_RELAY, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.REQUEST_RELAY)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { successful } = Agent_1.agentInterface.RequestRelayResponseMessage.decodeDelimited(subMessage);\n return successful;\n }\n async requestPunch(nodePath, publicKey) {\n var _a;\n const request = Agent_1.agentInterface.RequestPunchRequestMessage.encodeDelimited({ publicKey }).finish();\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.REQUEST_PUNCH, nodePath, request);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.REQUEST_PUNCH)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { address } = Agent_1.agentInterface.RequestPunchResponseMessage.decodeDelimited(subMessage);\n return PeerInfo_1.Address.parse(address);\n }\n ///////////////////\n // Agent control //\n ///////////////////\n async getAgentStatus() {\n var _a;\n try {\n const encodedResponse = await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.STATUS);\n const subMessage = (_a = encodedResponse.find((r) => r.type == Agent_1.agentInterface.AgentMessageType.STATUS)) === null || _a === void 0 ? void 0 : _a.subMessage;\n if (!subMessage) {\n throw Error('agent did not respond');\n }\n const { status } = Agent_1.agentInterface.AgentStatusResponseMessage.decodeDelimited(subMessage);\n return status;\n }\n catch (err) {\n if (err.toString().match(/ECONNRESET|ENOENT|ECONNRESET/)) {\n return Agent_1.agentInterface.AgentStatusType.OFFLINE;\n }\n throw err;\n }\n }\n async stopAgent() {\n try {\n // Tell it to start shutting and wait for response\n await this.handleAgentCommunication(Agent_1.agentInterface.AgentMessageType.STOP_AGENT);\n return true;\n }\n catch (err) {\n return (await this.getAgentStatus()) != Agent_1.agentInterface.AgentStatusType.ONLINE;\n }\n }\n}\nexports.default = PolykeyClient;\n","module.exports = require(\"../proto/js/Agent\");","module.exports = require(\"protobufjs\");","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst os_1 = __importDefault(require(\"os\"));\nconst fs_1 = __importDefault(require(\"fs\"));\nconst path_1 = __importDefault(require(\"path\"));\nconst kbpgp_1 = __importDefault(require(\"kbpgp\"));\nconst crypto_1 = __importDefault(require(\"crypto\"));\nconst util_1 = require(\"util\");\nclass KeyManager {\n constructor(polyKeyPath = `${os_1.default.homedir()}/.polykey`, fileSystem, useWebWorkers = false, workerPool) {\n this.primaryKeyPair = { private: null, public: null };\n this.metadata = {\n privateKeyPath: null,\n publicKeyPath: null,\n pkiKeyPath: null,\n pkiCertPath: null,\n caCertPath: null,\n };\n /////////\n // PKI //\n /////////\n this.pkiInfo = { key: null, cert: null, caCert: null };\n this.useWebWorkers = useWebWorkers;\n this.workerPool = workerPool;\n this.derivedKeys = new Map();\n this.fileSystem = fileSystem;\n // Load key manager metadata\n this.polykeyPath = polyKeyPath;\n this.keypairPath = path_1.default.join(polyKeyPath, '.keys');\n if (!this.fileSystem.existsSync(this.keypairPath)) {\n this.fileSystem.mkdirSync(this.keypairPath, { recursive: true });\n }\n this.metadataPath = path_1.default.join(this.keypairPath, 'metadata');\n this.derivedKeysPath = path_1.default.join(this.keypairPath, 'derived-keys');\n this.loadMetadata();\n // Load keys if they were provided\n if (this.metadata.privateKeyPath && this.metadata.publicKeyPath) {\n // Load files into memory\n this.loadKeyPair(this.metadata.publicKeyPath, this.metadata.privateKeyPath);\n }\n /////////\n // PKI //\n /////////\n // Load pki keys and certs\n if (this.metadata.pkiKeyPath) {\n this.pkiInfo.key = fs_1.default.readFileSync(this.metadata.pkiKeyPath);\n }\n if (this.metadata.pkiCertPath) {\n this.pkiInfo.cert = fs_1.default.readFileSync(this.metadata.pkiCertPath);\n }\n if (this.metadata.caCertPath) {\n this.pkiInfo.caCert = fs_1.default.readFileSync(this.metadata.caCertPath);\n }\n this.loadPKIInfo(this.pkiInfo.key, this.pkiInfo.cert, this.pkiInfo.caCert, true);\n }\n get identityLoaded() {\n return this.primaryIdentity ? true : false;\n }\n /**\n * Generates a new assymetric key pair (publicKey and privateKey).\n * @param name Name of keypair owner\n * @param email Email of keypair owner\n * @param passphrase Passphrase to lock the keypair\n * @param nbits Size of the new keypair\n * @param replacePrimary If true, the generated keypair becomes the new primary identity of the key manager\n * @param progressCallback A progress hook for keypair generation\n */\n async generateKeyPair(userId, passphrase, nbits = 4096, replacePrimary = false, progressCallback) {\n // kbpgp doesn't seem to work for small nbits so set a minimum of 1024\n if (nbits < 1024) {\n throw Error('nbits must be greater than 1024 for keypair generation');\n }\n // Define options\n const flags = kbpgp_1.default['const'].openpgp;\n const params = {\n asp: progressCallback ? new kbpgp_1.default.ASP({ progress_hook: progressCallback }) : undefined,\n userid: userId,\n primary: {\n nbits: nbits,\n flags: flags.certify_keys | flags.sign_data | flags.auth | flags.encrypt_comm | flags.encrypt_storage,\n expire_in: 0,\n },\n subkeys: [],\n };\n const identity = await util_1.promisify(kbpgp_1.default.KeyManager.generate)(params);\n await util_1.promisify(identity.sign.bind(identity))({});\n // Export pub key first\n const publicKey = await util_1.promisify(identity.export_pgp_public.bind(identity))({});\n // Finally export priv key\n const privateKey = await util_1.promisify(identity.export_pgp_private.bind(identity))({ passphrase: passphrase });\n // Resolve to parent promise\n const keypair = { private: privateKey, public: publicKey };\n if (replacePrimary) {\n // Set the new keypair\n this.primaryKeyPair = keypair;\n // Set the new identity\n this.primaryIdentity = identity;\n // Overwrite in memory\n const privateKeyPath = path_1.default.join(this.keypairPath, 'private_key');\n const publicKeyPath = path_1.default.join(this.keypairPath, 'public_key');\n await this.fileSystem.promises.writeFile(privateKeyPath, keypair.private);\n await this.fileSystem.promises.writeFile(publicKeyPath, keypair.public);\n // Set metadata\n this.metadata.privateKeyPath = privateKeyPath;\n this.metadata.publicKeyPath = publicKeyPath;\n this.writeMetadata();\n }\n return keypair;\n }\n /**\n * Get the primary keypair\n */\n getKeyPair() {\n return this.primaryKeyPair;\n }\n /**\n * Determines whether public key is loaded or not\n */\n hasPublicKey() {\n return this.primaryKeyPair.public ? true : false;\n }\n /**\n * Get the public key of the primary keypair\n */\n getPublicKey() {\n if (!this.primaryKeyPair.public) {\n throw Error('Public key does not exist in memory');\n }\n return this.primaryKeyPair.public;\n }\n /**\n * Get the private key of the primary keypair\n */\n getPrivateKey() {\n if (!this.primaryKeyPair.private) {\n throw Error('Private key does not exist in memory');\n }\n return this.primaryKeyPair.private;\n }\n /**\n * Loads the keypair into the key manager as the primary identity\n * @param publicKey Public Key\n * @param privateKey Private Key\n */\n loadKeyPair(publicKey, privateKey) {\n this.loadPrivateKey(privateKey);\n this.loadPublicKey(publicKey);\n }\n /**\n * Loads the private key into the primary keypair\n * @param privateKey Private Key\n */\n loadPrivateKey(privateKey) {\n let keyBuffer;\n if (typeof privateKey === 'string') {\n keyBuffer = this.fileSystem.readFileSync(privateKey);\n this.metadata.privateKeyPath = privateKey;\n this.writeMetadata();\n }\n else {\n keyBuffer = privateKey;\n }\n this.primaryKeyPair.private = keyBuffer.toString();\n }\n /**\n * Loads the public key into the primary keypair\n * @param publicKey Public Key\n */\n loadPublicKey(publicKey) {\n let keyBuffer;\n if (typeof publicKey === 'string') {\n keyBuffer = this.fileSystem.readFileSync(publicKey);\n this.metadata.publicKeyPath = publicKey;\n this.writeMetadata();\n }\n else {\n keyBuffer = publicKey;\n }\n this.primaryKeyPair.public = keyBuffer.toString();\n }\n /**\n * Loads the primary identity into the key manager from the existing keypair\n * @param passphrase Passphrase to unlock the private key\n */\n async unlockIdentity(passphrase) {\n const publicKey = this.getPublicKey();\n const privateKey = this.getPrivateKey();\n const identity = await util_1.promisify(kbpgp_1.default.KeyManager.import_from_armored_pgp)({ armored: publicKey });\n await util_1.promisify(identity.merge_pgp_private.bind(identity))({ armored: privateKey });\n if (identity.is_pgp_locked.bind(identity)()) {\n await util_1.promisify(identity.unlock_pgp.bind(identity))({ passphrase: passphrase });\n }\n this.primaryIdentity = identity;\n }\n /**\n * Export the primary private key to a specified location\n * @param path Destination path\n */\n exportPrivateKey(path) {\n this.fileSystem.writeFileSync(path, this.primaryKeyPair.private);\n this.metadata.privateKeyPath = path;\n this.writeMetadata();\n }\n /**\n * Export the primary public key to a specified location\n * @param path Destination path\n */\n exportPublicKey(path) {\n this.fileSystem.writeFileSync(path, this.primaryKeyPair.public);\n this.metadata.publicKeyPath = path;\n this.writeMetadata();\n }\n /**\n * Asynchronously Generates a new symmetric key and stores it in the key manager\n * @param name Unique name of the generated key\n * @param passphrase Passphrase to derive the key from\n * @param storeKey Whether to store the key in the key manager\n */\n async generateKey(name, passphrase, storeKey = true) {\n const salt = crypto_1.default.randomBytes(32);\n const key = await util_1.promisify(crypto_1.default.pbkdf2)(passphrase, salt, 10000, 256 / 8, 'sha256');\n if (storeKey) {\n this.derivedKeys[name] = key;\n await this.writeMetadata();\n }\n return key;\n }\n /**\n * Deletes a derived symmetric key from the key manager\n * @param name Name of the key to be deleted\n */\n async deleteKey(name) {\n const successful = delete this.derivedKeys[name];\n await this.writeMetadata();\n return successful;\n }\n /**\n * List all keys in the current keymanager\n */\n listKeys() {\n return Object.keys(this.derivedKeys);\n }\n /**\n * Synchronously imports an existing key from file or Buffer\n * @param name Unique name of the imported key\n * @param key Key to be imported\n */\n importKeySync(name, key) {\n if (typeof key === 'string') {\n this.derivedKeys[name] = this.fileSystem.readFileSync(key);\n }\n else {\n this.derivedKeys[name] = key;\n }\n }\n /**\n * Asynchronously imports an existing key from file or Buffer\n * @param name Unique name of the imported key\n * @param key Key to be imported\n */\n async importKey(name, key) {\n if (typeof key === 'string') {\n this.derivedKeys[name] = await this.fileSystem.promises.readFile(key);\n }\n else {\n this.derivedKeys[name] = key;\n }\n }\n /**\n * Synchronously exports an existing key from file or Buffer\n * @param name Name of the key to be exported\n * @param dest Destination path\n * @param createPath If set to true, the path is recursively created\n */\n exportKeySync(name, dest, createPath) {\n if (!this.derivedKeys.has(name)) {\n throw Error(`There is no key loaded for name: ${name}`);\n }\n if (createPath) {\n this.fileSystem.mkdirSync(path_1.default.dirname(dest), { recursive: true });\n }\n this.fileSystem.writeFileSync(dest, this.derivedKeys[name]);\n }\n /**\n * Asynchronously exports an existing key from file or Buffer\n * @param name Name of the key to be exported\n * @param dest Destination path\n * @param createPath If set to true, the path is recursively created\n */\n async exportKey(name, dest, createPath) {\n if (!this.derivedKeys.has(name)) {\n throw Error(`There is no key loaded for name: ${name}`);\n }\n if (createPath) {\n await this.fileSystem.promises.mkdir(path_1.default.dirname(dest), { recursive: true });\n }\n await this.fileSystem.promises.writeFile(dest, this.derivedKeys[name]);\n }\n /**\n * Loads an identity from the given public key\n * @param publicKey Buffer containing the public key\n */\n async getIdentityFromPublicKey(publicKey) {\n const identity = await util_1.promisify(kbpgp_1.default.KeyManager.import_from_armored_pgp)({ armored: publicKey });\n return identity;\n }\n /**\n * Loads an identity from the given private key\n * @param publicKey Buffer containing the public key\n */\n async getIdentityFromPrivateKey(privateKey, passphrase) {\n const identity = await util_1.promisify(kbpgp_1.default.KeyManager.import_from_armored_pgp)({ armored: privateKey });\n if (identity.is_pgp_locked()) {\n await util_1.promisify(identity.unlock_pgp.bind(identity))({ passphrase });\n }\n return identity;\n }\n /**\n * Signs the given data with the provided key or the primary key if none is specified\n * @param data Buffer or file containing the data to be signed\n * @param privateKey Buffer containing the key to sign with. Defaults to primary private key if no key is given.\n * @param keyPassphrase Required if privateKey is provided.\n */\n async signData(data, privateKey, keyPassphrase) {\n let resolvedIdentity;\n if (privateKey) {\n if (!keyPassphrase) {\n throw Error('passphrase for private key was not provided');\n }\n resolvedIdentity = await this.getIdentityFromPrivateKey(privateKey, keyPassphrase);\n }\n else if (this.primaryIdentity) {\n resolvedIdentity = this.primaryIdentity;\n }\n else {\n throw Error('key pair is not loaded');\n }\n if (this.useWebWorkers && this.workerPool) {\n const workerResponse = await this.workerPool.queue(async (workerCrypto) => {\n return await workerCrypto.signData(data, resolvedIdentity);\n });\n return workerResponse;\n }\n else {\n const params = {\n msg: data.toString(),\n sign_with: resolvedIdentity,\n };\n const result_string = await util_1.promisify(kbpgp_1.default.box)(params);\n return Buffer.from(result_string);\n }\n }\n /**\n * Signs the given file with the provided key or the primary key if none is specified\n * @param filePath Path to file containing the data to be signed\n * @param privateKey The key to sign with. Defaults to primary public key if no key is given.\n * @param keyPassphrase Required if privateKey is provided.\n */\n async signFile(filePath, privateKey, keyPassphrase) {\n // Get key if provided\n let keyBuffer;\n if (privateKey) {\n if (typeof privateKey === 'string') {\n // Path\n // Read in from fs\n keyBuffer = this.fileSystem.readFileSync(privateKey);\n }\n else {\n // Buffer\n keyBuffer = privateKey;\n }\n }\n // Read file into buffer\n const buffer = this.fileSystem.readFileSync(filePath);\n // Sign the buffer\n const signedBuffer = await this.signData(buffer, keyBuffer, keyPassphrase);\n // Write buffer to signed file\n const signedPath = `${filePath}.sig`;\n this.fileSystem.writeFileSync(signedPath, signedBuffer);\n return signedPath;\n }\n /**\n * Verifies the given data with the provided key or the primary key if none is specified\n * @param data Buffer or file containing the data to be verified\n * @param publicKey Buffer containing the key to verify with. Defaults to primary public key if no key is given.\n */\n async verifyData(data, publicKey) {\n const ring = new kbpgp_1.default.keyring.KeyRing();\n let resolvedIdentity;\n if (publicKey) {\n resolvedIdentity = await this.getIdentityFromPublicKey(publicKey);\n }\n else if (this.primaryIdentity) {\n resolvedIdentity = this.primaryIdentity;\n }\n else {\n throw Error('key pair is not loaded');\n }\n ring.add_key_manager(resolvedIdentity);\n if (this.useWebWorkers && this.workerPool) {\n const workerResponse = await this.workerPool.queue(async (workerCrypto) => {\n return await workerCrypto.verifyData(data, resolvedIdentity);\n });\n return workerResponse;\n }\n else {\n const params = {\n armored: data,\n keyfetch: ring,\n };\n const literals = await util_1.promisify(kbpgp_1.default.unbox)(params);\n // get the verified message\n const verifiedMessage = Buffer.from(literals[0].toString());\n // Get the identity that signed the data if any\n let dataSigner = literals[0].get_data_signer();\n // Retrieve the key manager associated with that data signer\n let verifiedKM;\n if (dataSigner) {\n verifiedKM = dataSigner.get_key_manager();\n }\n if (!verifiedKM) {\n throw Error('data could not be verified: could not determine data signer');\n }\n // If we know the pgp finger print then we say the data is verified.\n // Otherwise it is unverified.\n const actualFingerprint = verifiedKM.get_pgp_fingerprint().toString('hex');\n const expectedFingerprint = resolvedIdentity.get_pgp_fingerprint().toString('hex');\n if (actualFingerprint == expectedFingerprint) {\n return verifiedMessage;\n }\n else {\n throw Error('data could not be verified: actual and expected data signer pgp fingerprint mismatch');\n }\n }\n }\n /**\n * Verifies the given file with the provided key or the primary key if none is specified\n * @param filePath Path to file containing the data to be verified\n * @param publicKey Buffer containing the key to verify with. Defaults to primary public key if no key is given.\n */\n async verifyFile(filePath, publicKey) {\n // Get key if provided\n let keyBuffer;\n if (publicKey) {\n if (typeof publicKey === 'string') {\n // Path\n // Read in from fs\n keyBuffer = this.fileSystem.readFileSync(publicKey);\n }\n else {\n // Buffer\n keyBuffer = publicKey;\n }\n }\n // Read in file buffer and signature\n const signatureBuffer = this.fileSystem.readFileSync(filePath);\n const verifiedMessage = await this.verifyData(signatureBuffer, keyBuffer);\n this.fileSystem.writeFileSync(filePath, verifiedMessage);\n return true;\n }\n /**\n * Encrypts the given data for a specific public key\n * @param data The data to be encrypted\n * @param publicKey The key to encrypt for\n */\n async encryptData(data, publicKey) {\n let resolvedIdentity;\n if (publicKey) {\n resolvedIdentity = await this.getIdentityFromPublicKey(publicKey);\n }\n else if (this.primaryIdentity) {\n resolvedIdentity = this.primaryIdentity;\n }\n else {\n throw Error(`Identity could not be resolved for encrypting`);\n }\n if (this.useWebWorkers && this.workerPool) {\n const workerResponse = await this.workerPool.queue(async (workerCrypto) => {\n return await workerCrypto.encryptData(data, resolvedIdentity);\n });\n return workerResponse;\n }\n else {\n const params = {\n msg: data,\n encrypt_for: resolvedIdentity,\n };\n const result_string = await util_1.promisify(kbpgp_1.default.box)(params);\n return Buffer.from(result_string);\n }\n }\n /**\n * Encrypts the given file for a specific public key\n * @param filePath Path to file containing the data to be encrypted\n * @param publicKey Buffer containing the key to verify with. Defaults to primary public key if no key is given.\n */\n async encryptFile(filePath, publicKey) {\n // Get key if provided\n let keyBuffer;\n if (publicKey) {\n if (typeof publicKey === 'string') {\n // Read in from fs\n keyBuffer = this.fileSystem.readFileSync(publicKey);\n }\n else {\n // Buffer\n keyBuffer = publicKey;\n }\n }\n // Read file into buffer\n const buffer = this.fileSystem.readFileSync(filePath);\n // Encrypt the buffer\n const encryptedBuffer = await this.encryptData(buffer, keyBuffer);\n // Write buffer to encrypted file\n this.fileSystem.writeFileSync(filePath, encryptedBuffer);\n return filePath;\n }\n /**\n * Decrypts the given data with the provided key or the primary key if none is given\n * @param data The data to be decrypted\n * @param privateKey The key to decrypt with. Defaults to primary private key if no key is given.\n * @param keyPassphrase Required if privateKey is provided.\n */\n async decryptData(data, privateKey, keyPassphrase) {\n var ring = new kbpgp_1.default.keyring.KeyRing();\n let resolvedIdentity;\n if (privateKey) {\n if (keyPassphrase) {\n resolvedIdentity = await this.getIdentityFromPrivateKey(privateKey, keyPassphrase);\n }\n else {\n throw Error('A key passphrase must be supplied if a privateKey is specified');\n }\n }\n else if (this.primaryIdentity) {\n resolvedIdentity = this.primaryIdentity;\n }\n else {\n throw Error('no identity available for decrypting');\n }\n if (this.useWebWorkers && this.workerPool) {\n const workerResponse = await this.workerPool.queue(async (workerCrypto) => {\n return await workerCrypto.decryptData(data, resolvedIdentity);\n });\n return workerResponse;\n }\n else {\n ring.add_key_manager(resolvedIdentity);\n const params = {\n armored: data.toString(),\n keyfetch: ring,\n };\n const literals = await util_1.promisify(kbpgp_1.default.unbox)(params);\n const decryptedData = Buffer.from(literals[0].toString());\n return decryptedData;\n }\n }\n /**\n * Decrypts the given file with the provided key or the primary key if none is given\n * @param filePath Path to file containing the data to be decrypted\n * @param privateKey The key to decrypt with. Defaults to primary private key if no key is given.\n * @param keyPassphrase Required if privateKey is provided.\n */\n async decryptFile(filePath, privateKey, keyPassphrase) {\n // Get key if provided\n let keyBuffer;\n if (privateKey) {\n if (typeof privateKey === 'string') {\n // Read in from fs\n keyBuffer = this.fileSystem.readFileSync(privateKey);\n }\n else {\n // Buffer\n keyBuffer = privateKey;\n }\n }\n // Read in file buffer\n const fileBuffer = this.fileSystem.readFileSync(filePath);\n // Decrypt file buffer\n const decryptedData = await this.decryptData(fileBuffer, keyBuffer, keyPassphrase);\n // Write buffer to decrypted file\n this.fileSystem.writeFileSync(filePath, decryptedData);\n return filePath;\n }\n /////////\n // PKI //\n /////////\n get PKIInfo() {\n return this.pkiInfo;\n }\n loadPKIInfo(key, cert, caCert, writeToFile = false) {\n if (key) {\n this.pkiInfo.key = key;\n }\n if (cert) {\n this.pkiInfo.cert = cert;\n }\n if (caCert) {\n this.pkiInfo.caCert = caCert;\n }\n if (writeToFile) {\n // Store in the metadata path folder\n const storagePath = path_1.default.dirname(this.metadataPath);\n if (key) {\n this.metadata.pkiKeyPath = path_1.default.join(storagePath, 'pki_private_key');\n fs_1.default.writeFileSync(this.metadata.pkiKeyPath, key);\n }\n if (cert) {\n this.metadata.pkiCertPath = path_1.default.join(storagePath, 'pki_cert');\n fs_1.default.writeFileSync(this.metadata.pkiCertPath, cert);\n }\n if (caCert) {\n this.metadata.caCertPath = path_1.default.join(storagePath, 'ca_cert');\n fs_1.default.writeFileSync(this.metadata.caCertPath, caCert);\n }\n }\n }\n /* ============ HELPERS =============== */\n /**\n * Get the key for a given name\n * @param name The unique name of the desired key\n */\n getKey(name) {\n return this.derivedKeys[name];\n }\n /**\n * Determines if the Key Manager has a certain key\n * @param name The unique name of the desired key\n */\n hasKey(name) {\n if (this.derivedKeys[name]) {\n return true;\n }\n return false;\n }\n async writeMetadata() {\n const metadata = JSON.stringify(this.metadata);\n this.fileSystem.writeFileSync(this.metadataPath, metadata);\n // Store the keys if identity is loaded\n if (this.identityLoaded) {\n const derivedKeys = JSON.stringify(this.derivedKeys);\n const encryptedMetadata = await this.encryptData(Buffer.from(derivedKeys));\n await this.fileSystem.promises.writeFile(this.derivedKeysPath, encryptedMetadata);\n }\n }\n async loadMetadata() {\n // Check if file exists\n if (this.fileSystem.existsSync(this.metadataPath)) {\n const metadata = this.fileSystem.readFileSync(this.metadataPath).toString();\n this.metadata = JSON.parse(metadata);\n if (this.identityLoaded && this.fileSystem.existsSync(this.derivedKeysPath)) {\n const encryptedMetadata = this.fileSystem.readFileSync(this.derivedKeysPath);\n const metadata = (await this.decryptData(encryptedMetadata)).toString();\n const derivedKeys = JSON.parse(metadata);\n for (const key of Object.keys(derivedKeys)) {\n this.derivedKeys[key] = Buffer.from(derivedKeys[key]);\n }\n }\n }\n }\n}\nexports.default = KeyManager;\n","module.exports = require(\"kbpgp\");","module.exports = require(\"util\");","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst os_1 = __importDefault(require(\"os\"));\nconst path_1 = __importDefault(require(\"path\"));\nconst TurnClient_1 = __importDefault(require(\"./turn/TurnClient\"));\nconst Peer_1 = require(\"../../proto/js/Peer\");\nconst PeerInfo_1 = __importDefault(require(\"../peers/PeerInfo\"));\nconst PeerServer_1 = __importDefault(require(\"./peer-connection/PeerServer\"));\nconst PeerConnection_1 = __importDefault(require(\"./peer-connection/PeerConnection\"));\nconst MulticastBroadcaster_1 = __importDefault(require(\"../peers/MulticastBroadcaster\"));\nconst keybaseDiscovery = {\n name: 'Keybase',\n findUser: async (handle, service) => {\n const url = `https://keybase.io/_/api/1.0/user/lookup.json?${service}=${handle}`;\n try {\n const response = await fetch(url);\n const data = await response.json();\n const pubKey = data.them[0].public_keys.primary.bundle;\n return pubKey;\n }\n catch (err) {\n throw Error(`User was not found: ${err.message}`);\n }\n },\n};\nclass PeerManager {\n constructor(polykeyPath = `${os_1.default.homedir()}/.polykey`, fileSystem, keyManager, peerInfo, socialDiscoveryServices = []) {\n this.fileSystem = fileSystem;\n this.peerStore = new Map();\n this.fileSystem.mkdirSync(polykeyPath, { recursive: true });\n this.peerInfoMetadataPath = path_1.default.join(polykeyPath, '.peerInfo');\n this.peerStoreMetadataPath = path_1.default.join(polykeyPath, '.peerStore');\n // Set given variables\n this.keyManager = keyManager;\n this.socialDiscoveryServices = socialDiscoveryServices;\n // Load metadata with peer info\n this.loadMetadata();\n // Load peer store and local peer info\n if (peerInfo) {\n this.peerInfo = peerInfo;\n this.writeMetadata();\n }\n else if (this.keyManager.hasPublicKey()) {\n this.peerInfo = new PeerInfo_1.default(this.keyManager.getPublicKey());\n }\n this.socialDiscoveryServices = [];\n this.socialDiscoveryServices.push(keybaseDiscovery);\n for (const service of socialDiscoveryServices) {\n this.socialDiscoveryServices.push(service);\n }\n this.multicastBroadcaster = new MulticastBroadcaster_1.default(this, this.keyManager);\n ////////////\n // Server //\n ////////////\n this.peerServer = new PeerServer_1.default(this, this.keyManager);\n this.peerConnections = new Map();\n /////////////////\n // TURN Client //\n /////////////////\n this.turnClient = new TurnClient_1.default(this);\n }\n toggleStealthMode(active) {\n if (!this.stealthMode && active) {\n this.multicastBroadcaster.stopBroadcasting();\n }\n else if (this.stealthMode && !active) {\n this.multicastBroadcaster.startListening();\n }\n this.stealthMode = active;\n }\n setGitHandler(handler) {\n this.peerServer.handleGitRequest = handler;\n }\n setNatHandler(handler) {\n this.peerServer.handleNatRequest = handler;\n }\n ////////////////\n // Peer store //\n ////////////////\n /**\n * Add a peer's info to the peerStore\n * @param peerInfo Info of the peer to be added\n */\n addPeer(peerInfo) {\n const publicKey = PeerInfo_1.default.formatPublicKey(peerInfo.publicKey);\n if (this.hasPeer(publicKey)) {\n throw Error('peer already exists in peer store');\n }\n this.peerStore.set(publicKey, peerInfo.deepCopy());\n this.writeMetadata();\n }\n /**\n * Update a peer's info in the peerStore\n * @param peerInfo Info of the peer to be updated\n */\n updatePeer(peerInfo) {\n const publicKey = PeerInfo_1.default.formatPublicKey(peerInfo.publicKey);\n if (!this.hasPeer(publicKey)) {\n throw Error('peer does not exist in peer store');\n }\n this.peerStore.set(publicKey, peerInfo.deepCopy());\n this.writeMetadata();\n }\n /**\n * Retrieves a peer for the given public key\n * @param publicKey Public key of the desired peer\n */\n getPeer(publicKey) {\n var _a, _b;\n return (_b = (_a = this.peerStore.get(PeerInfo_1.default.formatPublicKey(publicKey))) === null || _a === void 0 ? void 0 : _a.deepCopy()) !== null && _b !== void 0 ? _b : null;\n }\n /**\n * Determines if the peerStore contains the desired peer\n * @param publicKey Public key of the desired peer\n */\n hasPeer(publicKey) {\n return this.peerStore.has(PeerInfo_1.default.formatPublicKey(publicKey));\n }\n /**\n * List all peer public keys in the peer store\n */\n listPeers() {\n return Array.from(this.peerStore.values()).map((p) => p.publicKey);\n }\n //////////////////////\n // Social discovery //\n //////////////////////\n /**\n * Finds an existing peer using multicast peer discovery\n * @param publicKey Public key of the desired peer\n */\n async findPublicKey(publicKey, timeout) {\n return new Promise((resolve, reject) => {\n this.multicastBroadcaster.startListening();\n this.multicastBroadcaster.on('found', (foundPublicKey) => {\n if (PeerInfo_1.default.formatPublicKey(foundPublicKey) == PeerInfo_1.default.formatPublicKey(publicKey)) {\n resolve(true);\n }\n });\n setTimeout(() => reject(Error('peer discovery timed out')), timeout && timeout != 0 ? timeout : 5e4);\n });\n }\n /**\n * Finds an existing peer given a social service and handle\n * @param handle Username or handle of the user (e.g. @john-smith)\n * @param service Service on which to search for the user (e.g. github)\n */\n async findSocialUser(handle, service, timeout) {\n const tasks = this.socialDiscoveryServices.map((s) => s.findUser(handle, service));\n const pubKeyOrFail = await Promise.race(tasks);\n if (!pubKeyOrFail) {\n throw Error('Could not find public key from services');\n }\n return await this.findPublicKey(pubKeyOrFail, timeout);\n }\n ///////////////////////\n // Peers Connections //\n ///////////////////////\n /**\n * Get a secure connection to the peer\n * @param publicKey Public key of an existing peer or address of new peer\n */\n connectToPeer(publicKey) {\n // Throw error if trying to connect to self\n if (publicKey == this.peerInfo.publicKey) {\n throw Error('Cannot connect to self');\n }\n const existingSocket = this.peerConnections.get(publicKey);\n if (existingSocket) {\n return existingSocket;\n }\n // try to create a connection to the address\n const peerConnection = new PeerConnection_1.default(publicKey, this.keyManager, this);\n this.peerConnections.set(publicKey, peerConnection);\n return peerConnection;\n }\n async pingPeer(publicKey, timeout) {\n const peerConnection = this.connectToPeer(publicKey);\n return await peerConnection.pingPeer(timeout);\n }\n /* ============ HELPERS =============== */\n writeMetadata() {\n var _a, _b;\n // write peer info\n const peerInfo = this.peerInfo;\n const metadata = Peer_1.peerInterface.PeerInfoMessage.encodeDelimited({\n publicKey: peerInfo.publicKey,\n peerAddress: (_a = peerInfo.peerAddress) === null || _a === void 0 ? void 0 : _a.toString(),\n relayPublicKey: peerInfo.relayPublicKey,\n }).finish();\n this.fileSystem.writeFileSync(this.peerInfoMetadataPath, metadata);\n // write peer store\n const peerInfoList = [];\n for (const [publicKey, peerInfo] of this.peerStore) {\n peerInfoList.push(new Peer_1.peerInterface.PeerInfoMessage({\n publicKey: peerInfo.publicKey,\n peerAddress: (_b = peerInfo.peerAddress) === null || _b === void 0 ? void 0 : _b.toString(),\n relayPublicKey: peerInfo.relayPublicKey,\n }));\n }\n const peerStoreMetadata = Peer_1.peerInterface.PeerInfoListMessage.encodeDelimited({ peerInfoList }).finish();\n this.fileSystem.writeFileSync(this.peerStoreMetadataPath, peerStoreMetadata);\n }\n loadMetadata() {\n var _a, _b;\n // load peer info if path exists\n if (this.fileSystem.existsSync(this.peerInfoMetadataPath)) {\n const metadata = this.fileSystem.readFileSync(this.peerInfoMetadataPath);\n const { publicKey, peerAddress, relayPublicKey } = Peer_1.peerInterface.PeerInfoMessage.decodeDelimited(metadata);\n this.peerInfo = new PeerInfo_1.default(publicKey, peerAddress, relayPublicKey);\n }\n // load peer store if path exists\n if (this.fileSystem.existsSync(this.peerStoreMetadataPath)) {\n const metadata = this.fileSystem.readFileSync(this.peerStoreMetadataPath);\n const { peerInfoList } = Peer_1.peerInterface.PeerInfoListMessage.decodeDelimited(metadata);\n for (const peerInfoMessage of peerInfoList) {\n const peerInfo = new PeerInfo_1.default(peerInfoMessage.publicKey, (_a = peerInfoMessage.peerAddress) !== null && _a !== void 0 ? _a : undefined, (_b = peerInfoMessage.relayPublicKey) !== null && _b !== void 0 ? _b : undefined);\n this.peerStore.set(peerInfo.publicKey, peerInfo);\n }\n }\n }\n}\nexports.default = PeerManager;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// adapted from https://github.com/advance512/nat-traversal\nconst net_1 = __importDefault(require(\"net\"));\nconst events_1 = require(\"events\");\nconst PeerInfo_1 = require(\"../PeerInfo\");\nconst Peer_1 = require(\"../../../proto/js/Peer\");\nconst Peer_pb_1 = require(\"../../../proto/compiled/Peer_pb\");\nconst UDPHolePunchClient_1 = __importDefault(require(\"../udp-hole-punch/UDPHolePunchClient\"));\nlet socketPipeId = 1;\nclass SocketPipe extends events_1.EventEmitter {\n constructor(localAddress, relayAddress) {\n super();\n this.id = socketPipeId;\n socketPipeId += 1;\n this.localAddress = localAddress;\n this.relayAddress = relayAddress;\n this.targetSocketPending = true;\n this.buffer = [];\n console.log(`[client-relay:${this.id}] Created new pending SocketPipe.`);\n this.openRelayEnd();\n }\n openRelayEnd() {\n console.log(`[client-relay:${this.id}] Socket pipe will TCP connection to connect to relay server.`);\n this.relaySocket = net_1.default.connect(this.relayAddress.port, this.relayAddress.host, () => {\n console.log(`[client-relay:${this.id}] Created new TCP connection.`);\n // Configure socket for keeping connections alive\n this.relaySocket.setKeepAlive(true, 120 * 1000);\n });\n // We have a relay socket - now register its handlers\n // On data\n this.relaySocket.on('data', (data) => {\n // Got data - do we have a target socket?\n if (this.targetSocket === undefined) {\n // Create a target socket for the relay socket - connecting to the target\n this.openTargetEnd();\n this.emit('pair');\n }\n // Is the target socket still connecting? If so, are we buffering data?\n if (this.targetSocketPending) {\n // Store the data until we have a target socket\n this.buffer[this.buffer.length] = data;\n }\n else {\n try {\n // Or just pass it directly\n this.targetSocket.write(data);\n }\n catch (ex) {\n console.error(`[client-relay:${this.id}] Error writing to target socket: `, ex);\n }\n }\n });\n // On closing\n this.relaySocket.on('close', (hadError) => {\n if (hadError) {\n console.error(`[client-relay:${this.id}] Relay socket closed with error.`);\n }\n if (this.targetSocket !== undefined) {\n // Destroy the other socket\n this.targetSocket.destroy();\n }\n else {\n // Signal we are closing - server closed the connection\n this.emit('close');\n }\n });\n this.relaySocket.on('error', (error) => {\n console.error(`[client-relay:${this.id}] Error with relay socket: `, error);\n });\n }\n openTargetEnd() {\n console.log(`[client-relay:${this.id}] Authorized by relay server. Creating new connection to target ${this.localAddress.toString()}...`);\n console.log(`[client-target:${this.id}] Socket pipe will TCP connection to connect to target server.`);\n // Or use TCP\n this.targetSocket = net_1.default.connect(this.localAddress.port, this.localAddress.host, () => {\n console.log(`[client-target:${this.id}] Successfully connected to target ${this.localAddress.toString()}.`);\n // Configure socket for keeping connections alive\n this.targetSocket.setKeepAlive(true, 120 * 1000);\n // Connected, not pending anymore\n this.targetSocketPending = false;\n // And if we have any buffered data, forward it\n try {\n for (const bufferItem of this.buffer) {\n this.targetSocket.write(bufferItem);\n }\n }\n catch (ex) {\n console.error(`[client-target:${this.id}] Error writing to target socket: `, ex);\n }\n // Clear the array\n this.buffer.length = 0;\n });\n // Got data from the target socket?\n this.targetSocket.on('data', (data) => {\n try {\n // Forward it!\n this.relaySocket.write(data);\n }\n catch (ex) {\n console.error(`target:${this.id}] Error writing to target socket: `, ex);\n }\n });\n this.targetSocket.on('error', (hadError) => {\n if (hadError) {\n console.error(`[target:${this.id}] Target socket was closed with error: `, hadError);\n }\n this.terminate();\n });\n }\n terminate() {\n console.log(`[client-relay:${this.id}] Terminating socket pipe...`);\n this.removeAllListeners();\n this.relaySocket.destroy();\n }\n}\nclass TurnClient {\n // default is to support up to 10 connections at once, change this with 'numSockets' parameter\n constructor(peerManager) {\n this.peerManager = peerManager;\n // create udp hole punch client\n this.udpHolePunchClient = new UDPHolePunchClient_1.default(this.peerManager);\n this.socketPipes = [];\n }\n async sendMessage(type, publicKey, message) {\n const peerConnection = this.peerManager.connectToPeer(publicKey);\n const encodedMessage = Peer_1.peerInterface.NatMessage.encodeDelimited({\n type,\n isResponse: false,\n subMessage: message,\n }).finish();\n const responseMessage = await peerConnection.sendPeerRequest(Peer_pb_1.SubServiceType.NAT_TRAVERSAL, encodedMessage);\n const { type: responseType, isResponse, subMessage } = Peer_1.peerInterface.NatMessage.decodeDelimited(responseMessage);\n return subMessage;\n }\n async requestPeerConnection(peerPublicKey, relayPublicKey) {\n var _a;\n const requestMessage = Peer_1.peerInterface.PeerConnectionRequest.encodeDelimited({ publicKey: peerPublicKey }).finish();\n const responseMessage = await this.sendMessage(Peer_1.peerInterface.NatMessageType.PEER_CONNECTION, relayPublicKey, requestMessage);\n const { peerAddress } = Peer_1.peerInterface.PeerConnectionResponse.decodeDelimited(responseMessage);\n if (!peerAddress) {\n throw Error('relay does not know of requested peer');\n }\n const address = PeerInfo_1.Address.parse(peerAddress);\n const relayPeerInfo = this.peerManager.getPeer(relayPublicKey);\n address.updateHost((_a = relayPeerInfo === null || relayPeerInfo === void 0 ? void 0 : relayPeerInfo.peerAddress) === null || _a === void 0 ? void 0 : _a.host);\n return address;\n }\n async requestRelayConnection(relayPublicKey) {\n var _a, _b, _c;\n const requestMessage = Peer_1.peerInterface.RelayConnectionRequest.encodeDelimited({\n publicKey: this.peerManager.peerInfo.publicKey,\n }).finish();\n const responseMessage = await this.sendMessage(Peer_1.peerInterface.NatMessageType.RELAY_CONNECTION, relayPublicKey, requestMessage);\n const { serverAddress } = Peer_1.peerInterface.RelayConnectionResponse.decodeDelimited(responseMessage);\n const incoming = PeerInfo_1.Address.parse(serverAddress);\n console.log(incoming);\n incoming.host = (_c = (_b = (_a = this.peerManager.getPeer(relayPublicKey)) === null || _a === void 0 ? void 0 : _a.peerAddress) === null || _b === void 0 ? void 0 : _b.host) !== null && _c !== void 0 ? _c : incoming.host;\n // add relay node to turn server address\n this.peerManager.peerInfo.relayPublicKey = relayPublicKey;\n // Create pending socketPipes\n this.createSocketPipe(incoming);\n }\n async requestLocalHolePunchAddress(relayPublicKey) {\n // request hole punch\n const udpAddress = await this.requestUDPAddress(relayPublicKey);\n const localUdpAddress = await this.udpHolePunchClient.requestHolePunch(udpAddress, this.peerManager.peerInfo.peerAddress);\n // add to peer info as relay node\n this.peerManager.peerInfo.relayPublicKey = relayPublicKey;\n return localUdpAddress;\n }\n async requestHolePunchConnection(relayPublicKey, peerPublicKey) {\n const peerUDPAddress = await this.requestPeerUDPAddress(relayPublicKey, peerPublicKey);\n return this.udpHolePunchClient.createPipeServer(peerUDPAddress);\n }\n // returns the address for a local tcp server that is routed via UTP\n async requestPeerUDPAddress(relayPublicKey, peerPublicKey) {\n const requestMessage = Peer_1.peerInterface.PeerUdpAddressRequest.encodeDelimited({ publicKey: peerPublicKey }).finish();\n const responseMessage = await this.sendMessage(Peer_1.peerInterface.NatMessageType.PEER_UDP_ADDRESS, relayPublicKey, requestMessage);\n const { address } = Peer_1.peerInterface.PeerUdpAddressResponse.decodeDelimited(responseMessage);\n return PeerInfo_1.Address.parse(address);\n }\n async requestUDPAddress(relayPublicKey) {\n const responseMessage = await this.sendMessage(Peer_1.peerInterface.NatMessageType.UDP_ADDRESS, relayPublicKey);\n const { address } = Peer_1.peerInterface.UDPAddressResponse.decodeDelimited(responseMessage);\n return PeerInfo_1.Address.parse(address);\n }\n async createSocketPipe(relayAddress) {\n const localAddress = this.peerManager.peerInfo.peerAddress;\n // wait for local address\n while (!localAddress) {\n await new Promise((resolve, reject) => setTimeout(() => resolve(), 1000));\n }\n // Create a new socketPipe\n const socketPipe = new SocketPipe(localAddress, relayAddress);\n this.socketPipes.push(socketPipe);\n socketPipe.on('pair', () => {\n // Create a new pending socketPipe\n this.createSocketPipe(relayAddress);\n });\n socketPipe.on('close', () => {\n // Server closed the connection\n // Remove paired pipe\n this.removeSocketPipe(socketPipe);\n // Create a new replacement socketPipe, that is pending and waiting, if required\n setTimeout(() => {\n if (this.terminating) {\n return;\n }\n // Create a new pending socketPipe\n this.createSocketPipe(relayAddress);\n }, 5000);\n });\n }\n removeSocketPipe(socketPipe) {\n // SocketPipe closed - is it still stored by us?\n const i = this.socketPipes.indexOf(socketPipe);\n // If so, remove it\n if (i !== -1) {\n this.socketPipes.splice(i, 1);\n }\n socketPipe.terminate();\n }\n terminate() {\n this.terminating = true;\n for (const socketPipe of this.socketPipes) {\n socketPipe.terminate();\n }\n }\n}\nexports.default = TurnClient;\n","\"use strict\";\n// based on https://github.com/SamDecrock/node-udp-hole-punching\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst net_1 = __importDefault(require(\"net\"));\nconst PeerInfo_1 = require(\"../PeerInfo\");\nconst Peer_1 = require(\"../../../proto/js/Peer\");\nconst UDPToTCPSocketPipe_1 = __importDefault(require(\"./socket-pipes/UDPToTCPSocketPipe\"));\nconst TCPToUDPSocketPipe_1 = __importDefault(require(\"./socket-pipes/TCPToUDPSocketPipe\"));\nconst MicroTransportProtocol_1 = require(\"./MicroTransportProtocol\");\nclass UDPHolePunchClient {\n constructor(peerManager) {\n this.outgoingSocketPipes = new Map();\n this.incomingSocketPipes = new Map();\n this.peerManager = peerManager;\n }\n async requestHolePunch(address, peerServerAddress) {\n const relayConnection = MicroTransportProtocol_1.connect(address.port, address.host);\n // const relayConnection = connect(address.port, address.host)\n const relayServer = MicroTransportProtocol_1.createServer((conn) => {\n const socketPipe = new TCPToUDPSocketPipe_1.default(peerServerAddress, conn);\n this.outgoingSocketPipes.set(socketPipe.id, socketPipe);\n });\n await new Promise((resolve, reject) => {\n relayServer.listen(relayConnection, () => {\n console.log(`relay connection listening on: ${relayServer.address().host}:${relayServer.address().port}`);\n resolve();\n });\n });\n const request = Peer_1.peerInterface.HolePunchRegisterRequest.encodeDelimited({\n publicKey: this.peerManager.peerInfo.publicKey,\n }).finish();\n relayConnection.write(request);\n const connectedAddress = await new Promise((resolve, reject) => {\n let buf = [];\n relayConnection.on('data', (data) => {\n buf.push(data);\n try {\n const { connectedAddress } = Peer_1.peerInterface.HolePunchRegisterResponse.decodeDelimited(Buffer.concat(buf));\n resolve(PeerInfo_1.Address.parse(connectedAddress));\n }\n catch (error) { }\n });\n });\n return connectedAddress;\n }\n // returns the address for a local tcp server that is routed via UTP\n async createPipeServer(peerUDPAddress) {\n console.log('connecting to', peerUDPAddress);\n // create a TCP server and bind it to a random port\n const server = net_1.default.createServer((socket) => {\n // create a new socket pipe\n const socketPipe = new UDPToTCPSocketPipe_1.default(socket, peerUDPAddress);\n this.incomingSocketPipes.set(socketPipe.id, socketPipe);\n });\n return await new Promise((resolve, reject) => {\n server.listen(0, () => {\n console.log('TCP server routing to UDP server');\n resolve(PeerInfo_1.Address.fromAddressInfo(server.address()));\n });\n });\n }\n}\nexports.default = UDPHolePunchClient;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst events_1 = require(\"events\");\nconst MicroTransportProtocol_1 = require(\"../MicroTransportProtocol\");\nlet socketPipeId = 0;\nclass UDPToTCPSocketPipe extends events_1.EventEmitter {\n constructor(tcpSocket, udpAddress) {\n super();\n this.id = socketPipeId;\n socketPipeId += 1;\n this.udpAddress = udpAddress;\n this.tcpSocket = tcpSocket;\n this.targetSocketPending = true;\n this.buffer = [];\n console.log(`[udp-tcp-relay:${this.id}] Created new pending SocketPipe.`);\n this.openRelayEnd();\n }\n openRelayEnd() {\n console.log(`[udp-tcp-relay:${this.id}] Socket pipe will TCP connection to connect to relay server.`);\n // We have a relay socket - now register its handlers\n // On data\n this.tcpSocket.on('data', (data) => {\n // Got data - do we have a target socket?\n if (this.udpSocket === undefined) {\n // Create a target socket for the relay socket - connecting to the target\n this.openTargetEnd();\n this.emit('pair');\n }\n // Is the target socket still connecting? If so, are we buffering data?\n if (this.targetSocketPending) {\n // Store the data until we have a target socket\n this.buffer[this.buffer.length] = data;\n }\n else {\n try {\n // Or just pass it directly\n this.udpSocket.write(data);\n }\n catch (ex) {\n console.error(`[udp-tcp-relay:${this.id}] Error writing to target socket: `, ex);\n }\n }\n });\n // On closing\n this.tcpSocket.on('close', (hadError) => {\n if (hadError) {\n console.error(`[udp-tcp-relay:${this.id}] Relay socket closed with error.`);\n }\n if (this.udpSocket !== undefined) {\n // Destroy the other socket\n this.udpSocket.destroy();\n }\n else {\n // Signal we are closing - server closed the connection\n this.emit('close');\n }\n });\n this.tcpSocket.on('error', (error) => {\n console.error(`[udp-tcp-relay:${this.id}] Error with relay socket: `, error);\n });\n }\n openTargetEnd() {\n console.log(`[udp-tcp-relay:${this.id}] Authorized by relay server. Creating new connection to target ${this.udpAddress.toString()}...`);\n console.log(`[udp-tcp-target:${this.id}] Socket pipe will TCP connection to connect to target server.`);\n // connect udp socket\n this.udpSocket = MicroTransportProtocol_1.connect(this.udpAddress.port, this.udpAddress.host);\n console.log(`[udp-tcp-target:${this.id}] Successfully connected to target ${this.udpAddress.toString()}.`);\n // Connected, not pending anymore\n this.targetSocketPending = false;\n // And if we have any buffered data, forward it\n try {\n for (const bufferItem of this.buffer) {\n this.udpSocket.write(bufferItem);\n }\n }\n catch (ex) {\n console.error(`[udp-tcp-target:${this.id}] Error writing to target socket: `, ex);\n }\n // Clear the array\n this.buffer.length = 0;\n // Got data from the target socket?\n this.udpSocket.on('data', (data) => {\n try {\n // Forward it!\n if (!this.tcpSocket.destroyed) {\n this.tcpSocket.write(data);\n }\n }\n catch (ex) {\n console.error(`target:${this.id}] Error writing to target socket: `, ex);\n }\n });\n this.udpSocket.on('error', (hadError) => {\n if (hadError) {\n console.error(`[target:${this.id}] Target socket was closed with error: `, hadError);\n }\n this.terminate();\n });\n }\n terminate() {\n console.log(`[udp-tcp-relay:${this.id}] Terminating socket pipe...`);\n this.removeAllListeners();\n this.tcpSocket.destroy();\n }\n}\nexports.default = UDPToTCPSocketPipe;\n","module.exports = require(\"cyclist\");","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst net_1 = __importDefault(require(\"net\"));\nconst events_1 = require(\"events\");\nlet socketPipeId = 1;\nclass TCPToUDPSocketPipe extends events_1.EventEmitter {\n constructor(localAddress, relaySocket) {\n super();\n this.id = socketPipeId;\n socketPipeId += 1;\n this.localAddress = localAddress;\n if (localAddress == undefined) {\n throw Error('localAddress cannot be undefined');\n }\n this.udpSocket = relaySocket;\n this.targetSocketPending = true;\n this.buffer = [];\n console.log(`[tcp-udp-relay:${this.id}] Created new pending SocketPipe.`);\n this.openRelayEnd();\n }\n openRelayEnd() {\n console.log(`[tcp-udp-relay:${this.id}] Socket pipe will TCP connection to connect to relay server.`);\n // We have a relay socket - now register its handlers\n // On data\n this.udpSocket.on('data', (data) => {\n // Got data - do we have a target socket?\n if (this.tcpSocket === undefined) {\n // Create a target socket for the relay socket - connecting to the target\n this.openTargetEnd();\n this.emit('pair');\n }\n // Is the target socket still connecting? If so, are we buffering data?\n if (this.targetSocketPending) {\n // Store the data until we have a target socket\n this.buffer[this.buffer.length] = data;\n }\n else {\n try {\n // Or just pass it directly\n this.tcpSocket.write(data);\n }\n catch (ex) {\n console.error(`[tcp-udp-relay:${this.id}] Error writing to target socket: `, ex);\n }\n }\n });\n // On closing\n this.udpSocket.on('close', (hadError) => {\n if (hadError) {\n console.error(`[tcp-udp-relay:${this.id}] Relay socket closed with error.`);\n }\n if (this.tcpSocket !== undefined) {\n // Destroy the other socket\n this.tcpSocket.destroy();\n }\n else {\n // Signal we are closing - server closed the connection\n this.emit('close');\n }\n });\n this.udpSocket.on('error', (error) => {\n console.error(`[tcp-udp-relay:${this.id}] Error with relay socket: `, error);\n });\n }\n openTargetEnd() {\n console.log(`[tcp-udp-relay:${this.id}] Authorized by relay server. Creating new connection to target ${this.localAddress.toString()}...`);\n console.log(`[tcp-udp-target:${this.id}] Socket pipe will TCP connection to connect to target server.`);\n // Or use TCP\n this.tcpSocket = net_1.default.connect(this.localAddress.port, this.localAddress.host, () => {\n console.log(`[tcp-udp-target:${this.id}] Successfully connected to target ${this.localAddress.toString()}.`);\n // Configure socket for keeping connections alive\n this.tcpSocket.setKeepAlive(true, 120 * 1000);\n // Connected, not pending anymore\n this.targetSocketPending = false;\n // And if we have any buffered data, forward it\n try {\n for (const bufferItem of this.buffer) {\n this.tcpSocket.write(bufferItem);\n }\n }\n catch (ex) {\n console.error(`[tcp-udp-target:${this.id}] Error writing to target socket: `, ex);\n }\n // Clear the array\n this.buffer.length = 0;\n });\n // Got data from the target socket?\n this.tcpSocket.on('data', (data) => {\n try {\n // Forward it!\n this.udpSocket.write(data);\n }\n catch (ex) {\n console.error(`target:${this.id}] Error writing to target socket: `, ex);\n }\n });\n this.tcpSocket.on('error', (hadError) => {\n if (hadError) {\n console.error(`[target:${this.id}] Target socket was closed with error: `, hadError);\n }\n this.terminate();\n });\n }\n terminate() {\n console.log(`[tcp-udp-relay:${this.id}] Terminating socket pipe...`);\n this.removeAllListeners();\n this.udpSocket.destroy();\n }\n}\nexports.default = TCPToUDPSocketPipe;\n","\"use strict\";\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst PeerInfo_1 = require(\"../PeerInfo\");\nconst grpc = __importStar(require(\"@grpc/grpc-js\"));\nconst TurnServer_1 = __importDefault(require(\"../turn/TurnServer\"));\nconst utils_1 = require(\"../../utils\");\nconst Peer_grpc_pb_1 = require(\"../../../proto/compiled/Peer_grpc_pb\");\nconst Peer_pb_1 = require(\"../../../proto/compiled/Peer_pb\");\nclass PeerServer {\n constructor(peerManager, keyManager) {\n var _a, _b, _c;\n this.started = false;\n this.peerManager = peerManager;\n this.keyManager = keyManager;\n /////////////////\n // GRPC Server //\n /////////////////\n this.server = new grpc.Server();\n this.server.addService(Peer_grpc_pb_1.PeerService, {\n messagePeer: this.messagePeer.bind(this),\n });\n // Create the server credentials. SSL only if ca cert exists\n const pkiInfo = this.keyManager.PKIInfo;\n if (pkiInfo.caCert && pkiInfo.cert && pkiInfo.key) {\n this.credentials = grpc.ServerCredentials.createSsl(pkiInfo.caCert, [\n {\n private_key: pkiInfo.key,\n cert_chain: pkiInfo.cert,\n },\n ], true);\n }\n else {\n this.credentials = grpc.ServerCredentials.createInsecure();\n }\n const port = (_c = (_a = process.env.PK_PORT) !== null && _a !== void 0 ? _a : (_b = this.peerManager.peerInfo.peerAddress) === null || _b === void 0 ? void 0 : _b.port) !== null && _c !== void 0 ? _c : 0;\n this.server.bindAsync(`0.0.0.0:${port}`, this.credentials, async (err, boundPort) => {\n if (err) {\n throw err;\n }\n else {\n const address = new PeerInfo_1.Address('0.0.0.0', boundPort);\n this.server.start();\n this.peerManager.peerInfo.peerAddress = address;\n console.log(`Peer Server running on: ${address}`);\n this.started = true;\n this.turnServer = new TurnServer_1.default(this.peerManager);\n }\n });\n }\n async messagePeer(call, callback) {\n const peerRequest = call.request;\n const { publickey: publickey, type, submessage } = peerRequest.toObject();\n // if we don't know publicKey, end connection\n if (!this.peerManager.hasPeer(publickey)) {\n throw Error('unknown public key');\n }\n // verify and decrypt request\n const verifiedMessage = await this.keyManager.verifyData(Buffer.from(submessage), Buffer.from(publickey));\n const decryptedMessage = await this.keyManager.decryptData(verifiedMessage);\n const request = utils_1.stringToProtobuf(decryptedMessage.toString());\n let response;\n switch (type) {\n case Peer_pb_1.SubServiceType.PING_PEER:\n response = await this.handlePing(request);\n break;\n case Peer_pb_1.SubServiceType.GIT:\n response = await this.handleGitRequest(request, publickey);\n break;\n case Peer_pb_1.SubServiceType.NAT_TRAVERSAL:\n response = await this.handleNatRequest(request);\n break;\n default:\n throw Error('peer message type not identified');\n }\n // encrypt and sign response\n const encryptedResponse = await this.keyManager.encryptData(Buffer.from(utils_1.protobufToString(response)), Buffer.from(publickey));\n const signedResponse = await this.keyManager.signData(encryptedResponse);\n const subMessage = signedResponse.toString();\n // composes peer message\n const peerResponse = new Peer_pb_1.PeerMessage();\n peerResponse.setPublickey(this.peerManager.peerInfo.publicKey);\n peerResponse.setType(type);\n peerResponse.setSubmessage(subMessage);\n // return peer response\n callback(null, peerResponse);\n }\n async handlePing(request) {\n const challenge = Buffer.from(request).toString();\n return request;\n }\n}\nexports.default = PeerServer;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// adapted from https://github.com/advance512/nat-traversal\nconst PeerInfo_1 = require(\"../PeerInfo\");\nconst events_1 = require(\"events\");\nconst net_1 = __importDefault(require(\"net\"));\nconst Peer_1 = require(\"../../../proto/js/Peer\");\nconst UDPHolePunchServer_1 = __importDefault(require(\"../udp-hole-punch/UDPHolePunchServer\"));\nclass SocketPipe extends events_1.EventEmitter {\n constructor(serverSocket, id) {\n super();\n this.id = id;\n this.serverSocket = serverSocket;\n this.bufferQueue = [];\n // Configure socket for keeping connections alive\n this.serverSocket.setKeepAlive(true, 120 * 1000);\n // New data\n this.serverSocket.on('data', (data) => {\n // if outgoing socket is connected, write data\n this.bufferQueue.push(data);\n if (this.clientSocket) {\n this.writeBuffer();\n }\n });\n this.serverSocket.on('close', (hadError) => {\n if (hadError) {\n console.error(`[${this}] Socket was closed due to error.`);\n }\n // Destroy the paired socket too\n if (this.clientSocket !== undefined) {\n this.clientSocket.destroy();\n }\n // Mark this socketPipe is closing\n this.emit('close');\n });\n this.serverSocket.on('error', (err) => {\n console.error(`Socket error: ${err}`);\n });\n }\n terminate() {\n this.serverSocket.destroy();\n }\n activate(outgoingSocket) {\n if (this.clientSocket) {\n throw new Error(`[${this}] Attempted to pair socket more than once.`);\n }\n console.log(`[socket-pipe: ${this.id}] Socket pipe activated!`);\n this.clientSocket = outgoingSocket;\n // Configure socket for keeping connections alive\n this.clientSocket.setKeepAlive(true, 120 * 1000);\n // If we have any data in the buffer, write it\n this.writeBuffer();\n }\n writeBuffer() {\n while (this.bufferQueue.length > 0) {\n const buffer = this.bufferQueue.shift();\n this.clientSocket.write(buffer);\n }\n }\n}\nclass EndpointServer extends events_1.EventEmitter {\n constructor(edgeType) {\n super();\n this.pendingSocketPipes = [];\n this.activeSocketPipes = [];\n this.edgeType = edgeType;\n }\n async start(port = 0) {\n await new Promise((resolve, reject) => {\n console.log(`[${this.edgeType}] endpoint server Will listen to incoming TCP connections.`);\n this.server = net_1.default\n .createServer((socket) => {\n console.log(`[endpoint-server: ${this.edgeType}] Incoming TCP connection from ${socket.remoteAddress}:${socket.remotePort}`);\n this.createSocketPipe(socket);\n })\n .listen(port, '0.0.0.0', () => {\n this.address = PeerInfo_1.Address.fromAddressInfo(this.server.address());\n console.log(`[${this.edgeType}] Listening on adress ${this.address.toString()}...`);\n resolve();\n });\n });\n }\n async createSocketPipe(incomingSocket) {\n const id = Math.max(0, ...this.activeSocketPipes.map((v) => v.id), ...this.pendingSocketPipes.map((v) => v.id)) + 1;\n const newSocketPipe = new SocketPipe(incomingSocket, id);\n console.log(`[${this.edgeType}-server-socket-pipe: ${newSocketPipe.id}] SocketPipe authorized.`);\n this.emit('new', newSocketPipe);\n newSocketPipe.on('close', () => {\n console.log(`[${this.edgeType}-server-socket-pipe: ${newSocketPipe.id}] SocketPipe closed connection`);\n this.removeSocketPipe(newSocketPipe);\n });\n return;\n }\n activateSocketPipe(pairServer, connectingSocketPipe) {\n // Do we have a pending socketPipe waiting?\n if (this.hasPendingSocketPipes()) {\n // Get the current pending socketPipe\n const pendingSocketPipe = this.getPendingSocketPipe();\n console.log(`[${this.edgeType}-server] Activating pending SocketPipe: connecting SocketPipes ${this.edgeType}-${pendingSocketPipe.id} and ${pairServer.edgeType}-${connectingSocketPipe.id}`);\n // Pair the connecting socketPipe with the pending socketPipe, allow data flow in one direction\n connectingSocketPipe.activate(pendingSocketPipe.serverSocket);\n this.addActiveSocketPipe(pendingSocketPipe);\n // And vice versa, for the second direction\n pendingSocketPipe.activate(connectingSocketPipe.serverSocket);\n pairServer.addActiveSocketPipe(connectingSocketPipe);\n }\n else {\n console.log(`[${this.edgeType}-server-socket-pipe: ${pairServer.edgeType}-${connectingSocketPipe.id}] SocketPipe will be pending until a parallel connection occurs`);\n // If we don't then our new connecting socketPipe is now pending and waiting for another connecting socketPipe\n pairServer.addPendingSocketPipe(connectingSocketPipe);\n }\n }\n getPendingSocketPipe() {\n const pendingSocketPipe = this.pendingSocketPipes[0];\n this.pendingSocketPipes.splice(0, 1);\n return pendingSocketPipe;\n }\n addActiveSocketPipe(socketPipe) {\n this.activeSocketPipes.push(socketPipe);\n }\n addPendingSocketPipe(socketPipe) {\n this.pendingSocketPipes.push(socketPipe);\n }\n removeSocketPipe(newSocketPipe) {\n let i = this.pendingSocketPipes.indexOf(newSocketPipe);\n if (i !== -1) {\n this.pendingSocketPipes.splice(i, 1);\n }\n else {\n i = this.activeSocketPipes.indexOf(newSocketPipe);\n if (i !== -1) {\n this.activeSocketPipes.splice(i, 1);\n }\n }\n }\n hasPendingSocketPipes() {\n return this.pendingSocketPipes.length > 0;\n }\n terminate() {\n console.log(`[${this.edgeType}] Terminating SocketListener.`);\n this.server.close();\n for (const socketPipe of this.pendingSocketPipes) {\n socketPipe.terminate();\n }\n for (const socketPipe of this.activeSocketPipes) {\n socketPipe.terminate();\n }\n this.server.unref();\n }\n}\nclass TurnServer {\n constructor(peerManager) {\n // public key -> {incoming, outgoing}\n this.connectionMap = new Map();\n this.peerManager = peerManager;\n this.peerManager.setNatHandler(this.handleNatMessage.bind(this));\n this.udpHolePunchServer = new UDPHolePunchServer_1.default(this.peerManager);\n }\n async handleNatMessage(request) {\n const { type, subMessage } = Peer_1.peerInterface.NatMessage.decodeDelimited(request);\n let response;\n switch (type) {\n case Peer_1.peerInterface.NatMessageType.PEER_CONNECTION:\n response = await this.handlePeerConnectionRequest(subMessage);\n break;\n case Peer_1.peerInterface.NatMessageType.RELAY_CONNECTION:\n response = await this.handleRelayConnectionRequest(subMessage);\n break;\n case Peer_1.peerInterface.NatMessageType.UDP_ADDRESS:\n response = await this.handleUDPAddressRequest();\n break;\n case Peer_1.peerInterface.NatMessageType.PEER_UDP_ADDRESS:\n response = await this.handlePeerUDPAddressRequest(subMessage);\n break;\n default:\n throw Error(`type not supported: ${type}`);\n }\n const encodedResponse = Peer_1.peerInterface.NatMessage.encodeDelimited({\n type,\n isResponse: true,\n subMessage: response,\n }).finish();\n return encodedResponse;\n }\n async handlePeerConnectionRequest(request) {\n var _a, _b;\n const { publicKey } = Peer_1.peerInterface.PeerConnectionRequest.decodeDelimited(request);\n const peerAddress = (_b = (_a = this.connectionMap.get(publicKey)) === null || _a === void 0 ? void 0 : _a.client.address.toString()) !== null && _b !== void 0 ? _b : '';\n const responseMessage = Peer_1.peerInterface.PeerConnectionResponse.encodeDelimited({ peerAddress }).finish();\n return responseMessage;\n }\n async handleRelayConnectionRequest(request) {\n const { publicKey } = Peer_1.peerInterface.RelayConnectionRequest.decodeDelimited(request);\n let server;\n let client;\n server = new EndpointServer('server');\n server.on('new', (connectingSocketPipe) => {\n client.activateSocketPipe(server, connectingSocketPipe);\n });\n await server.start();\n client = new EndpointServer('client');\n client.on('new', (connectingSocketPipe) => {\n server.activateSocketPipe(client, connectingSocketPipe);\n });\n await client.start();\n this.connectionMap.set(publicKey, { server, client });\n // send back response message\n const serverAddress = server.address.toString();\n const responseMessage = Peer_1.peerInterface.RelayConnectionResponse.encodeDelimited({ serverAddress }).finish();\n return responseMessage;\n }\n async handleUDPAddressRequest() {\n // send back response message\n const address = this.udpHolePunchServer.server.address().toString();\n const responseMessage = Peer_1.peerInterface.UDPAddressResponse.encodeDelimited({ address }).finish();\n return responseMessage;\n }\n async handlePeerUDPAddressRequest(request) {\n const { publicKey } = Peer_1.peerInterface.PeerUdpAddressRequest.decodeDelimited(request);\n // send back response message\n const address = this.udpHolePunchServer.getAddress(publicKey);\n const responseMessage = Peer_1.peerInterface.PeerUdpAddressResponse.encodeDelimited({ address }).finish();\n return responseMessage;\n }\n terminate() {\n this.connectionMap.forEach(({ server, client }) => {\n server.terminate();\n client.terminate();\n });\n this.relayServer.close();\n }\n}\nexports.default = TurnServer;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst PeerInfo_1 = __importDefault(require(\"../PeerInfo\"));\nconst Peer_1 = require(\"../../../proto/js/Peer\");\nconst MicroTransportProtocol_1 = require(\"./MicroTransportProtocol\");\nclass UDPHolePunchServer {\n constructor(peerManager) {\n // publicKey -> Server\n this.clientList = new Map();\n this.peerManager = peerManager;\n this.server = MicroTransportProtocol_1.createServer((conn) => {\n this.handleConnection(conn);\n });\n this.server.listenPort(0, () => {\n console.log(`UDP Server listening on ` + this.server.address().host + ':' + this.server.address().port);\n });\n }\n getAddress(publicKey) {\n var _a;\n return (_a = this.clientList.get(PeerInfo_1.default.formatPublicKey(publicKey))) === null || _a === void 0 ? void 0 : _a.remoteAddress.toString();\n }\n handleConnection(conn) {\n let buf = [];\n conn.on('data', (data) => {\n buf.push(data);\n // try decoding\n try {\n const { publicKey } = Peer_1.peerInterface.HolePunchRegisterRequest.decodeDelimited(Buffer.concat(buf));\n const remote = conn.remoteAddress;\n this.clientList.set(PeerInfo_1.default.formatPublicKey(publicKey), MicroTransportProtocol_1.connect(remote.port, remote.host));\n const response = Peer_1.peerInterface.HolePunchRegisterResponse.encodeDelimited({\n connectedAddress: remote.toString(),\n }).finish();\n conn.write(response);\n }\n catch (error) { }\n });\n }\n}\nexports.default = UDPHolePunchServer;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst PeerInfo_1 = __importDefault(require(\"../PeerInfo\"));\nconst crypto_1 = require(\"crypto\");\nconst grpc = __importStar(require(\"@grpc/grpc-js\"));\nconst utils_1 = require(\"../../utils\");\nconst Peer_grpc_pb_1 = require(\"../../../proto/compiled/Peer_grpc_pb\");\nconst Peer_pb_1 = require(\"../../../proto/compiled/Peer_pb\");\nclass PeerConnection {\n constructor(publicKey, keyManager, peerManager) {\n this.connected = false;\n this.publicKey = publicKey;\n this.keyManager = keyManager;\n this.peerManager = peerManager;\n const pkiInfo = keyManager.PKIInfo;\n if (pkiInfo.caCert && pkiInfo.cert && pkiInfo.key) {\n this.credentials = grpc.credentials.createSsl(pkiInfo.caCert, pkiInfo.key, pkiInfo.cert);\n }\n else {\n this.credentials = grpc.credentials.createInsecure();\n }\n }\n async connectDirectly() {\n // try to create a direct connection\n if (this.getPeerInfo().peerAddress) {\n // direct connection attempt\n const address = this.getPeerInfo().peerAddress;\n const peerClient = new Peer_grpc_pb_1.PeerClient(address.toString(), this.credentials);\n this.connected = true;\n return peerClient;\n }\n else if (!this.getPeerInfo().peerAddress) {\n throw Error('peer does not have a connected address');\n }\n else {\n throw Error('peer is already connected');\n }\n }\n async connectHolePunch() {\n // try to hole punch to peer via relay peer\n if (!this.connected && this.getPeerInfo().relayPublicKey) {\n // connect to relay and ask it to create a relay\n console.log('requesting udp hole punch connection');\n const connectedAddress = await this.peerManager.turnClient.requestHolePunchConnection(this.getPeerInfo().relayPublicKey, this.getPeerInfo().publicKey);\n const peerClient = new Peer_grpc_pb_1.PeerClient(connectedAddress.toString(), this.credentials);\n this.connected = true;\n return peerClient;\n }\n else if (!this.getPeerInfo().relayPublicKey) {\n throw Error('peer does not have relay public key specified');\n }\n else {\n throw Error('peer is already connected');\n }\n }\n async connectRelay() {\n // try to relay to peer via relay peer\n if (!this.connected && this.getPeerInfo().relayPublicKey) {\n // turn relay\n // connect to relay and ask it to create a relay\n const connectedAddress = await this.peerManager.turnClient.requestPeerConnection(this.getPeerInfo().publicKey, this.getPeerInfo().relayPublicKey);\n const peerClient = new Peer_grpc_pb_1.PeerClient(connectedAddress.toString(), this.credentials);\n this.connected = true;\n return peerClient;\n }\n else if (!this.getPeerInfo().relayPublicKey) {\n throw Error('peer does not have relay public key specified');\n }\n else {\n throw Error('peer is already connected');\n }\n }\n async connect() {\n // connect if not already connected\n if (!this.connected) {\n try {\n this.peerClient = await utils_1.promiseAny([this.connectDirectly(), this.connectHolePunch(), this.connectRelay()]);\n }\n catch (error) {\n console.log(error);\n }\n }\n // try a ping\n if (this.connected && (await this.sendPingRequest(5000))) {\n return;\n }\n else {\n this.connected = false;\n // still not connected\n throw Error('could not connect to peer');\n }\n }\n getPeerInfo() {\n if (!this.peerManager.hasPeer(this.publicKey)) {\n throw Error('peer does not exist in peer store');\n }\n return this.peerManager.getPeer(this.publicKey);\n }\n async sendPingRequest(timeout) {\n // eslint-disable-next-line\n return await new Promise(async (resolve, reject) => {\n try {\n if (timeout) {\n setTimeout(() => reject('ping timed out'), timeout);\n }\n const challenge = crypto_1.randomBytes(16).toString('base64');\n // encode request\n const peerRequest = await this.encodeRequest(Peer_pb_1.SubServiceType.PING_PEER, utils_1.stringToProtobuf(challenge));\n // send request\n const peerResponse = await new Promise((resolve, reject) => {\n this.peerClient.messagePeer(peerRequest, (err, response) => {\n if (err) {\n reject(err);\n }\n else {\n resolve(response);\n }\n });\n });\n // decode response\n const { type: responseType, response } = await this.decodeResponse(peerResponse);\n const challengeResponse = utils_1.protobufToString(response);\n resolve(challenge == challengeResponse);\n }\n catch (error) {\n reject(error);\n }\n });\n }\n async pingPeer(timeout) {\n // connect to peer\n await this.connect();\n // send ping request\n return await this.sendPingRequest(timeout);\n }\n async sendPeerRequest(type, request) {\n // connect to peer\n await this.connect();\n // encode request\n const peerRequest = await this.encodeRequest(type, request);\n const peerResponse = await new Promise((resolve, reject) => {\n this.peerClient.messagePeer(peerRequest, (err, response) => {\n if (err) {\n reject(err);\n }\n else {\n resolve(response);\n }\n });\n });\n // decode response\n const { type: responseType, response } = await this.decodeResponse(peerResponse);\n // return response\n return response;\n }\n // ======== Helper Methods ======== //\n async encodeRequest(type, request) {\n // encrypt message\n const requestString = utils_1.protobufToString(request);\n const encryptedMessage = await this.keyManager.encryptData(Buffer.from(requestString), Buffer.from(this.publicKey));\n // sign message\n const signedMessage = await this.keyManager.signData(encryptedMessage);\n const subMessage = signedMessage.toString();\n // encode and send message\n const peerRequest = new Peer_pb_1.PeerMessage();\n peerRequest.setPublickey(this.peerManager.peerInfo.publicKey);\n peerRequest.setType(type);\n peerRequest.setSubmessage(subMessage);\n return peerRequest;\n }\n async decodeResponse(response) {\n const { publickey, type: responseType, submessage } = response.toObject();\n // decode peerResponse\n if (PeerInfo_1.default.formatPublicKey(this.getPeerInfo().publicKey) != PeerInfo_1.default.formatPublicKey(publickey)) {\n // drop packet\n throw Error('response public key does not match request public key');\n }\n // verify response\n const verifiedResponse = await this.keyManager.verifyData(Buffer.from(submessage), Buffer.from(publickey));\n // decrypt response\n const decryptedResponse = await this.keyManager.decryptData(verifiedResponse);\n const responseBuffer = utils_1.stringToProtobuf(decryptedResponse.toString());\n return { type: responseType, response: responseBuffer };\n }\n}\nexports.default = PeerConnection;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar _a, _b;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst dgram_1 = __importDefault(require(\"dgram\"));\nconst PeerInfo_1 = __importDefault(require(\"./PeerInfo\"));\nconst events_1 = require(\"events\");\nconst Peer_1 = require(\"../../proto/js/Peer\");\nconst utils_1 = require(\"../utils\");\n// This module is based heavily on libp2p's mDNS module:\n// https://github.com/libp2p/js-libp2p-mdns\n// It is supposed to discover peers on the local network\n// This module was also generated with the help of:\n// https://nrempel.com/using-udp-multicast-with-node-js/\n//\n// \"\"\"\n// In computer networking, the multicast DNS (mDNS) protocol\n// resolves hostnames to IP addresses within small networks\n// that do not include a local name server\n// \"\"\"\nconst UDP_MULTICAST_PORT = parseInt((_a = process.env.UDP_MULTICAST_PORT) !== null && _a !== void 0 ? _a : '5353');\nconst UDP_MULTICAST_ADDR = (_b = process.env.UDP_MULTICAST_ADDR) !== null && _b !== void 0 ? _b : '224.0.0.251';\nclass MulticastBroadcaster extends events_1.EventEmitter {\n constructor(peerManager, keyManager) {\n super();\n this.interval = 1e3;\n this.broadcastInterval = null;\n this.peerManager = peerManager;\n this.keyManager = keyManager;\n // Create socket\n this.socket = dgram_1.default.createSocket({ type: 'udp4', reuseAddr: true });\n this.socket.bind(UDP_MULTICAST_PORT);\n // Set up listener\n this.socket.on('listening', (() => {\n this.socket.addMembership(UDP_MULTICAST_ADDR);\n const address = this.socket.address();\n // Start the broadcasting process\n this.startBroadcasting();\n }).bind(this));\n }\n startListening() {\n if (!this.socket.listenerCount('message')) {\n // Handle messages\n this.socket.on('message', this.handleBroadcastMessage.bind(this));\n }\n }\n stopBroadcasting() {\n if (this.broadcastInterval) {\n clearInterval(this.broadcastInterval);\n }\n }\n startBroadcasting() {\n const broadcast = async () => {\n var _a;\n if (!this.keyManager.identityLoaded) {\n return;\n }\n const peerInfo = this.peerManager.peerInfo;\n const encodedPeerInfo = Peer_1.peerInterface.PeerInfoMessage.encodeDelimited({\n publicKey: peerInfo.publicKey,\n peerAddress: (_a = peerInfo.peerAddress) === null || _a === void 0 ? void 0 : _a.toString(),\n relayPublicKey: peerInfo.relayPublicKey,\n }).finish();\n // sign it for authenticity\n const signedPeerInfo = await this.keyManager.signData(Buffer.from(utils_1.protobufToString(encodedPeerInfo)));\n const encodedPeerMessage = Peer_1.peerInterface.PeerMessage.encodeDelimited({\n type: Peer_1.peerInterface.SubServiceType.PING_PEER,\n publicKey: this.peerManager.peerInfo.publicKey,\n subMessage: signedPeerInfo.toString(),\n }).finish();\n this.socket.send(encodedPeerMessage, 0, encodedPeerMessage.length, UDP_MULTICAST_PORT, UDP_MULTICAST_ADDR);\n };\n // Immediately start a query, then do it every interval.\n broadcast();\n this.broadcastInterval = setInterval(broadcast, this.interval);\n }\n async handleBroadcastMessage(request, rinfo) {\n try {\n const { publicKey: signingKey, type, subMessage } = Peer_1.peerInterface.PeerMessage.decodeDelimited(request);\n // only relevant if peer public key exists in store and type is of PING\n if (!this.peerManager.hasPeer(signingKey)) {\n throw Error('peer does not exist in store');\n }\n else if (this.peerManager.peerInfo.publicKey == signingKey) {\n throw Error('peer message is from self');\n }\n else if (!(type == Peer_1.peerInterface.SubServiceType.PING_PEER)) {\n throw Error(`peer message is not of type PING, type is: ${Peer_1.peerInterface.SubServiceType[type]}`);\n }\n // verify the subMessage\n const verifiedMessage = await this.keyManager.verifyData(subMessage, Buffer.from(signingKey));\n const encodedMessage = utils_1.stringToProtobuf(verifiedMessage.toString());\n const { publicKey, peerAddress, relayPublicKey } = Peer_1.peerInterface.PeerInfoMessage.decodeDelimited(encodedMessage);\n // construct a peer info object\n const peerInfo = new PeerInfo_1.default(publicKey, peerAddress, relayPublicKey);\n // update the peer store\n this.peerManager.updatePeer(peerInfo);\n this.emit('found', publicKey);\n }\n catch (err) {\n // Couldn't decode message\n // We don't want the multicast discovery to error on every message it coudln't decode!\n }\n }\n}\nexports.default = MulticastBroadcaster;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst os_1 = __importDefault(require(\"os\"));\nconst path_1 = __importDefault(require(\"path\"));\nconst isomorphic_git_1 = __importDefault(require(\"isomorphic-git\"));\nconst Vault_1 = __importDefault(require(\"../vaults/Vault\"));\nconst encryptedfs_1 = require(\"encryptedfs\");\nconst GitBackend_1 = __importDefault(require(\"../git/GitBackend\"));\nconst GitFrontend_1 = __importDefault(require(\"../git/GitFrontend\"));\nclass VaultManager {\n constructor(polykeyPath = `${os_1.default.homedir()}/.polykey`, fileSystem, keyManager, peerManager) {\n this.polykeyPath = polykeyPath;\n this.fileSystem = fileSystem;\n this.keyManager = keyManager;\n this.peerManager = peerManager;\n this.metadataPath = path_1.default.join(polykeyPath, '.vaultKeys');\n // Make polykeyPath if it doesn't exist\n this.fileSystem.mkdirSync(this.polykeyPath, { recursive: true });\n // Initialize stateful variables\n this.vaults = new Map();\n this.vaultKeys = new Map();\n this.gitBackend = new GitBackend_1.default(polykeyPath, ((repoName) => this.getVault(repoName).EncryptedFS).bind(this), this.getVaultNames.bind(this));\n this.gitFrontend = new GitFrontend_1.default(peerManager);\n this.peerManager.setGitHandler(this.gitBackend.handleGitMessage.bind(this.gitBackend));\n // Read in vault keys\n this.loadMetadata();\n }\n getVaultNames(publicKey) {\n const vaultNames = Object.keys(this.vaults);\n if (publicKey) {\n const allowedVaultNames = [];\n for (const vaultName of vaultNames) {\n if (this.getVault(vaultName).peerCanAccess(publicKey)) {\n allowedVaultNames.push(vaultName);\n }\n }\n return allowedVaultNames;\n }\n else {\n return vaultNames;\n }\n }\n /**\n * Get a vault from the vault manager\n * @param vaultName Name of desired vault\n */\n getVault(vaultName) {\n if (this.vaults.has(vaultName)) {\n const vault = this.vaults.get(vaultName);\n return vault;\n }\n else if (this.vaultKeys.has(vaultName)) {\n // vault not in map, create new instance\n this.validateVault(vaultName);\n const vaultKey = this.vaultKeys.get(vaultName);\n const vault = new Vault_1.default(vaultName, vaultKey, this.polykeyPath, this.gitFrontend);\n this.vaults.set(vaultName, vault);\n return vault;\n }\n else {\n throw Error(`vault does not exist in memory: '${vaultName}'`);\n }\n }\n /**\n * Get a vault from the vault manager\n * @param vaultName Unique name of new vault\n * @param key Optional key to use for the vault encryption, otherwise it is generated\n */\n async createVault(vaultName, key) {\n if (this.vaultExists(vaultName)) {\n throw Error('Vault already exists!');\n }\n try {\n const vaultPath = path_1.default.join(this.polykeyPath, vaultName);\n // Directory not present, create one\n this.fileSystem.mkdirSync(vaultPath, { recursive: true });\n // Create key if not provided\n let vaultKey;\n if (!key) {\n // Generate new key\n vaultKey = await this.keyManager.generateKey(`${vaultName}-Key`, this.keyManager.getPrivateKey(), false);\n }\n else {\n // Assign key if it is provided\n vaultKey = key;\n }\n this.vaultKeys.set(vaultName, vaultKey);\n this.writeMetadata();\n // Create vault\n const vault = new Vault_1.default(vaultName, vaultKey, this.polykeyPath, this.gitFrontend);\n // Init repository for vault\n const efs = vault.EncryptedFS;\n const fileSystem = { promises: efs.promises };\n await isomorphic_git_1.default.init({\n fs: fileSystem,\n dir: vaultPath,\n });\n // Initial commit\n await isomorphic_git_1.default.commit({\n fs: fileSystem,\n dir: vaultPath,\n author: {\n name: vaultName,\n },\n message: 'init commit',\n });\n // Write packed-refs file because isomorphic git goes searching for it\n // and apparently its not autogenerated\n efs.writeFileSync(path_1.default.join(vaultPath, '.git', 'packed-refs'), '# pack-refs with: peeled fully-peeled sorted');\n // Set vault\n this.vaults.set(vaultName, vault);\n return this.getVault(vaultName);\n }\n catch (err) {\n // Delete vault dir and garbage collect\n this.destroyVault(vaultName);\n throw err;\n }\n }\n /**\n * Get a vault from the vault manager\n * @param vaultName Name of vault to be cloned\n * @param address Address of polykey node that owns vault to be cloned\n * @param getSocket Function to get an active connection to provided address\n */\n async cloneVault(vaultName, publicKey) {\n // Confirm it doesn't exist locally already\n if (this.vaultExists(vaultName)) {\n throw Error('Vault name already exists locally, try pulling instead');\n }\n const vaultUrl = `http://0.0.0.0/${vaultName}`;\n // First check if it exists on remote\n const gitRequest = this.gitFrontend.connectToPeerGit(publicKey);\n const info = await isomorphic_git_1.default.getRemoteInfo({\n http: gitRequest,\n url: vaultUrl,\n });\n if (!info.refs) {\n throw Error(`Peer does not have vault: '${vaultName}'`);\n }\n // Create new efs first\n // Generate new key\n const vaultKey = await this.keyManager.generateKey(`${vaultName}-Key`, this.keyManager.getPrivateKey());\n // Set filesystem\n const vfsInstance = new (require('virtualfs').VirtualFS)();\n const newEfs = new encryptedfs_1.EncryptedFS(vaultKey, vfsInstance, vfsInstance, this.fileSystem, process);\n // Clone vault from address\n await isomorphic_git_1.default.clone({\n fs: { promises: newEfs.promises },\n http: gitRequest,\n dir: path_1.default.join(this.polykeyPath, vaultName),\n url: vaultUrl,\n ref: 'master',\n singleBranch: true,\n });\n // Finally return the vault\n const vault = new Vault_1.default(vaultName, vaultKey, this.polykeyPath, this.gitFrontend);\n this.vaults.set(vaultName, vault);\n return vault;\n }\n async scanVaultNames(publicKey) {\n const gitRequest = this.gitFrontend.connectToPeerGit(publicKey);\n const vaultNameList = await gitRequest.scanVaults();\n return vaultNameList;\n }\n /**\n * Determines whether the vault exists\n * @param vaultName Name of desired vault\n */\n vaultExists(vaultName) {\n const vaultPath = path_1.default.join(this.polykeyPath, vaultName);\n const vaultExists = this.fileSystem.existsSync(vaultPath);\n return vaultExists;\n }\n /**\n * [WARNING] Destroys a certain vault and all its secrets\n * @param vaultName Name of vault to be destroyed\n */\n destroyVault(vaultName) {\n // this is convenience function for removing all tags\n // and triggering garbage collection\n // destruction is a better word as we should ensure all traces is removed\n const vaultPath = path_1.default.join(this.polykeyPath, vaultName);\n // Remove directory on file system\n if (this.fileSystem.existsSync(vaultPath)) {\n this.fileSystem.rmdirSync(vaultPath, { recursive: true });\n }\n // Remove from maps\n this.vaults.delete(vaultName);\n this.vaultKeys.delete(vaultName);\n // Write to metadata file\n this.writeMetadata();\n const vaultPathExists = this.fileSystem.existsSync(vaultPath);\n if (vaultPathExists) {\n throw Error('Vault folder could not be destroyed!');\n }\n }\n /**\n * List the names of all vaults in memory\n */\n listVaults() {\n return Array.from(this.vaults.keys());\n }\n /* ============ HELPERS =============== */\n validateVault(vaultName) {\n if (!this.vaults.has(vaultName)) {\n throw Error(`vault does not exist in memory: '${vaultName}'`);\n }\n if (!this.vaultKeys.has(vaultName)) {\n throw Error(`vault key does not exist in memory: '${vaultName}'`);\n }\n const vaultPath = path_1.default.join(this.polykeyPath, vaultName);\n if (!this.fileSystem.existsSync(vaultPath)) {\n throw Error(`vault directory does not exist: '${vaultPath}'`);\n }\n }\n async writeMetadata() {\n const metadata = JSON.stringify([...this.vaultKeys]);\n const encryptedMetadata = await this.keyManager.encryptData(Buffer.from(metadata));\n await this.fileSystem.promises.writeFile(this.metadataPath, encryptedMetadata);\n }\n async loadMetadata() {\n // Check if file exists\n if (this.fileSystem.existsSync(this.metadataPath) && this.keyManager.identityLoaded) {\n const encryptedMetadata = this.fileSystem.readFileSync(this.metadataPath);\n const metadata = (await this.keyManager.decryptData(encryptedMetadata)).toString();\n for (const [key, value] of new Map(JSON.parse(metadata))) {\n this.vaultKeys.set(key, Buffer.from(value));\n }\n // Initialize vaults in memory\n for (const [vaultName, vaultKey] of this.vaultKeys.entries()) {\n const vaultPath = path_1.default.join(this.polykeyPath, vaultName);\n if (this.fileSystem.existsSync(vaultPath)) {\n const vault = new Vault_1.default(vaultName, vaultKey, this.polykeyPath, this.gitFrontend);\n this.vaults.set(vaultName, vault);\n }\n }\n }\n }\n}\nexports.default = VaultManager;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst fs_1 = __importDefault(require(\"fs\"));\nconst path_1 = __importDefault(require(\"path\"));\nconst isomorphic_git_1 = __importDefault(require(\"isomorphic-git\"));\nconst async_mutex_1 = require(\"async-mutex\");\nconst encryptedfs_1 = require(\"encryptedfs\");\nclass Vault {\n constructor(name, symKey, baseDir, gitFrontend) {\n // Concurrency\n this.mutex = new async_mutex_1.Mutex();\n // how do we create pub/priv key pair?\n // do we use the same gpg pub/priv keypair\n this.key = symKey;\n // Set filesystem\n const vfsInstance = new (require('virtualfs').VirtualFS)();\n this.efs = new encryptedfs_1.EncryptedFS(this.key, vfsInstance, vfsInstance, fs_1.default, process);\n this.name = name;\n this.vaultPath = path_1.default.join(baseDir, name);\n // make the vault directory\n this.efs.mkdirSync(this.vaultPath, { recursive: true });\n this.secrets = new Map();\n this.loadSecrets();\n this.gitFrontend = gitFrontend;\n // Load metadata\n this.metadataPath = path_1.default.join(this.vaultPath, '.vault', 'metadata');\n this.loadMetadata();\n }\n /**\n * Returns the Encrypted File System used for vault operations\n */\n get EncryptedFS() {\n return this.efs;\n }\n /**\n * Determines whether a secret exists in the vault\n * @param secretName Name of desired secret\n */\n secretExists(secretName) {\n const secretPath = path_1.default.join(this.vaultPath, secretName);\n return this.secrets.has(secretName) && this.efs.existsSync(secretPath);\n }\n /**\n * Adds a secret to the vault\n * @param secretName Name of new secret\n * @param secret Content of new secret\n */\n async addSecret(secretName, secret) {\n const release = await this.mutex.acquire();\n try {\n // Check if secret already exists\n if (this.secrets.has(secretName)) {\n throw Error('Secret already exists, try updating it instead.');\n }\n const writePath = path_1.default.join(this.vaultPath, secretName);\n // Write secret\n await this.efs.promises.writeFile(writePath, secret, {});\n // Update secrets map\n this.secrets.set(secretName, secret);\n // Auto commit message\n await this.commitChanges(`Add secret: ${secretName}`, secretName, 'added');\n }\n catch (error) {\n release();\n throw error;\n }\n finally {\n release();\n }\n }\n /**\n * Updates a secret in the vault\n * @param secretName Name of secret to be updated\n * @param secret Content of updated secret\n */\n async updateSecret(secretName, secret) {\n const release = await this.mutex.acquire();\n try {\n // Check if secret already exists\n if (!this.secrets.has(secretName)) {\n throw Error('Secret does not exist, try adding it instead.');\n }\n const writePath = path_1.default.join(this.vaultPath, secretName);\n // Write secret\n await this.efs.promises.writeFile(writePath, secret, {});\n // Update secrets map\n this.secrets.set(secretName, secret);\n // Auto commit message\n await this.commitChanges(`Update secret: ${secretName}`, secretName, 'modified');\n }\n catch (error) {\n release();\n throw error;\n }\n finally {\n release();\n }\n }\n /**\n * Get a secret from the vault\n * @param secretName Name of secret to be retrieved\n */\n getSecret(secretName) {\n if (this.secrets.has(secretName)) {\n const secret = this.secrets.get(secretName);\n if (secret) {\n return secret;\n }\n else {\n const secretPath = path_1.default.join(this.vaultPath, secretName);\n // TODO: this should be async\n const secretBuf = this.efs.readFileSync(secretPath, {});\n this.secrets.set(secretName, secretBuf);\n return secretBuf;\n }\n }\n throw Error('Secret: ' + secretName + ' does not exist');\n }\n /**\n * [WARNING] Removes a secret from the vault\n * @param secretName Name of secret to be removed\n */\n async removeSecret(secretName) {\n const release = await this.mutex.acquire();\n try {\n if (this.secrets.has(secretName)) {\n const successful = this.secrets.delete(secretName);\n // Remove from fs\n await this.efs.promises.unlink(path_1.default.join(this.vaultPath, secretName));\n // Auto commit message\n await this.commitChanges(`Remove secret: ${secretName}`, secretName, 'removed');\n if (successful) {\n return;\n }\n throw Error('Secret: ' + secretName + ' was not removed');\n }\n throw Error('Secret: ' + secretName + ' does not exist');\n }\n catch (error) {\n release();\n throw error;\n }\n finally {\n release();\n }\n }\n /**\n * Lists all the secrets currently in the vault\n */\n listSecrets() {\n let secrets = Array.from(this.secrets.keys());\n return secrets;\n }\n tagVault() { }\n untagVault() { }\n /////////////\n // Sharing //\n /////////////\n /**\n * Allows a particular public key to access the vault\n * @param publicKey Public key to share with\n */\n shareVault(publicKey) {\n if (this.sharedPubKeys.has(name)) {\n throw Error('Vault is already shared with given public key');\n }\n this.sharedPubKeys.add(publicKey);\n // Write metadata\n this.writeMetadata();\n }\n /**\n * Removes access to the vault for a particular public key\n * @param publicKey Public key to unshare with\n */\n unshareVault(publicKey) {\n if (!this.sharedPubKeys.has(publicKey)) {\n throw Error('Vault is not shared with given public key');\n }\n this.sharedPubKeys.delete(publicKey);\n // Write metadata\n this.writeMetadata();\n }\n /**\n * Determines if a particular public key can access the vault\n * @param publicKey Public key to check\n */\n peerCanAccess(publicKey) {\n // return this.sharedPubKeys.has(publicKey)\n return true;\n }\n /**\n * Pulls the vault from a specific address\n * @param publicKey Public key of polykey node that owns vault to be pulled\n */\n async pullVault(publicKey) {\n const release = await this.mutex.acquire();\n try {\n // Strangely enough this is needed for pulls along with ref set to 'HEAD'\n // In isogit's documentation, this is just to get the currentBranch name\n // But it solves a bug whereby if not used, git.pull complains that it can't\n // find the master branch or HEAD\n await isomorphic_git_1.default.currentBranch({\n fs: { promises: this.efs.promises },\n dir: this.vaultPath,\n fullname: true,\n });\n // First pull\n const gitClient = this.gitFrontend.connectToPeerGit(publicKey);\n await isomorphic_git_1.default.pull({\n fs: { promises: this.efs.promises },\n http: gitClient,\n dir: this.vaultPath,\n url: 'http://' + '0.0.0.0:0' + '/' + this.name,\n ref: 'HEAD',\n singleBranch: true,\n author: {\n name: this.name,\n },\n });\n // Load any new secrets\n this.loadSecrets();\n }\n catch (error) {\n release();\n throw error;\n }\n finally {\n release();\n }\n }\n async getVaultHistory(depth) {\n const logs = await isomorphic_git_1.default.log({\n fs: { promises: this.efs.promises },\n dir: this.vaultPath,\n depth,\n });\n return logs.map((commit) => {\n return commit.commit.message;\n });\n }\n // ============== Helper methods ============== //\n writeMetadata() {\n // mkdir first\n this.efs.mkdirSync(path_1.default.dirname(this.metadataPath), { recursive: true });\n // Create and write metadata\n const metadata = {\n sharedPubKeys: Array.from(this.sharedPubKeys.keys()),\n };\n this.efs.writeFileSync(this.metadataPath, JSON.stringify(metadata));\n }\n loadMetadata() {\n if (this.efs.existsSync(this.metadataPath)) {\n const fileContents = this.efs.readFileSync(this.metadataPath).toString();\n const metadata = JSON.parse(fileContents);\n this.sharedPubKeys = new Set(metadata.sharedPubKeys);\n }\n else {\n // Need to create it\n this.sharedPubKeys = new Set();\n this.writeMetadata();\n }\n }\n async commitChanges(message, secretName, action) {\n if (action == 'removed') {\n await isomorphic_git_1.default.remove({\n fs: { promises: this.efs.promises },\n dir: this.vaultPath,\n filepath: secretName,\n });\n }\n else {\n await isomorphic_git_1.default.add({\n fs: { promises: this.efs.promises },\n dir: this.vaultPath,\n filepath: secretName,\n });\n }\n return await isomorphic_git_1.default.commit({\n fs: { promises: this.efs.promises },\n dir: this.vaultPath,\n author: {\n name: this.name,\n },\n message: message,\n });\n }\n loadSecrets() {\n const secrets = fs_1.default.readdirSync(this.vaultPath, undefined);\n // Remove all secrets first\n this.secrets.clear();\n // Load secrets\n for (const secret of secrets.filter((s) => s[0] != '.')) {\n this.secrets.set(secret, null);\n }\n }\n}\nexports.default = Vault;\n","module.exports = require(\"async-mutex\");","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst path_1 = __importDefault(require(\"path\"));\nconst Git_1 = require(\"../../proto/js/Git\");\nconst readable_stream_1 = require(\"readable-stream\");\nconst uploadPack_1 = __importDefault(require(\"./upload-pack/uploadPack\"));\nconst GitSideBand_1 = __importDefault(require(\"./side-band/GitSideBand\"));\nconst packObjects_1 = __importDefault(require(\"./pack-objects/packObjects\"));\n// Here is the protocol git outlines for sending pack files over http:\n// https://git-scm.com/docs/pack-protocol/2.17.0\n// https://github.com/git/git/blob/master/Documentation/technical/pack-protocol.txt\n// This should be consulted in developing our upload pack implementation\n// This git backend (as well as HttpDuplex class) is heavily inspired by node-git-server:\n// https://github.com/gabrielcsapo/node-git-server\n// We need someway to notify other agents about what vaults we have based on some type of authorisation because they don't explicitly know about them\nclass GitBackend {\n constructor(repoDirectoryPath, getFileSystem, getVaultNames) {\n this.repoDirectoryPath = repoDirectoryPath;\n this.getFileSystem = getFileSystem;\n this.getVaultNames = getVaultNames;\n }\n async handleGitMessage(request, publicKey) {\n const { type, subMessage } = Git_1.gitInterface.GitMessage.decodeDelimited(request);\n let response;\n switch (type) {\n case Git_1.gitInterface.GitMessageType.INFO:\n {\n const { vaultName } = Git_1.gitInterface.InfoRequest.decodeDelimited(subMessage);\n response = Git_1.gitInterface.InfoReply.encodeDelimited({\n vaultName,\n body: await this.handleInfoRequest(vaultName),\n }).finish();\n }\n break;\n case Git_1.gitInterface.GitMessageType.PACK:\n {\n const { vaultName, body } = Git_1.gitInterface.PackRequest.decodeDelimited(subMessage);\n response = Git_1.gitInterface.PackReply.encodeDelimited({\n vaultName,\n body: await this.handlePackRequest(vaultName, Buffer.from(body)),\n }).finish();\n }\n break;\n case Git_1.gitInterface.GitMessageType.VAULT_NAMES:\n {\n response = Git_1.gitInterface.VaultNamesReply.encodeDelimited({\n vaultNameList: await this.handleVaultNamesRequest(publicKey),\n }).finish();\n }\n break;\n default: {\n throw Error('git message type not supported');\n }\n }\n // encode a git response\n const gitResponse = Git_1.gitInterface.GitMessage.encodeDelimited({ type, subMessage: response }).finish();\n return gitResponse;\n }\n async handleInfoRequest(repoName) {\n // Only handle upload-pack for now\n const service = 'upload-pack';\n const fileSystem = this.getFileSystem(repoName);\n const responseBuffers = [];\n if (!fileSystem.existsSync(path_1.default.join(this.repoDirectoryPath, repoName))) {\n throw Error(`repository does not exist: '${repoName}'`);\n }\n responseBuffers.push(Buffer.from(this.createGitPacketLine('# service=git-' + service + '\\n')));\n responseBuffers.push(Buffer.from('0000'));\n const buffers = await uploadPack_1.default(fileSystem, path_1.default.join(this.repoDirectoryPath, repoName), undefined, true);\n const buffersToWrite = buffers !== null && buffers !== void 0 ? buffers : [];\n responseBuffers.push(...buffersToWrite);\n return Buffer.concat(responseBuffers);\n }\n async handlePackRequest(repoName, body) {\n // eslint-disable-next-line\n return new Promise(async (resolve, reject) => {\n const responseBuffers = [];\n const fileSystem = this.getFileSystem(repoName);\n // Check if repo exists\n if (!fileSystem.existsSync(path_1.default.join(this.repoDirectoryPath, repoName))) {\n throw Error(`repository does not exist: '${repoName}'`);\n }\n if (body.toString().slice(4, 8) == 'want') {\n const wantedObjectId = body.toString().slice(9, 49);\n const packResult = await packObjects_1.default(fileSystem, path_1.default.join(this.repoDirectoryPath, repoName), [wantedObjectId], undefined);\n // This the 'wait for more data' line as I understand it\n responseBuffers.push(Buffer.from('0008NAK\\n'));\n // This is to get the side band stuff working\n const readable = new readable_stream_1.PassThrough();\n const progressStream = new readable_stream_1.PassThrough();\n const sideBand = GitSideBand_1.default.mux('side-band-64', readable, packResult.packstream, progressStream, []);\n sideBand.on('data', (data) => {\n responseBuffers.push(data);\n });\n sideBand.on('end', () => {\n resolve(Buffer.concat(responseBuffers));\n });\n sideBand.on('error', (err) => {\n reject(err);\n });\n // Write progress to the client\n progressStream.write(Buffer.from('0014progress is at 50%\\n'));\n progressStream.end();\n }\n });\n }\n async handleVaultNamesRequest(publicKey) {\n return this.getVaultNames(publicKey);\n }\n // ============ Helper functions ============ //\n createGitPacketLine(line) {\n const hexPrefix = (4 + line.length).toString(16);\n return Array(4 - hexPrefix.length + 1).join('0') + hexPrefix + line;\n }\n}\nexports.default = GitBackend;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst path_1 = __importDefault(require(\"path\"));\nconst GitPktLine_1 = __importDefault(require(\"./GitPktLine\"));\nconst GitRefManager_1 = __importDefault(require(\"./GitRefManager\"));\nasync function writeRefsAdResponse({ capabilities, refs, symrefs }) {\n const stream = [];\n // Compose capabilities string\n let syms = '';\n for (const [key, value] of Object.entries(symrefs)) {\n syms += `symref=${key}:${value} `;\n }\n let caps = `\\x00${[...capabilities].join(' ')} ${syms}agent=git/isomorphic-git@1.4.0`;\n // stream.write(GitPktLine.encode(`# service=${service}\\n`))\n // stream.write(GitPktLine.flush())\n // Note: In the edge case of a brand new repo, zero refs (and zero capabilities)\n // are returned.\n for (const [key, value] of Object.entries(refs)) {\n stream.push(GitPktLine_1.default.encode(`${value} ${key}${caps}\\n`));\n caps = '';\n }\n stream.push(GitPktLine_1.default.flush());\n return stream;\n}\nasync function uploadPack(fileSystem, dir, gitdir = path_1.default.join(dir, '.git'), advertiseRefs = false) {\n try {\n if (advertiseRefs) {\n // Send a refs advertisement\n const capabilities = ['side-band-64k'];\n let keys = await GitRefManager_1.default.listRefs(fileSystem, gitdir, 'refs');\n keys = keys.map((ref) => `refs/${ref}`);\n const refs = {};\n keys.unshift('HEAD'); // HEAD must be the first in the list\n for (const key of keys) {\n refs[key] = await GitRefManager_1.default.resolve(fileSystem, gitdir, key);\n }\n const symrefs = {};\n symrefs['HEAD'] = await GitRefManager_1.default.resolve(fileSystem, gitdir, 'HEAD', 2);\n return writeRefsAdResponse({\n capabilities,\n refs,\n symrefs,\n });\n }\n }\n catch (err) {\n err.caller = 'git.uploadPack';\n throw err;\n }\n}\nexports.default = uploadPack;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass GitPackedRefs {\n constructor(text) {\n this.refs = new Map();\n this.parsedConfig = [];\n if (text) {\n let key;\n this.parsedConfig = text\n .trim()\n .split('\\n')\n .map((line) => {\n if (/^\\s*#/.test(line)) {\n return { line: line, comment: true };\n }\n const i = line.indexOf(' ');\n if (line.startsWith('^')) {\n // This is a oid for the commit associated with the annotated tag immediately preceding this line.\n // Trim off the '^'\n const value = line.slice(1);\n // The tagname^{} syntax is based on the output of `git show-ref --tags -d`\n this.refs.set(key + '^{}', value);\n return { line: line, ref: key, peeled: value };\n }\n else {\n // This is an oid followed by the ref name\n const value = line.slice(0, i);\n key = line.slice(i + 1);\n this.refs.set(key, value);\n return { line: line, ref: key, oid: value };\n }\n });\n }\n return this;\n }\n static from(text) {\n return new GitPackedRefs(text);\n }\n}\nexports.default = GitPackedRefs;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\nIf 'side-band' or 'side-band-64k' capabilities have been specified by\nthe client, the server will send the packfile data multiplexed.\n\nEach packet starting with the packet-line length of the amount of data\nthat follows, followed by a single byte specifying the sideband the\nfollowing data is coming in on.\n\nIn 'side-band' mode, it will send up to 999 data bytes plus 1 control\ncode, for a total of up to 1000 bytes in a pkt-line. In 'side-band-64k'\nmode it will send up to 65519 data bytes plus 1 control code, for a\ntotal of up to 65520 bytes in a pkt-line.\n\nThe sideband byte will be a '1', '2' or a '3'. Sideband '1' will contain\npackfile data, sideband '2' will be used for progress information that the\nclient will generally print to stderr and sideband '3' is used for error\ninformation.\n\nIf no 'side-band' capability was specified, the server will stream the\nentire packfile without multiplexing.\n*/\nconst buffer_1 = require(\"buffer\");\nconst readable_stream_1 = require(\"readable-stream\");\nconst GitPktLine_1 = __importDefault(require(\"../upload-pack/GitPktLine\"));\nfunction splitBuffer(buffer, maxBytes) {\n const result = [];\n let index = 0;\n while (index < buffer.length) {\n const buf = buffer.slice(index, index + maxBytes);\n result.push(buf);\n index += buf.length;\n }\n result.push(buffer.slice(index));\n return result;\n}\nclass GitSideBand {\n static demux(input) {\n let read = GitPktLine_1.default.streamReader(input);\n // And now for the ridiculous side-band or side-band-64k protocol\n let packetlines = new readable_stream_1.PassThrough();\n let packfile = new readable_stream_1.PassThrough();\n let progress = new readable_stream_1.PassThrough();\n // TODO: Use a proper through stream?\n const nextBit = async function () {\n let line = await read();\n // Skip over flush packets\n if (line === null)\n return nextBit();\n // A made up convention to signal there's no more to read.\n if (line === true) {\n packetlines.end();\n progress.end();\n packfile.end();\n return;\n }\n // Examine first byte to determine which output \"stream\" to use\n switch (line[0]) {\n case 1: // pack data\n packfile.write(line.slice(1));\n break;\n case 2: // progress message\n progress.write(line.slice(1));\n break;\n case 3: // fatal error message just before stream aborts\n // eslint-disable-next-line\n const error = line.slice(1);\n progress.write(error);\n packfile.destroy(new Error(error.toString('utf8')));\n return;\n default:\n // Not part of the side-band-64k protocol\n packetlines.write(line.slice(0));\n }\n // Careful not to blow up the stack.\n // I think Promises in a tail-call position should be OK.\n nextBit();\n };\n nextBit();\n return {\n packetlines,\n packfile,\n progress,\n };\n }\n static mux(protocol, // 'side-band' or 'side-band-64k'\n packetlines, packfile, progress, error) {\n const MAX_PACKET_LENGTH = protocol === 'side-band-64k' ? 999 : 65519;\n let output = new readable_stream_1.PassThrough();\n packetlines.on('data', (data) => {\n if (data === null) {\n output.write(GitPktLine_1.default.flush());\n }\n else {\n output.write(GitPktLine_1.default.encode(data));\n }\n });\n let packfileWasEmpty = true;\n let packfileEnded = false;\n let progressEnded = false;\n let errorEnded = true;\n let goodbye = buffer_1.Buffer.concat([GitPktLine_1.default.encode(buffer_1.Buffer.from('010A', 'hex')), GitPktLine_1.default.flush()]);\n packfile\n .on('data', (data) => {\n packfileWasEmpty = false;\n const buffers = splitBuffer(data, MAX_PACKET_LENGTH);\n for (const buffer of buffers) {\n output.write(GitPktLine_1.default.encode(buffer_1.Buffer.concat([buffer_1.Buffer.from('01', 'hex'), buffer])));\n }\n })\n .on('end', () => {\n packfileEnded = true;\n if (!packfileWasEmpty)\n output.write(goodbye);\n if (progressEnded && errorEnded)\n output.end();\n });\n progress\n .on('data', (data) => {\n const buffers = splitBuffer(data, MAX_PACKET_LENGTH);\n for (const buffer of buffers) {\n output.write(GitPktLine_1.default.encode(buffer_1.Buffer.concat([buffer_1.Buffer.from('02', 'hex'), buffer])));\n }\n })\n .on('end', () => {\n progressEnded = true;\n if (packfileEnded && errorEnded)\n output.end();\n });\n // error\n // .on('data', data => {\n // const buffers = splitBuffer(data, MAX_PACKET_LENGTH)\n // for (const buffer of buffers) {\n // output.write(\n // GitPktLine.encode(Buffer.concat([Buffer.from('03', 'hex'), buffer]))\n // )\n // }\n // })\n // .on('end', () => {\n // errorEnded = true\n // if (progressEnded && packfileEnded) output.end()\n // })\n return output;\n }\n}\nexports.default = GitSideBand;\n","module.exports = require(\"buffer\");","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst pako_1 = __importDefault(require(\"pako\"));\nconst path_1 = __importDefault(require(\"path\"));\nconst log_1 = __importDefault(require(\"./log\"));\nconst GitTree_1 = __importDefault(require(\"./GitTree\"));\nconst sha_js_1 = __importDefault(require(\"sha.js\"));\nconst GitCommit_1 = __importDefault(require(\"./GitCommit\"));\nconst readable_stream_1 = require(\"readable-stream\");\nconst GitObjectManager_1 = __importDefault(require(\"./GitObjectManager\"));\nconst types = {\n commit: 0b0010000,\n tree: 0b0100000,\n blob: 0b0110000,\n tag: 0b1000000,\n ofs_delta: 0b1100000,\n ref_delta: 0b1110000,\n};\n/**\n * Create a packfile stream\n *\n * @link https://isomorphic-git.github.io/docs/packObjects.html\n */\nasync function packObjects(fileSystem, dir, refs, depth, haves) {\n const gitdir = path_1.default.join(dir, '.git');\n let oids = new Set();\n let shallows = new Set();\n let unshallows = new Set();\n let acks = [];\n haves = haves ? haves : [];\n const emitter = undefined;\n const since = undefined;\n for (const ref of refs) {\n try {\n let commits = await log_1.default(fileSystem, dir, gitdir, emitter, ref, depth, since);\n let oldshallows = [];\n for (let i = 0; i < commits.length; i++) {\n let commit = commits[i];\n if (haves.includes(commit.oid)) {\n acks.push({\n oid: ref,\n });\n break;\n }\n oids.add(commit.oid);\n if (i === commits.length - 1) {\n if (!oldshallows.includes(commit.oid) && (depth !== undefined || since !== undefined)) {\n console.log('make it shallow', commit.oid);\n shallows.add(commit.oid);\n }\n }\n else if (oldshallows.includes(commit.oid)) {\n console.log('make it unshallow', commit.oid);\n unshallows.add(commit.oid);\n }\n }\n }\n catch (err) {\n console.log(err);\n // oh well.\n }\n }\n let objects = await listObjects(fileSystem, dir, gitdir, Array.from(oids));\n let packstream = new readable_stream_1.PassThrough();\n pack(fileSystem, dir, undefined, [...objects], packstream);\n return { packstream, shallows, unshallows, acks };\n}\nasync function listObjects(fileSystem, dir, gitdir = path_1.default.join(dir, '.git'), oids) {\n let commits = new Set();\n let trees = new Set();\n let blobs = new Set();\n // We don't do the purest simplest recursion, because we can\n // avoid reading Blob objects entirely since the Tree objects\n // tell us which oids are Blobs and which are Trees. And we\n // do not need to recurse through commit parents.\n async function walk(oid) {\n let { type, object } = await GitObjectManager_1.default.read(fileSystem, gitdir, oid);\n if (type === 'commit') {\n commits.add(oid);\n let commit = GitCommit_1.default.from(object);\n let tree = commit.headers().tree;\n await walk(tree);\n }\n else if (type === 'tree') {\n trees.add(oid);\n let tree = GitTree_1.default.from(object);\n for (let entry of tree) {\n if (entry.type === 'blob') {\n blobs.add(entry.oid);\n }\n // only recurse for trees\n if (entry.type === 'tree') {\n await walk(entry.oid);\n }\n }\n }\n }\n // Let's go walking!\n for (let oid of oids) {\n await walk(oid);\n }\n return [...commits, ...trees, ...blobs];\n}\nexports.listObjects = listObjects;\nasync function pack(fileSystem, dir, gitdir = path_1.default.join(dir, '.git'), oids, outputStream) {\n let hash = sha_js_1.default('sha1');\n function write(chunk, enc = undefined) {\n if (enc) {\n outputStream.write(chunk, enc);\n }\n else {\n outputStream.write(chunk);\n }\n hash.update(chunk, enc);\n }\n function writeObject(object, stype) {\n let lastFour;\n let multibyte;\n let length;\n // Object type is encoded in bits 654\n let type = types[stype];\n if (type === undefined)\n throw Error('Unrecognized type: ' + stype);\n // The length encoding get complicated.\n length = object.length;\n // Whether the next byte is part of the variable-length encoded number\n // is encoded in bit 7\n multibyte = length > 0b1111 ? 0b10000000 : 0b0;\n // Last four bits of length is encoded in bits 3210\n lastFour = length & 0b1111;\n // Discard those bits\n length = length >>> 4;\n // The first byte is then (1-bit multibyte?), (3-bit type), (4-bit least sig 4-bits of length)\n let byte = (multibyte | type | lastFour).toString(16);\n write(byte, 'hex');\n // Now we keep chopping away at length 7-bits at a time until its zero,\n // writing out the bytes in what amounts to little-endian order.\n while (multibyte) {\n multibyte = length > 0b01111111 ? 0b10000000 : 0b0;\n byte = multibyte | (length & 0b01111111);\n const unpaddedChunk = byte.toString(16);\n const paddedChunk = '0'.repeat(2 - unpaddedChunk.length) + unpaddedChunk;\n write(paddedChunk, 'hex');\n length = length >>> 7;\n }\n // Lastly, we can compress and write the object.\n write(Buffer.from(pako_1.default.deflate(object)));\n }\n write('PACK');\n write('00000002', 'hex');\n // Write a 4 byte (32-bit) int\n const unpaddedChunk = oids.length.toString(16);\n const paddedChunk = '0'.repeat(8 - unpaddedChunk.length) + unpaddedChunk;\n write(paddedChunk, 'hex');\n for (let oid of oids) {\n let { type, object } = await GitObjectManager_1.default.read(fileSystem, gitdir, oid);\n writeObject(object, type);\n }\n // Write SHA1 checksum\n let digest = hash.digest();\n outputStream.end(digest);\n return outputStream;\n}\nexports.pack = pack;\nexports.default = packObjects;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst path = require(\"path\");\nconst GitCommit_1 = __importDefault(require(\"./GitCommit\"));\nconst GitObjectManager_1 = __importDefault(require(\"./GitObjectManager\"));\nconst GitRefManager_1 = __importDefault(require(\"../upload-pack/GitRefManager\"));\nasync function logCommit(fileSystem, gitdir, oid, signing) {\n try {\n let { type, object } = await GitObjectManager_1.default.read(fileSystem, gitdir, oid);\n if (type !== 'commit') {\n throw new Error('expected type to be commit');\n }\n const commit = GitCommit_1.default.from(object);\n const result = Object.assign({ oid }, commit.parse());\n if (signing) {\n result.payload = commit.withoutSignature();\n }\n return result;\n }\n catch (err) {\n return {\n oid,\n error: err,\n };\n }\n}\nexports.logCommit = logCommit;\nfunction compareAge(a, b) {\n return a.committer.timestamp - b.committer.timestamp;\n}\n/**\n * Get commit descriptions from the git history\n *\n * @link https://isomorphic-git.github.io/docs/log.html\n */\nasync function log(fileSystem, dir, gitdir = path.join(dir, '.git'), ref = 'HEAD', depth, since, // Date\nsigning = false) {\n try {\n let sinceTimestamp = since === undefined ? undefined : Math.floor(since.valueOf() / 1000);\n // TODO: In the future, we may want to have an API where we return a\n // async iterator that emits commits.\n let commits = [];\n let oid = await GitRefManager_1.default.resolve(fileSystem, gitdir, ref);\n let tips = [await logCommit(fileSystem, gitdir, oid, signing)];\n // eslint-disable-next-line\n while (true) {\n let commit = tips.pop();\n // Stop the loop if we encounter an error\n if (commit.error) {\n commits.push(commit);\n break;\n }\n // Stop the log if we've hit the age limit\n if (sinceTimestamp !== undefined && commit.committer.timestamp <= sinceTimestamp) {\n break;\n }\n commits.push(commit);\n // Stop the loop if we have enough commits now.\n if (depth !== undefined && commits.length === depth)\n break;\n // Add the parents of this commit to the queue\n // Note: for the case of a commit with no parents, it will concat an empty array, having no net effect.\n for (const oid of commit.parent) {\n let commit = await logCommit(fileSystem, gitdir, oid, signing);\n if (!tips.map((commit) => commit.oid).includes(commit.oid)) {\n tips.push(commit);\n }\n }\n // Stop the loop if there are no more commit parents\n if (tips.length === 0)\n break;\n // Process tips in order by age\n tips.sort(compareAge);\n }\n return commits;\n }\n catch (err) {\n err.caller = 'git.log';\n throw err;\n }\n}\nexports.default = log;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst shasum_1 = __importDefault(require(\"./shasum\"));\nclass GitObject {\n static hash({ type, object }) {\n let buffer = Buffer.concat([Buffer.from(`${type} ${object.byteLength.toString()}\\0`), Buffer.from(object)]);\n let oid = shasum_1.default(buffer);\n return oid;\n }\n static wrap({ type, object }) {\n let buffer = Buffer.concat([Buffer.from(`${type} ${object.byteLength.toString()}\\0`), object]);\n let oid = shasum_1.default(buffer);\n return {\n oid,\n buffer,\n };\n }\n static unwrap({ oid, buffer }) {\n if (oid) {\n let sha = shasum_1.default(buffer);\n if (sha !== oid) {\n throw new Error(`SHA check failed! Expected ${oid}, computed ${sha}`);\n }\n }\n let s = buffer.indexOf(32); // first space\n let i = buffer.indexOf(0); // first null value\n let type = buffer.slice(0, s).toString('utf8'); // get type of object\n let length = buffer.slice(s + 1, i).toString('utf8'); // get type of object\n let actualLength = buffer.length - (i + 1);\n // verify length\n if (parseInt(length) !== actualLength) {\n throw new Error(`Length mismatch: expected ${length} bytes but got ${actualLength} instead.`);\n }\n return {\n type,\n object: Buffer.from(buffer.slice(i + 1)),\n };\n }\n}\nexports.default = GitObject;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst sha1_1 = __importDefault(require(\"sha.js/sha1\"));\n// This is modeled after @dominictarr's \"shasum\" module,\n// but without the 'json-stable-stringify' dependency and\n// extra type-casting features.\nfunction shasum(buffer) {\n return new sha1_1.default().update(buffer).digest('hex');\n}\nexports.default = shasum;\n","module.exports = require(\"sha.js/sha1\");","\"use strict\";\n/*::\ntype TreeEntry = {\n mode: string,\n path: string,\n oid: string,\n type?: string\n}\n*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction parseBuffer(buffer) {\n let _entries = [];\n let cursor = 0;\n while (cursor < buffer.length) {\n let space = buffer.indexOf(32, cursor);\n if (space === -1) {\n throw new Error(`GitTree: Error parsing buffer at byte location ${cursor}: Could not find the next space character.`);\n }\n let nullchar = buffer.indexOf(0, cursor);\n if (nullchar === -1) {\n throw new Error(`GitTree: Error parsing buffer at byte location ${cursor}: Could not find the next null character.`);\n }\n let mode = buffer.slice(cursor, space).toString('utf8');\n if (mode === '40000')\n mode = '040000'; // makes it line up neater in printed output\n let type = mode === '040000' ? 'tree' : 'blob';\n let path = buffer.slice(space + 1, nullchar).toString('utf8');\n let oid = buffer.slice(nullchar + 1, nullchar + 21).toString('hex');\n cursor = nullchar + 21;\n _entries.push({ mode, path, oid, type });\n }\n return _entries;\n}\nfunction limitModeToAllowed(mode) {\n if (typeof mode === 'number') {\n mode = mode.toString(8);\n }\n // tree\n if (mode.match(/^0?4.*/))\n return '40000'; // Directory\n if (mode.match(/^1006.*/))\n return '100644'; // Regular non-executable file\n if (mode.match(/^1007.*/))\n return '100755'; // Regular executable file\n if (mode.match(/^120.*/))\n return '120000'; // Symbolic link\n if (mode.match(/^160.*/))\n return '160000'; // Commit (git submodule reference)\n throw new Error(`Could not understand file mode: ${mode}`);\n}\nfunction nudgeIntoShape(entry) {\n if (!entry.oid && entry.sha) {\n entry.oid = entry.sha; // Github\n }\n entry.mode = limitModeToAllowed(entry.mode); // index\n if (!entry.type) {\n entry.type = 'blob'; // index\n }\n return entry;\n}\nclass GitTree {\n constructor(entries) {\n if (Buffer.isBuffer(entries)) {\n this._entries = parseBuffer(entries);\n }\n else if (Array.isArray(entries)) {\n this._entries = entries.map(nudgeIntoShape);\n }\n else {\n throw new Error('invalid type passed to GitTree constructor');\n }\n }\n static from(tree) {\n return new GitTree(tree);\n }\n render() {\n return this._entries.map((entry) => `${entry.mode} ${entry.type} ${entry.oid} ${entry.path}`).join('\\n');\n }\n toObject() {\n return Buffer.concat(this._entries.map((entry) => {\n let mode = Buffer.from(entry.mode.replace(/^0/, ''));\n let space = Buffer.from(' ');\n let path = Buffer.from(entry.path);\n // let path = Buffer.from(entry.path, { encoding: 'utf8' })\n let nullchar = Buffer.from([0]);\n let oid = Buffer.from(entry.oid.match(/../g).map((n) => parseInt(n, 16)));\n return Buffer.concat([mode, space, path, nullchar, oid]);\n }));\n }\n entries() {\n return this._entries;\n }\n *[Symbol.iterator]() {\n for (let entry of this._entries) {\n yield entry;\n }\n }\n}\nexports.default = GitTree;\n","module.exports = require(\"sha.js\");","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst GitRequest_1 = __importDefault(require(\"./GitRequest\"));\nconst Git_1 = require(\"../../proto/js/Git\");\nconst Peer_pb_1 = require(\"../../proto/compiled/Peer_pb\");\n/**\n * Responsible for converting HTTP messages from isomorphic-git into requests and sending them to a specific peer.\n */\nclass GitFrontend {\n constructor(peerManager) {\n this.peerManager = peerManager;\n }\n /**\n * Requests remote info from the connected peer for the named vault.\n * @param vaultName Name of the desired vault\n * @param peerConnection A connection object to the peer\n */\n async requestInfo(vaultName, peerConnection) {\n const request = Git_1.gitInterface.InfoRequest.encodeDelimited({ vaultName }).finish();\n const response = await peerConnection.sendPeerRequest(Peer_pb_1.SubServiceType.GIT, Git_1.gitInterface.GitMessage.encodeDelimited({ type: Git_1.gitInterface.GitMessageType.INFO, subMessage: request }).finish());\n const { type, subMessage } = Git_1.gitInterface.GitMessage.decodeDelimited(response);\n const { body: responseBody } = Git_1.gitInterface.InfoReply.decodeDelimited(subMessage);\n return responseBody;\n }\n /**\n * Requests a pack from the connected peer for the named vault.\n * @param vaultName Name of the desired vault\n * @param body Contains the pack request\n * @param peerConnection A connection object to the peer\n */\n async requestPack(vaultName, body, peerConnection) {\n const request = Git_1.gitInterface.PackRequest.encodeDelimited({ vaultName, body }).finish();\n const response = await peerConnection.sendPeerRequest(Peer_pb_1.SubServiceType.GIT, Git_1.gitInterface.GitMessage.encodeDelimited({ type: Git_1.gitInterface.GitMessageType.PACK, subMessage: request }).finish());\n const { type, subMessage } = Git_1.gitInterface.GitMessage.decodeDelimited(response);\n const { body: responseBody } = Git_1.gitInterface.PackReply.decodeDelimited(subMessage);\n return responseBody;\n }\n /**\n * Requests a pack from the connected peer for the named vault.\n * @param vaultName Name of the desired vault\n * @param body Contains the pack request\n * @param peerConnection A connection object to the peer\n */\n async requestVaultNames(peerConnection) {\n const response = await peerConnection.sendPeerRequest(Peer_pb_1.SubServiceType.GIT, Git_1.gitInterface.GitMessage.encodeDelimited({\n type: Git_1.gitInterface.GitMessageType.VAULT_NAMES,\n subMessage: Buffer.from(''),\n }).finish());\n const { type, subMessage } = Git_1.gitInterface.GitMessage.decodeDelimited(response);\n const { vaultNameList } = Git_1.gitInterface.VaultNamesReply.decodeDelimited(subMessage);\n return vaultNameList;\n }\n connectToPeerGit(publicKey) {\n const peerConnection = this.peerManager.connectToPeer(publicKey);\n const gitRequest = new GitRequest_1.default(((vaultName) => this.requestInfo(vaultName, peerConnection)).bind(this), ((vaultName, body) => this.requestPack(vaultName, body, peerConnection)).bind(this), (() => this.requestVaultNames(peerConnection)).bind(this));\n return gitRequest;\n }\n}\nexports.default = GitFrontend;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Responsible for converting HTTP messages from isomorphic-git into requests and sending them to a specific peer.\n */\nclass GitRequest {\n constructor(requestInfo, requestPack, requestVaultNames) {\n this.requestInfo = requestInfo;\n this.requestPack = requestPack;\n this.requestVaultNames = requestVaultNames;\n }\n /**\n * The custom http request method to feed into isomorphic-git's [custom http object](https://isomorphic-git.org/docs/en/http)\n */\n async request({ url, method, headers, body, onProgress }) {\n // eslint-disable-next-line\n return new Promise(async (resolve, reject) => {\n const u = new URL(url);\n // Parse request\n if (method == 'GET') {\n // Info request\n const match = u.pathname.match(/\\/(.+)\\/info\\/refs$/);\n if (!match || /\\.\\./.test(match[1])) {\n reject(new Error('Error'));\n }\n const vaultName = match[1];\n const infoResponse = await this.requestInfo(vaultName);\n resolve({\n url: url,\n method: method,\n statusCode: 200,\n statusMessage: 'OK',\n body: this.iteratorFromData(infoResponse),\n headers: headers,\n });\n }\n else if (method == 'POST') {\n // Info request\n const match = u.pathname.match(/\\/(.+)\\/git-(.+)/);\n if (!match || /\\.\\./.test(match[1])) {\n reject(new Error('Error'));\n }\n const vaultName = match[1];\n const packResponse = await this.requestPack(vaultName, body[0]);\n resolve({\n url: url,\n method: method,\n statusCode: 200,\n statusMessage: 'OK',\n body: this.iteratorFromData(packResponse),\n headers: headers,\n });\n }\n else {\n reject(new Error('Method not supported'));\n }\n });\n }\n async scanVaults() {\n return await this.requestVaultNames();\n }\n // ==== HELPER METHODS ==== //\n /**\n * Converts a buffer into an iterator expected by isomorphic git.\n * @param data Data to be turned into an iterator\n */\n iteratorFromData(data) {\n let ended = false;\n return {\n next() {\n return new Promise((resolve, reject) => {\n if (ended) {\n return resolve({ done: true });\n }\n else {\n ended = true;\n resolve({ value: data, done: false });\n }\n });\n },\n };\n }\n}\nexports.default = GitRequest;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst os_1 = __importDefault(require(\"os\"));\nconst fs_1 = __importDefault(require(\"fs\"));\nconst net_1 = __importDefault(require(\"net\"));\nconst path_1 = __importDefault(require(\"path\"));\nconst process_1 = __importDefault(require(\"process\"));\nconst configstore_1 = __importDefault(require(\"configstore\"));\nconst PeerInfo_1 = __importDefault(require(\"../peers/PeerInfo\"));\nconst PolykeyClient_1 = __importDefault(require(\"./PolykeyClient\"));\nconst Polykey_1 = __importStar(require(\"../Polykey\"));\nconst child_process_1 = require(\"child_process\");\nconst Agent_1 = require(\"../../proto/js/Agent\");\nclass PolykeyAgent {\n constructor() {\n // For storing the state of each polykey node\n // Keys are the paths to the polykey node, e.g. '~/.polykey'\n this.polykeyMap = new Map();\n this.pid = process_1.default.pid;\n this.socketPath = PolykeyAgent.SocketPath;\n this.persistentStore = new configstore_1.default('polykey', undefined, {\n configPath: path_1.default.join(path_1.default.dirname(this.socketPath), '.node_path_list.json'),\n });\n // Make sure the socket file doesn't already exist (agent is already running)\n if (fs_1.default.existsSync(this.socketPath)) {\n fs_1.default.unlinkSync(this.socketPath);\n }\n // Make the socket path if it doesn't exist\n if (!fs_1.default.existsSync(path_1.default.dirname(this.socketPath))) {\n fs_1.default.promises.mkdir(path_1.default.dirname(this.socketPath));\n }\n // Load polykeys\n const nodePaths = this.persistentStore.get('nodePaths');\n if (nodePaths === null || nodePaths === void 0 ? void 0 : nodePaths.values) {\n for (const path of nodePaths) {\n if (fs_1.default.existsSync(path)) {\n this.setPolyKey(path, new Polykey_1.default(path, fs_1.default));\n }\n else {\n this.removeNodePath(path);\n }\n }\n }\n else {\n this.persistentStore.set('nodePaths', []);\n }\n // Start the server\n this.server = net_1.default.createServer().listen(this.socketPath);\n this.server.on('connection', (socket) => {\n this.handleClientCommunication(socket);\n });\n }\n setPolyKey(nodePath, pk) {\n this.polykeyMap.set(nodePath, pk);\n const nodePathSet = new Set(this.persistentStore.get('nodePaths'));\n nodePathSet.add(nodePath);\n this.persistentStore.set('nodePaths', Array.from(nodePathSet.values()));\n }\n removeNodePath(nodePath) {\n this.polykeyMap.delete(nodePath);\n const nodePathSet = new Set(this.persistentStore.get('nodePaths'));\n nodePathSet.delete(nodePath);\n this.persistentStore.set('nodePaths', Array.from(nodePathSet.values()));\n }\n getPolyKey(nodePath, failOnLocked = true) {\n const pk = this.polykeyMap.get(nodePath);\n if (this.polykeyMap.has(nodePath) && pk) {\n if (fs_1.default.existsSync(nodePath)) {\n if (failOnLocked && !pk.keyManager.identityLoaded) {\n throw Error(`node path exists in memory but is locked: ${nodePath}`);\n }\n else {\n return pk;\n }\n }\n else {\n this.removeNodePath(nodePath);\n throw Error(`node path exists in memory but does not exist on file system: ${nodePath}`);\n }\n }\n else {\n this.removeNodePath(nodePath);\n throw Error(`node path does not exist in memory: ${nodePath}`);\n }\n }\n get AllNodePaths() {\n return Array.from(this.polykeyMap.keys()).filter((nodePath) => {\n try {\n this.getPolyKey(nodePath, false);\n return true;\n }\n catch (_a) {\n return false;\n }\n });\n }\n get UnlockedNodePaths() {\n return this.AllNodePaths.filter((nodePath) => {\n try {\n return this.getPolyKey(nodePath, false).keyManager.identityLoaded;\n }\n catch (_a) {\n return false;\n }\n });\n }\n stop() {\n this.server.close();\n for (const nodePath of this.polykeyMap.keys()) {\n const pk = this.getPolyKey(nodePath);\n pk.peerManager.multicastBroadcaster.stopBroadcasting();\n }\n // finally kill the pid of the agent process\n if (process_1.default.env.NODE_ENV !== 'test') {\n process_1.default.kill(this.pid);\n }\n }\n handleClientCommunication(socket) {\n socket.on('data', async (encodedMessage) => {\n var _a;\n try {\n const { type, nodePath, subMessage } = Agent_1.agentInterface.AgentMessage.decodeDelimited(encodedMessage);\n let response = undefined;\n switch (type) {\n case Agent_1.agentInterface.AgentMessageType.STATUS:\n response = Agent_1.agentInterface.AgentStatusResponseMessage.encodeDelimited({\n status: Agent_1.agentInterface.AgentStatusType.ONLINE,\n }).finish();\n break;\n case Agent_1.agentInterface.AgentMessageType.STOP_AGENT:\n this.stop();\n break;\n case Agent_1.agentInterface.AgentMessageType.REGISTER_NODE:\n response = await this.registerNode(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.NEW_NODE:\n response = await this.newNode(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.LIST_NODES:\n response = this.listNodes(subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.DERIVE_KEY:\n response = await this.deriveKey(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.LIST_KEYS:\n response = await this.listKeys(nodePath);\n break;\n case Agent_1.agentInterface.AgentMessageType.GET_KEY:\n response = await this.getKey(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.GET_PRIMARY_KEYPAIR:\n response = await this.getPrimaryKeyPair(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.DELETE_KEY:\n response = await this.deleteKey(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.SIGN_FILE:\n response = await this.signFile(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.VERIFY_FILE:\n response = await this.verifyFile(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.ENCRYPT_FILE:\n response = await this.encryptFile(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.DECRYPT_FILE:\n response = await this.decryptFile(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.LIST_VAULTS:\n response = await this.listVaults(nodePath);\n break;\n case Agent_1.agentInterface.AgentMessageType.SCAN_VAULT_NAMES:\n response = await this.scanVaultNames(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.NEW_VAULT:\n response = await this.newVault(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.PULL_VAULT:\n response = await this.pullVault(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.DESTROY_VAULT:\n response = await this.destroyVault(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.LIST_SECRETS:\n response = await this.listSecrets(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.CREATE_SECRET:\n response = await this.createSecret(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.DESTROY_SECRET:\n response = await this.destroySecret(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.GET_SECRET:\n response = await this.getSecret(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.UPDATE_SECRET:\n response = await this.updateSecret(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.ADD_PEER:\n response = await this.addPeer(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.GET_PEER_INFO:\n response = await this.getPeerInfo(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.PING_PEER:\n response = await this.pingPeer(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.FIND_PEER:\n response = await this.findPeer(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.FIND_SOCIAL_PEER:\n response = await this.findSocialPeer(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.LIST_PEERS:\n response = await this.listPeers(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.TOGGLE_STEALTH:\n response = await this.toggleStealth(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.UPDATE_PEER_INFO:\n response = await this.updatePeerInfo(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.REQUEST_RELAY:\n response = await this.requestRelay(nodePath, subMessage);\n break;\n case Agent_1.agentInterface.AgentMessageType.REQUEST_PUNCH:\n response = await this.requestPunch(nodePath, subMessage);\n break;\n default:\n throw Error(`message type not supported: ${Agent_1.agentInterface.AgentMessageType[type]}`);\n }\n if (response) {\n const encodedResponse = Agent_1.agentInterface.AgentMessage.encodeDelimited({\n type: type,\n isResponse: true,\n nodePath: nodePath,\n subMessage: response,\n }).finish();\n socket.write(encodedResponse);\n }\n else {\n throw Error('something went wrong');\n }\n }\n catch (err) {\n const errorResponse = Agent_1.agentInterface.AgentMessage.encodeDelimited({\n type: Agent_1.agentInterface.AgentMessageType.ERROR,\n isResponse: true,\n nodePath: undefined,\n subMessage: Agent_1.agentInterface.ErrorMessage.encodeDelimited({ error: (_a = err.message) !== null && _a !== void 0 ? _a : err }).finish(),\n }).finish();\n socket.write(errorResponse);\n }\n // Close connection\n socket.end();\n });\n }\n // Register an existing polykey agent\n async registerNode(nodePath, request) {\n const { passphrase } = Agent_1.agentInterface.RegisterNodeRequestMessage.decodeDelimited(request);\n let pk;\n if (this.polykeyMap.has(nodePath)) {\n pk = this.getPolyKey(nodePath, false);\n if (pk.keyManager.identityLoaded) {\n throw Error(`node path is already loaded and unlocked: '${nodePath}'`);\n }\n await pk.keyManager.unlockIdentity(passphrase);\n }\n else {\n const km = new Polykey_1.KeyManager(nodePath, fs_1.default);\n await km.unlockIdentity(passphrase);\n // Create polykey class\n pk = new Polykey_1.default(nodePath, fs_1.default, km);\n }\n // Load all metadata\n await pk.keyManager.loadMetadata();\n await pk.vaultManager.loadMetadata();\n // Set polykey class\n this.setPolyKey(nodePath, pk);\n // Encode and send response\n const response = Agent_1.agentInterface.NewNodeResponseMessage.encodeDelimited({\n successful: pk.keyManager.identityLoaded && this.polykeyMap.has(nodePath),\n }).finish();\n return response;\n }\n // Create a new polykey agent\n async newNode(nodePath, request) {\n // Throw if path already exists\n if (this.polykeyMap.has(nodePath) && fs_1.default.existsSync(nodePath)) {\n throw Error(`node path '${nodePath}' is already loaded`);\n }\n else if (fs_1.default.existsSync(nodePath)) {\n throw Error(`node path already exists: '${nodePath}'`);\n }\n const { userId, passphrase, nbits } = Agent_1.agentInterface.NewNodeRequestMessage.decodeDelimited(request);\n const km = new Polykey_1.KeyManager(nodePath, fs_1.default);\n await km.generateKeyPair(userId, passphrase, nbits == 0 ? undefined : nbits, true, (info) => {\n // socket.write(JSON.stringify(info))\n });\n // Create and set polykey class\n const pk = new Polykey_1.default(nodePath, fs_1.default, km);\n this.setPolyKey(nodePath, pk);\n // Encode and send response\n const response = Agent_1.agentInterface.NewNodeResponseMessage.encodeDelimited({\n successful: km.identityLoaded && this.polykeyMap.has(nodePath),\n }).finish();\n return response;\n }\n // Create a new polykey agent\n listNodes(request) {\n const { unlockedOnly } = Agent_1.agentInterface.ListNodesRequestMessage.decodeDelimited(request);\n if (unlockedOnly) {\n return Agent_1.agentInterface.ListNodesResponseMessage.encodeDelimited({ nodes: this.UnlockedNodePaths }).finish();\n }\n else {\n return Agent_1.agentInterface.ListNodesResponseMessage.encodeDelimited({ nodes: this.AllNodePaths }).finish();\n }\n }\n /////////////////////////\n // KeyManager commands //\n /////////////////////////\n async deriveKey(nodePath, request) {\n const { keyName, passphrase } = Agent_1.agentInterface.DeriveKeyRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n await pk.keyManager.generateKey(keyName, passphrase);\n return Agent_1.agentInterface.DeriveKeyResponseMessage.encodeDelimited({ successful: true }).finish();\n }\n async listKeys(nodePath) {\n const pk = this.getPolyKey(nodePath);\n const keyNames = pk.keyManager.listKeys();\n return Agent_1.agentInterface.ListKeysResponseMessage.encodeDelimited({ keyNames }).finish();\n }\n async getKey(nodePath, request) {\n const { keyName } = Agent_1.agentInterface.GetKeyRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n const keyContent = pk.keyManager.getKey(keyName).toString();\n return Agent_1.agentInterface.GetKeyResponseMessage.encodeDelimited({ keyContent }).finish();\n }\n async getPrimaryKeyPair(nodePath, request) {\n const { includePrivateKey } = Agent_1.agentInterface.GetPrimaryKeyPairRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n const keypair = pk.keyManager.getKeyPair();\n return Agent_1.agentInterface.GetPrimaryKeyPairResponseMessage.encodeDelimited({\n publicKey: keypair.public,\n privateKey: includePrivateKey ? keypair.private : undefined,\n }).finish();\n }\n async deleteKey(nodePath, request) {\n const { keyName } = Agent_1.agentInterface.DeleteKeyRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n const successful = await pk.keyManager.deleteKey(keyName);\n return Agent_1.agentInterface.DeleteKeyResponseMessage.encodeDelimited({ successful }).finish();\n }\n /////////////////////\n // Crypto commands //\n /////////////////////\n async signFile(nodePath, request) {\n const { filePath, privateKeyPath, passphrase } = Agent_1.agentInterface.SignFileRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n const signaturePath = await pk.keyManager.signFile(filePath, privateKeyPath, passphrase);\n return Agent_1.agentInterface.SignFileResponseMessage.encodeDelimited({ signaturePath }).finish();\n }\n async verifyFile(nodePath, request) {\n const { filePath, publicKeyPath } = Agent_1.agentInterface.VerifyFileRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n const verified = await pk.keyManager.verifyFile(filePath, publicKeyPath);\n return Agent_1.agentInterface.VerifyFileResponseMessage.encodeDelimited({ verified }).finish();\n }\n async encryptFile(nodePath, request) {\n const { filePath, publicKeyPath } = Agent_1.agentInterface.EncryptFileRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n const encryptedPath = await pk.keyManager.encryptFile(filePath, publicKeyPath);\n return Agent_1.agentInterface.EncryptFileResponseMessage.encodeDelimited({ encryptedPath }).finish();\n }\n async decryptFile(nodePath, request) {\n const { filePath, privateKeyPath, passphrase } = Agent_1.agentInterface.DecryptFileRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n const decryptedPath = await pk.keyManager.decryptFile(filePath, privateKeyPath, passphrase);\n return Agent_1.agentInterface.DecryptFileResponseMessage.encodeDelimited({ decryptedPath }).finish();\n }\n //////////////////////\n // Vault Operations //\n //////////////////////\n async listVaults(nodePath) {\n const pk = this.getPolyKey(nodePath);\n const vaultNames = pk.vaultManager.listVaults();\n return Agent_1.agentInterface.ListVaultsResponseMessage.encodeDelimited({ vaultNames }).finish();\n }\n async scanVaultNames(nodePath, request) {\n const { publicKey } = Agent_1.agentInterface.ScanVaultNamesRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n const vaultNames = await pk.vaultManager.scanVaultNames(publicKey);\n return Agent_1.agentInterface.ScanVaultNamesResponseMessage.encodeDelimited({ vaultNames }).finish();\n }\n async newVault(nodePath, request) {\n const { vaultName } = Agent_1.agentInterface.NewVaultRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n await pk.vaultManager.createVault(vaultName);\n return Agent_1.agentInterface.NewVaultResponseMessage.encodeDelimited({ successful: true }).finish();\n }\n async pullVault(nodePath, request) {\n const { vaultName, publicKey } = Agent_1.agentInterface.PullVaultRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n // pull if vault exists locally, otherwise clone\n if (pk.vaultManager.vaultExists(vaultName)) {\n const vault = pk.vaultManager.getVault(vaultName);\n vault.pullVault(publicKey);\n }\n else {\n pk.vaultManager.cloneVault(vaultName, publicKey);\n }\n return Agent_1.agentInterface.PullVaultResponseMessage.encodeDelimited({ successful: true }).finish();\n }\n async destroyVault(nodePath, request) {\n const { vaultName } = Agent_1.agentInterface.DestroyVaultRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n pk.vaultManager.destroyVault(vaultName);\n return Agent_1.agentInterface.DestroyVaultResponseMessage.encodeDelimited({ successful: true }).finish();\n }\n ///////////////////////\n // Secret Operations //\n ///////////////////////\n async listSecrets(nodePath, request) {\n const { vaultName } = Agent_1.agentInterface.ListSecretsRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n const vault = pk.vaultManager.getVault(vaultName);\n const secretNames = vault.listSecrets();\n return Agent_1.agentInterface.ListSecretsResponseMessage.encodeDelimited({ secretNames }).finish();\n }\n async createSecret(nodePath, request) {\n const { vaultName, secretName, secretPath, secretContent, } = Agent_1.agentInterface.CreateSecretRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n const vault = pk.vaultManager.getVault(vaultName);\n let secretBuffer;\n if (secretPath) {\n secretBuffer = await fs_1.default.promises.readFile(secretPath);\n }\n else {\n secretBuffer = Buffer.from(secretContent);\n }\n await vault.addSecret(secretName, secretBuffer);\n return Agent_1.agentInterface.CreateSecretResponseMessage.encodeDelimited({ successful: true }).finish();\n }\n async destroySecret(nodePath, request) {\n const { vaultName, secretName } = Agent_1.agentInterface.DestroySecretRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n const vault = pk.vaultManager.getVault(vaultName);\n await vault.removeSecret(secretName);\n return Agent_1.agentInterface.DestroySecretResponseMessage.encodeDelimited({ successful: true }).finish();\n }\n async getSecret(nodePath, request) {\n const { vaultName, secretName } = Agent_1.agentInterface.GetSecretRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n const vault = pk.vaultManager.getVault(vaultName);\n const secret = Buffer.from(vault.getSecret(secretName));\n return Agent_1.agentInterface.GetSecretResponseMessage.encodeDelimited({ secret: secret }).finish();\n }\n async updateSecret(nodePath, request) {\n const { vaultName, secretName, secretPath, secretContent, } = Agent_1.agentInterface.UpdateSecretRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n const vault = pk.vaultManager.getVault(vaultName);\n let secretBuffer;\n if (secretPath) {\n secretBuffer = await fs_1.default.promises.readFile(secretPath);\n }\n else {\n secretBuffer = Buffer.from(secretContent);\n }\n await vault.updateSecret(secretName, secretBuffer);\n return Agent_1.agentInterface.UpdateSecretResponseMessage.encodeDelimited({ successful: true }).finish();\n }\n /////////////////////\n // Peer Operations //\n /////////////////////\n async addPeer(nodePath, request) {\n const { publicKey, peerAddress, relayPublicKey } = Agent_1.agentInterface.AddPeerRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n pk.peerManager.addPeer(new PeerInfo_1.default(publicKey, peerAddress, relayPublicKey));\n return Agent_1.agentInterface.AddPeerResponseMessage.encodeDelimited({ successful: true }).finish();\n }\n async getPeerInfo(nodePath, request) {\n var _a;\n const { current, publicKey } = Agent_1.agentInterface.PeerInfoRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n let peerInfo;\n if (current) {\n peerInfo = pk.peerManager.peerInfo;\n }\n else {\n if (!pk.peerManager.hasPeer(publicKey)) {\n throw Error('public key does not exist in peer store');\n }\n peerInfo = pk.peerManager.getPeer(publicKey);\n }\n return Agent_1.agentInterface.PeerInfoResponseMessage.encodeDelimited({\n publicKey: peerInfo.publicKey,\n peerAddress: (_a = peerInfo.peerAddress) === null || _a === void 0 ? void 0 : _a.toString(),\n relayPublicKey: peerInfo.relayPublicKey,\n }).finish();\n }\n async pingPeer(nodePath, request) {\n const { publicKey, timeout } = Agent_1.agentInterface.PingPeerRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n const successful = await pk.peerManager.pingPeer(publicKey, timeout);\n return Agent_1.agentInterface.PingPeerResponseMessage.encodeDelimited({ successful }).finish();\n }\n async findPeer(nodePath, request) {\n const { publicKey, timeout } = Agent_1.agentInterface.FindPeerRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n const successful = await pk.peerManager.findPublicKey(publicKey, timeout);\n return Agent_1.agentInterface.FindPeerResponseMessage.encodeDelimited({ successful }).finish();\n }\n async findSocialPeer(nodePath, request) {\n const { handle, service, timeout } = Agent_1.agentInterface.FindSocialPeerRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n const successful = await pk.peerManager.findSocialUser(handle, service, timeout);\n return Agent_1.agentInterface.FindSocialPeerResponseMessage.encodeDelimited({ successful }).finish();\n }\n async listPeers(nodePath, request) {\n const pk = this.getPolyKey(nodePath);\n const publicKeys = pk.peerManager.listPeers();\n return Agent_1.agentInterface.ListPeersResponseMessage.encodeDelimited({ publicKeys }).finish();\n }\n async toggleStealth(nodePath, request) {\n const { active } = Agent_1.agentInterface.ToggleStealthRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n pk.peerManager.toggleStealthMode(active);\n return Agent_1.agentInterface.ToggleStealthResponseMessage.encodeDelimited({ successful: true }).finish();\n }\n async updatePeerInfo(nodePath, request) {\n var _a, _b;\n const { publicKey, currentNode, peerHost, peerPort, relayPublicKey, } = Agent_1.agentInterface.UpdatePeerInfoRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n let currentPeerInfo;\n if (currentNode) {\n currentPeerInfo = pk.peerManager.peerInfo;\n }\n else {\n if (!pk.peerManager.hasPeer(publicKey)) {\n throw Error('peer does not exist in store');\n }\n currentPeerInfo = pk.peerManager.getPeer(publicKey);\n }\n (_a = currentPeerInfo.peerAddress) === null || _a === void 0 ? void 0 : _a.updateHost(peerHost);\n (_b = currentPeerInfo.peerAddress) === null || _b === void 0 ? void 0 : _b.updatePort(peerPort);\n currentPeerInfo.relayPublicKey = relayPublicKey;\n if (!currentNode) {\n pk.peerManager.updatePeer(currentPeerInfo);\n }\n return Agent_1.agentInterface.UpdatePeerInfoResponseMessage.encodeDelimited({ successful: true }).finish();\n }\n async requestRelay(nodePath, request) {\n const { publicKey } = Agent_1.agentInterface.RequestRelayRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n await pk.peerManager.turnClient.requestRelayConnection(publicKey);\n return Agent_1.agentInterface.RequestRelayResponseMessage.encodeDelimited({ successful: true }).finish();\n }\n async requestPunch(nodePath, request) {\n const { publicKey } = Agent_1.agentInterface.RequestPunchRequestMessage.decodeDelimited(request);\n const pk = this.getPolyKey(nodePath);\n const address = await pk.peerManager.turnClient.requestLocalHolePunchAddress(publicKey);\n return Agent_1.agentInterface.RequestPunchResponseMessage.encodeDelimited({ address: address.toString() }).finish();\n }\n ///////////////////////\n // Client Connection //\n ///////////////////////\n static connectToAgent(getStream) {\n const defaultStream = () => {\n const socket = net_1.default.createConnection(PolykeyAgent.SocketPath);\n return socket;\n };\n const client = new PolykeyClient_1.default(getStream !== null && getStream !== void 0 ? getStream : defaultStream);\n return client;\n }\n // ===== Helper methods===== //\n static get SocketPath() {\n const platform = os_1.default.platform();\n const userInfo = os_1.default.userInfo();\n if (process_1.default.env.PK_SOCKET_PATH) {\n return process_1.default.env.PK_SOCKET_PATH;\n }\n else if (platform == 'win32') {\n return path_1.default.join('\\\\\\\\?\\\\pipe', process_1.default.cwd(), 'polykey-agent');\n }\n else {\n return `/run/user/${userInfo.uid}/polykey/S.polykey-agent`;\n }\n }\n static get LogPath() {\n const platform = os_1.default.platform();\n const userInfo = os_1.default.userInfo();\n if (process_1.default.env.PK_LOG_PATH) {\n return process_1.default.env.PK_LOG_PATH;\n }\n else if (platform == 'win32') {\n return path_1.default.join(os_1.default.tmpdir(), 'polykey', 'log');\n }\n else {\n return `/run/user/${userInfo.uid}/polykey/log`;\n }\n }\n static async startAgent(daemon = false) {\n return new Promise((resolve, reject) => {\n try {\n if (fs_1.default.existsSync(PolykeyAgent.LogPath)) {\n fs_1.default.rmdirSync(PolykeyAgent.LogPath, { recursive: true });\n }\n fs_1.default.mkdirSync(PolykeyAgent.LogPath, { recursive: true });\n let options = {\n uid: process_1.default.getuid(),\n detached: daemon,\n stdio: [\n 'ipc',\n fs_1.default.openSync(path_1.default.join(PolykeyAgent.LogPath, 'output.log'), 'a'),\n fs_1.default.openSync(path_1.default.join(PolykeyAgent.LogPath, 'error.log'), 'a'),\n ],\n };\n const agentProcess = child_process_1.spawn(PolykeyAgent.DAEMON_SCRIPT_PATH.includes('.js') ? 'node' : 'ts-node', [PolykeyAgent.DAEMON_SCRIPT_PATH], options);\n const pid = agentProcess.pid;\n agentProcess.unref();\n agentProcess.disconnect();\n resolve(pid);\n }\n catch (err) {\n reject(err);\n }\n });\n }\n}\n//////////////////////\n// Agent Operations //\n//////////////////////\nPolykeyAgent.DAEMON_SCRIPT_PATH_PREFIX = path_1.default.resolve(__dirname, 'internal', 'daemon-script.');\nPolykeyAgent.DAEMON_SCRIPT_PATH_SUFFIX = fs_1.default.existsSync(PolykeyAgent.DAEMON_SCRIPT_PATH_PREFIX + 'js') ? 'js' : 'ts';\nPolykeyAgent.DAEMON_SCRIPT_PATH = PolykeyAgent.DAEMON_SCRIPT_PATH_PREFIX + PolykeyAgent.DAEMON_SCRIPT_PATH_SUFFIX;\nexports.default = PolykeyAgent;\n","module.exports = require(\"process\");","module.exports = require(\"configstore\");","module.exports = require(\"child_process\");"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://polykey/webpack/universalModuleDefinition","webpack://polykey/webpack/bootstrap","webpack://polykey/external \"path\"","webpack://polykey/./src/peers/PeerInfo.ts","webpack://polykey/external \"../proto/js/Peer\"","webpack://polykey/external \"events\"","webpack://polykey/external \"os\"","webpack://polykey/external \"fs\"","webpack://polykey/./src/utils.ts","webpack://polykey/external \"net\"","webpack://polykey/external \"../proto/compiled/Peer_pb\"","webpack://polykey/external \"readable-stream\"","webpack://polykey/./src/peers/udp-hole-punch/MicroTransportProtocol.ts","webpack://polykey/external \"@grpc/grpc-js\"","webpack://polykey/./src/Polykey.ts","webpack://polykey/external \"crypto\"","webpack://polykey/external \"util\"","webpack://polykey/external \"dgram\"","webpack://polykey/external \"../proto/compiled/Peer_grpc_pb\"","webpack://polykey/external \"isomorphic-git\"","webpack://polykey/external \"encryptedfs\"","webpack://polykey/external \"virtualfs\"","webpack://polykey/external \"../proto/js/Git\"","webpack://polykey/./src/git/upload-pack/GitPktLine.ts","webpack://polykey/./src/git/upload-pack/GitRefManager.ts","webpack://polykey/external \"pako\"","webpack://polykey/./src/git/pack-objects/GitCommit.ts","webpack://polykey/./src/git/pack-objects/GitObjectManager.ts","webpack://polykey/./src/api/HttpApi.ts","webpack://polykey/external \"http\"","webpack://polykey/external \"js-yaml\"","webpack://polykey/external \"connect\"","webpack://polykey/external \"swagger-tools\"","webpack://polykey/external \"protobufjs\"","webpack://polykey/./src/keys/KeyManager.ts","webpack://polykey/external \"kbpgp\"","webpack://polykey/./src/keys/pki/PublicKeyInfrastructure.ts","webpack://polykey/external \"node-forge\"","webpack://polykey/./src/peers/PeerManager.ts","webpack://polykey/./src/peers/turn/TurnClient.ts","webpack://polykey/./src/peers/udp-hole-punch/UDPHolePunchClient.ts","webpack://polykey/./src/peers/udp-hole-punch/socket-pipes/UDPToTCPSocketPipe.ts","webpack://polykey/external \"cyclist\"","webpack://polykey/./src/peers/udp-hole-punch/socket-pipes/TCPToUDPSocketPipe.ts","webpack://polykey/./src/peers/peer-connection/PeerServer.ts","webpack://polykey/./src/peers/turn/TurnServer.ts","webpack://polykey/./src/peers/udp-hole-punch/UDPHolePunchServer.ts","webpack://polykey/./src/peers/peer-connection/PeerConnection.ts","webpack://polykey/./src/peers/MulticastBroadcaster.ts","webpack://polykey/./src/vaults/VaultManager.ts","webpack://polykey/./src/vaults/Vault.ts","webpack://polykey/external \"async-mutex\"","webpack://polykey/./src/git/GitBackend.ts","webpack://polykey/./src/git/upload-pack/uploadPack.ts","webpack://polykey/./src/git/upload-pack/GitPackedRefs.ts","webpack://polykey/./src/git/side-band/GitSideBand.ts","webpack://polykey/external \"buffer\"","webpack://polykey/./src/git/pack-objects/packObjects.ts","webpack://polykey/./src/git/pack-objects/log.ts","webpack://polykey/./src/git/pack-objects/GitObject.ts","webpack://polykey/./src/git/pack-objects/shasum.ts","webpack://polykey/external \"sha.js/sha1\"","webpack://polykey/./src/git/pack-objects/GitTree.ts","webpack://polykey/external \"sha.js\"","webpack://polykey/./src/git/GitFrontend.ts","webpack://polykey/./src/git/GitRequest.ts","webpack://polykey/./src/agent/PolykeyAgent.ts","webpack://polykey/external \"process\"","webpack://polykey/external \"get-port\"","webpack://polykey/external \"configstore\"","webpack://polykey/external \"child_process\"","webpack://polykey/external \"../proto/compiled/Agent_pb\"","webpack://polykey/external \"../proto/compiled/Agent_grpc_pb\""],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;AClFA,iC;;;;;;;ACAa;AACb,8CAA8C,cAAc;AAC5D,eAAe,mBAAO,CAAC,CAAqB;AAC5C,gBAAgB,mBAAO,CAAC,CAAU;AAClC;AACA;AACA,qDAAqD,KAAK,GAAG,KAAK;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,QAAQ,GAAG,UAAU;AACpF;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,UAAU,GAAG,UAAU;AACvE;AACA;AACA,kBAAkB,UAAU,GAAG,UAAU;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,cAAc;AACvE;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,IAAI,IAAI,EAAE,MAAM,IAAI,aAAa,IAAI;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtGA,6C;;;;;;ACAA,mC;;;;;;ACAA,+B;;;;;;ACAA,+B;;;;;;;ACAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D,gCAAgC,mBAAO,CAAC,EAAY;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;AC3DA,gC;;;;;;ACAA,sD;;;;;;ACAA,4C;;;;;;;ACAa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,gCAAgC,mBAAO,CAAC,EAAO;AAC/C,kCAAkC,mBAAO,CAAC,EAAS;AACnD,iBAAiB,mBAAO,CAAC,CAAQ;AACjC,0BAA0B,mBAAO,CAAC,CAAiB;AACnD,mBAAmB,mBAAO,CAAC,CAAa;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA,uBAAuB,WAAW;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;AC3YA,0C;;;;;;;ACAa;AACb;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D,6BAA6B,mBAAO,CAAC,CAAI;AACzC,kCAAkC,mBAAO,CAAC,EAAe;AACzD,qCAAqC,mBAAO,CAAC,EAAmB;AAChE;AACA,sCAAsC,mBAAO,CAAC,EAAqB;AACnE;AACA,uCAAuC,mBAAO,CAAC,EAAuB;AACtE;AACA,uCAAuC,mBAAO,CAAC,EAAsB;AACrE;AACA,gCAAgC,mBAAO,CAAC,CAAkB;AAC1D;AACA;AACA;AACA,iCAAiC,uBAAuB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;;;;;;ACxCA,mC;;;;;;ACAA,iC;;;;;;ACAA,kC;;;;;;ACAA,2D;;;;;;ACAA,2C;;;;;;ACAA,wC;;;;;;ACAA,sC;;;;;;ACAA,4C;;;;;;;ACAa;AACb;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Fa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D;AACA,+BAA+B,mBAAO,CAAC,CAAM;AAC7C,wCAAwC,mBAAO,CAAC,EAAiB;AACjE;AACA;AACA,OAAO,IAAI;AACX,YAAY,IAAI;AAChB,iBAAiB,IAAI;AACrB,kBAAkB,IAAI;AACtB,oBAAoB,IAAI;AACxB,oBAAoB,IAAI;AACxB;AACA;AACA;AACA,8BAA8B,EAAE;AAChC,8BAA8B,EAAE;AAChC;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA,gDAAgD,OAAO,gBAAgB,mBAAmB;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO,GAAG,SAAS;AACvE,kDAAkD,OAAO,GAAG,SAAS;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,GAAG;AAC9C;AACA;AACA;AACA;AACA;AACA,6EAA6E;AAC7E;AACA,mDAAmD,OAAO,GAAG,IAAI,IAAI,mBAAmB;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5HA,iC;;;;;;;ACAa;AACb;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,qBAAqB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,0BAA0B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,SAAS;AACxC;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,EAAE;AACvC;AACA;AACA;AACA,6BAA6B,YAAY,IAAI,aAAa,IAAI,iBAAiB,GAAG,4CAA4C;AAC9H;AACA,gCAAgC,eAAe,IAAI,gBAAgB,IAAI,oBAAoB,GAAG,+CAA+C;AAC7I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtLa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,6BAA6B,mBAAO,CAAC,CAAI;AACzC,+BAA+B,mBAAO,CAAC,EAAM;AAC7C,+BAA+B,mBAAO,CAAC,CAAM;AAC7C,oCAAoC,mBAAO,CAAC,EAAa;AACzD;AACA;AACA;AACA;AACA,8CAA8C,OAAO,WAAW,gBAAgB,GAAG,aAAa;AAChG,kCAAkC,gBAAgB,GAAG,aAAa;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,OAAO,gBAAgB,SAAS;AAChG,sCAAsC,OAAO;AAC7C;AACA;AACA,+CAA+C,2BAA2B;AAC1E,sDAAsD,SAAS;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO,YAAY,mBAAmB;AACxF;AACA,0DAA0D,IAAI;AAC9D;AACA;AACA;AACA;AACA,+CAA+C,IAAI;AACnD;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA,oBAAoB;AACpB;AACA,aAAa,eAAe,+BAA+B,cAAc;AACzE;AACA,oBAAoB;AACpB;AACA;AACA;;;;;;;;AC/Da;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,6BAA6B,mBAAO,CAAC,CAAI;AACzC,+BAA+B,mBAAO,CAAC,EAAM;AAC7C,+BAA+B,mBAAO,CAAC,CAAM;AAC7C,kCAAkC,mBAAO,CAAC,EAAS;AACnD,kCAAkC,mBAAO,CAAC,EAAS;AACnD,wCAAwC,mBAAO,CAAC,EAAe;AAC/D,mBAAmB,mBAAO,CAAC,CAAmB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,YAAoB;AAClD,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,mBAAmB;AACjF,mEAAmE,mBAAmB;AACtF;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,yBAAyB;AACtE;AACA;AACA;AACA;AACA,kCAAkC,qCAAqC;AACvE;AACA;AACA;AACA;;;;;;;AC3HA,iC;;;;;;ACAA,oC;;;;;;ACAA,oC;;;;;;ACAA,0C;;;;;;ACAA,uC;;;;;;;ACAa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,6BAA6B,mBAAO,CAAC,CAAI;AACzC,+BAA+B,mBAAO,CAAC,CAAM;AAC7C,gCAAgC,mBAAO,CAAC,EAAO;AAC/C,iCAAiC,mBAAO,CAAC,EAAQ;AACjD,eAAe,mBAAO,CAAC,EAAM;AAC7B,kDAAkD,mBAAO,CAAC,EAA+B;AACzF;AACA,iCAAiC,uBAAuB;AACxD,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,kBAAkB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,kCAAkC;AAC/F;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,+DAA+D;AAC/D;AACA,8FAA8F;AAC9F;AACA,+FAA+F,yBAAyB;AACxH;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qGAAqG,qBAAqB;AAC1H,2EAA2E,sBAAsB;AACjG;AACA,wEAAwE,yBAAyB;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,KAAK;AACjE;AACA;AACA,qEAAqE,kBAAkB;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,KAAK;AACjE;AACA;AACA,gFAAgF,kBAAkB;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qGAAqG,qBAAqB;AAC1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qGAAqG,sBAAsB;AAC3H;AACA,wEAAwE,aAAa;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,SAAS;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACjoBA,kC;;;;;;;ACAa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,+BAA+B,mBAAO,CAAC,CAAM;AAC7C,qBAAqB,mBAAO,CAAC,EAAY;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,kBAAkB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC1ZA,uC;;;;;;;ACAa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,6BAA6B,mBAAO,CAAC,CAAI;AACzC,+BAA+B,mBAAO,CAAC,CAAM;AAC7C,qCAAqC,mBAAO,CAAC,EAAmB;AAChE,eAAe,mBAAO,CAAC,CAAqB;AAC5C,mCAAmC,mBAAO,CAAC,CAAmB;AAC9D,qCAAqC,mBAAO,CAAC,EAA8B;AAC3E,yCAAyC,mBAAO,CAAC,EAAkC;AACnF,+CAA+C,mBAAO,CAAC,EAA+B;AACtF;AACA;AACA;AACA,qEAAqE,QAAQ,GAAG,OAAO;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,YAAY;AAC3D;AACA,KAAK;AACL;AACA;AACA,iCAAiC,uBAAuB;AACxD;AACA;AACA,gDAAgD,kBAAkB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,4FAA4F,eAAe;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,qDAAqD;AACxE;AACA;AACA;AACA;AACA;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjOa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D;AACA,8BAA8B,mBAAO,CAAC,CAAK;AAC3C,iBAAiB,mBAAO,CAAC,CAAQ;AACjC,mBAAmB,mBAAO,CAAC,CAAa;AACxC,eAAe,mBAAO,CAAC,CAAwB;AAC/C,kBAAkB,mBAAO,CAAC,CAAiC;AAC3D,6CAA6C,mBAAO,CAAC,EAAsC;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,2CAA2C,QAAQ;AACnD,SAAS;AACT;AACA;AACA,qCAAqC,QAAQ,kEAAkE,6BAA6B;AAC5I,sCAAsC,QAAQ;AAC9C;AACA;AACA,0CAA0C,QAAQ,qCAAqC,6BAA6B;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,QAAQ;AAChD;AACA,SAAS;AACT;AACA;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA,SAAS;AACT;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,eAAe,6CAA6C;AAC5D;AACA;AACA;AACA;AACA,2FAA2F,2BAA2B;AACtH;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2FAA2F,2BAA2B;AACtH;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzOa;AACb;AACA;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,8BAA8B,mBAAO,CAAC,CAAK;AAC3C,mBAAmB,mBAAO,CAAC,CAAa;AACxC,eAAe,mBAAO,CAAC,CAAwB;AAC/C,6CAA6C,mBAAO,CAAC,EAAmC;AACxF,6CAA6C,mBAAO,CAAC,EAAmC;AACxF,iCAAiC,mBAAO,CAAC,EAA0B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,8DAA8D,2BAA2B,GAAG,2BAA2B;AACvH;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;AACA;AACA,+BAA+B;AAC/B,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;;;;;;;;ACjEa;AACb,8CAA8C,cAAc;AAC5D,iBAAiB,mBAAO,CAAC,CAAQ;AACjC,iCAAiC,mBAAO,CAAC,EAA2B;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,QAAQ;AAC5D;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,4CAA4C,QAAQ;AACpD,SAAS;AACT;AACA;AACA,sCAAsC,QAAQ,kEAAkE,2BAA2B;AAC3I,uCAAuC,QAAQ;AAC/C;AACA;AACA,uCAAuC,QAAQ,qCAAqC,2BAA2B;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,QAAQ;AAChD;AACA,SAAS;AACT;AACA;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA,SAAS;AACT;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA;AACA;;;;;;;ACzGA,oC;;;;;;;ACAa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,8BAA8B,mBAAO,CAAC,CAAK;AAC3C,iBAAiB,mBAAO,CAAC,CAAQ;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,QAAQ;AAC5D;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,4CAA4C,QAAQ;AACpD,SAAS;AACT;AACA;AACA,sCAAsC,QAAQ,kEAAkE,6BAA6B;AAC7I,uCAAuC,QAAQ;AAC/C;AACA;AACA,2CAA2C,QAAQ,qCAAqC,6BAA6B;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,QAAQ;AACzD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,QAAQ;AAChD;AACA,SAAS;AACT;AACA;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA,SAAS;AACT;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA;AACA;;;;;;;;AChHa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,mBAAmB,mBAAO,CAAC,CAAa;AACxC,0BAA0B,mBAAO,CAAC,EAAe;AACjD,qCAAqC,mBAAO,CAAC,EAAoB;AACjE,gBAAgB,mBAAO,CAAC,CAAa;AACrC,uBAAuB,mBAAO,CAAC,EAAsC;AACrE,kBAAkB,mBAAO,CAAC,CAAiC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,KAAK,GAAG,KAAK;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,QAAQ;AAC/D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtGa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D;AACA,mBAAmB,mBAAO,CAAC,CAAa;AACxC,iBAAiB,mBAAO,CAAC,CAAQ;AACjC,8BAA8B,mBAAO,CAAC,CAAK;AAC3C,eAAe,mBAAO,CAAC,CAAwB;AAC/C,6CAA6C,mBAAO,CAAC,EAAsC;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kCAAkC,KAAK;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,2CAA2C,IAAI;AAC/C,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,KAAK;AACrC;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,cAAc;AAC1C;AACA;AACA,iDAAiD,cAAc,iCAAiC,qBAAqB,GAAG,kBAAkB;AAC1I;AACA,aAAa;AACb;AACA;AACA,gCAAgC,cAAc,wBAAwB,wBAAwB;AAC9F;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,wBAAwB,cAAc,uBAAuB,iBAAiB;AAC9E;AACA;AACA,4BAA4B,cAAc,uBAAuB,iBAAiB;AAClF;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,cAAc,iEAAiE,cAAc,GAAG,qBAAqB,OAAO,oBAAoB,GAAG,wBAAwB;AACvM;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,cAAc,uBAAuB,oBAAoB,GAAG,wBAAwB;AAChH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,cAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,KAAK;AACxD;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA,6FAA6F,cAAc;AAC3G;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA,8FAA8F,gBAAgB;AAC9G;AACA;AACA;AACA;AACA;AACA,yFAAyF,UAAU;AACnG;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA;AACA,6FAA6F,UAAU;AACvG;AACA;AACA;AACA,qCAAqC,iBAAiB;AACtD;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;;;;;;AC3Oa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,mCAAmC,mBAAO,CAAC,CAAa;AACxD,eAAe,mBAAO,CAAC,CAAwB;AAC/C,iCAAiC,mBAAO,CAAC,EAA0B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,YAAY;AACnC;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,2BAA2B;AAC3B,SAAS;AACT;AACA;AACA;;;;;;;;AC1Ca;AACb;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D,mCAAmC,mBAAO,CAAC,CAAa;AACxD,iBAAiB,mBAAO,CAAC,EAAQ;AACjC,0BAA0B,mBAAO,CAAC,EAAe;AACjD,gBAAgB,mBAAO,CAAC,CAAa;AACrC,uBAAuB,mBAAO,CAAC,EAAsC;AACrE,kBAAkB,mBAAO,CAAC,CAAiC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA,uBAAuB,+BAA+B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;;;;;;;;ACxNa;AACb;AACA,4CAA4C;AAC5C;AACA;AACA,8CAA8C,cAAc;AAC5D,gCAAgC,mBAAO,CAAC,EAAO;AAC/C,mCAAmC,mBAAO,CAAC,CAAY;AACvD,iBAAiB,mBAAO,CAAC,CAAQ;AACjC,eAAe,mBAAO,CAAC,CAAqB;AAC5C,gBAAgB,mBAAO,CAAC,CAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,gCAAgC;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0CAA0C;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,0CAA0C;AACpH;AACA;AACA;AACA;AACA,mBAAmB,qDAAqD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ga;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,6BAA6B,mBAAO,CAAC,CAAI;AACzC,+BAA+B,mBAAO,CAAC,CAAM;AAC7C,yCAAyC,mBAAO,CAAC,EAAgB;AACjE,gCAAgC,mBAAO,CAAC,EAAiB;AACzD,sBAAsB,mBAAO,CAAC,EAAa;AAC3C,qCAAqC,mBAAO,CAAC,EAAmB;AAChE,sCAAsC,mBAAO,CAAC,EAAoB;AAClE;AACA,iCAAiC,uBAAuB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,kBAAkB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,UAAU;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,kBAAkB;AACpE;AACA;AACA;AACA;AACA,gEAAgE,UAAU;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,UAAU;AACrD;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,sDAAsD,UAAU;AAChE;AACA;AACA;AACA,8DAA8D,UAAU;AACxE;AACA,iCAAiC,mBAAO,CAAC,EAAW;AACpD;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,kBAAkB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,UAAU;AACtE;AACA;AACA,gEAAgE,UAAU;AAC1E;AACA;AACA;AACA,4DAA4D,UAAU;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzOa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,6BAA6B,mBAAO,CAAC,CAAI;AACzC,+BAA+B,mBAAO,CAAC,CAAM;AAC7C,yCAAyC,mBAAO,CAAC,EAAgB;AACjE,sBAAsB,mBAAO,CAAC,EAAa;AAC3C,sBAAsB,mBAAO,CAAC,EAAa;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,mBAAO,CAAC,EAAW;AACpD;AACA;AACA;AACA;AACA,4CAA4C,kBAAkB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA,oDAAoD,WAAW;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA,uDAAuD,WAAW;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,WAAW;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,8BAA8B;AACnD;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qBAAqB,8BAA8B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,uEAAuE,kBAAkB;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,8BAA8B;AACnD;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qBAAqB,8BAA8B;AACnD;AACA;AACA,aAAa;AACb;AACA;AACA,iBAAiB,8BAA8B;AAC/C;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC7UA,wC;;;;;;;ACAa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,+BAA+B,mBAAO,CAAC,CAAM;AAC7C,cAAc,mBAAO,CAAC,EAAoB;AAC1C,0BAA0B,mBAAO,CAAC,CAAiB;AACnD,qCAAqC,mBAAO,CAAC,EAA0B;AACvE,sCAAsC,mBAAO,CAAC,EAAyB;AACvE,sCAAsC,mBAAO,CAAC,EAA4B;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA,2BAA2B,YAAY;AACvC;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,6BAA6B;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,SAAS;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtHa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,+BAA+B,mBAAO,CAAC,CAAM;AAC7C,qCAAqC,mBAAO,CAAC,EAAc;AAC3D,wCAAwC,mBAAO,CAAC,EAAiB;AACjE,oCAAoC,8BAA8B;AAClE;AACA;AACA;AACA;AACA,0BAA0B,IAAI,GAAG,MAAM;AACvC;AACA,sBAAsB,4BAA4B,GAAG,KAAK;AAC1D,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA,mDAAmD,MAAM,GAAG,IAAI,EAAE,KAAK;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,IAAI;AACjD;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrDa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,4CAA4C;AAC5C,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvCa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,EAAQ;AACjC,0BAA0B,mBAAO,CAAC,CAAiB;AACnD,qCAAqC,mBAAO,CAAC,EAA2B;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;;;;;;ACrJA,mC;;;;;;;ACAa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,+BAA+B,mBAAO,CAAC,EAAM;AAC7C,+BAA+B,mBAAO,CAAC,CAAM;AAC7C,8BAA8B,mBAAO,CAAC,EAAO;AAC7C,kCAAkC,mBAAO,CAAC,EAAW;AACrD,iCAAiC,mBAAO,CAAC,EAAQ;AACjD,oCAAoC,mBAAO,CAAC,EAAa;AACzD,0BAA0B,mBAAO,CAAC,CAAiB;AACnD,2CAA2C,mBAAO,CAAC,EAAoB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvKa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,aAAa,mBAAO,CAAC,CAAM;AAC3B,oCAAoC,mBAAO,CAAC,EAAa;AACzD,2CAA2C,mBAAO,CAAC,EAAoB;AACvE,wCAAwC,mBAAO,CAAC,EAA8B;AAC9E;AACA;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA,sCAAsC,MAAM;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpFa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,iCAAiC,mBAAO,CAAC,EAAU;AACnD;AACA,iBAAiB,eAAe;AAChC,mDAAmD,KAAK,GAAG,6BAA6B;AACxF;AACA;AACA;AACA,iBAAiB,eAAe;AAChC,mDAAmD,KAAK,GAAG,6BAA6B;AACxF;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;AACA,8DAA8D,IAAI,aAAa,IAAI;AACnF;AACA;AACA,mCAAmC;AACnC,kCAAkC;AAClC,uDAAuD;AACvD,6DAA6D;AAC7D;AACA;AACA;AACA,yDAAyD,OAAO,iBAAiB,aAAa;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1Ca;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,+BAA+B,mBAAO,CAAC,EAAa;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACZA,wC;;;;;;;ACAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E,OAAO;AACrF;AACA;AACA;AACA,8EAA8E,OAAO;AACrF;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA,wBAAwB;AACxB;AACA,wBAAwB;AACxB;AACA,wBAAwB;AACxB;AACA,wBAAwB;AACxB,uDAAuD,KAAK;AAC5D;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,gDAAgD;AAChD;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,WAAW,GAAG,WAAW,GAAG,UAAU,MAAM,WAAW;AACtG;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,mBAAmB;AACtE;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AClGA,mC;;;;;;;ACAa;AACb;AACA,4CAA4C;AAC5C;AACA,8CAA8C,cAAc;AAC5D,qCAAqC,mBAAO,CAAC,EAAc;AAC3D,cAAc,mBAAO,CAAC,EAAoB;AAC1C,kBAAkB,mBAAO,CAAC,CAA8B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,YAAY;AACpF,2IAA2I,oEAAoE;AAC/M,eAAe,mBAAmB;AAClC,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,kBAAkB;AAC1F,2IAA2I,oEAAoE;AAC/M,eAAe,mBAAmB;AAClC,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,eAAe,mBAAmB;AAClC,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Da;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,aAAa;AACrD;AACA;AACA;AACA,iCAAiC,2BAA2B;AAC5D;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;;;;;;;;ACnFa;AACb;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D,6BAA6B,mBAAO,CAAC,CAAI;AACzC,+BAA+B,mBAAO,CAAC,CAAM;AAC7C,kCAAkC,mBAAO,CAAC,EAAS;AACnD,mCAAmC,mBAAO,CAAC,EAAU;AACrD,eAAe,mBAAO,CAAC,EAAM;AAC7B,sCAAsC,mBAAO,CAAC,EAAa;AAC3D,0BAA0B,mBAAO,CAAC,EAAe;AACjD,wBAAwB,mBAAO,CAAC,EAAe;AAC/C,2BAA2B,mBAAO,CAAC,EAA+B;AAClE,+BAA+B,mBAAO,CAAC,EAAY;AACnD,wBAAwB,mBAAO,CAAC,EAAoC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,oBAAoB;AACpE;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,+CAA+C,KAAK;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,oDAAoD,UAAU;AAC9D;AACA;AACA;AACA;AACA,mBAAmB,qDAAqD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,IAAI;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,IAAI;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0BAA0B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6BAA6B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6BAA6B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,IAAI;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,IAAI;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,IAAI;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,IAAI;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,IAAI;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,IAAI;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C;AACA;AACA,6EAA6E,oBAAoB;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,IAAI;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6BAA6B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,IAAI;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,IAAI;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,IAAI;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,IAAI;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,IAAI;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,qDAAqD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,qDAAqD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0BAA0B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,YAAY;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,KAAK;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,kBAAkB;AAC3E;AACA,qDAAqD,kBAAkB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrwBA,oC;;;;;;ACAA,qC;;;;;;ACAA,wC;;;;;;ACAA,0C;;;;;;ACAA,uD;;;;;;ACAA,4D","file":"polykey.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"polykey\"] = factory();\n\telse\n\t\troot[\"polykey\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 12);\n","module.exports = require(\"path\");","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Peer_1 = require(\"../../proto/js/Peer\");\nconst utils_1 = require(\"../utils\");\nclass Address {\n constructor(host, port) {\n const parsedAddress = Address.parseHelper(`${host}:${port}`);\n this.host = parsedAddress.host;\n this.port = parsedAddress.port;\n }\n updateHost(host) {\n if (host != undefined && host != '') {\n this.host = host;\n }\n }\n updatePort(port) {\n if (port != undefined && port != 0) {\n this.port = port;\n }\n }\n /**\n * Create an address object from a address string\n * @param addressString Address string in the format of `${this.ip}:${this.port}`\n */\n static parse(addressString) {\n const { host, port } = Address.parseHelper(addressString);\n return new Address(host, port);\n }\n /**\n * Create an address object from a net.AddressInfo\n * @param addressInfo AddressInfo of desired address\n */\n static fromAddressInfo(addressInfo) {\n const host = addressInfo.address == '::' ? 'localhost' : addressInfo.address;\n return new Address(host, addressInfo.port);\n }\n /**\n * Convert address into string of format `${this.host}:${this.port}`\n */\n toString() {\n return `${this.host}:${this.port}`;\n }\n static parseHelper(addressString) {\n var _a;\n if (!addressString || addressString == '') {\n throw Error(`cannot parse empty or undefined string`);\n }\n if (!Address.AddressRegex.test(addressString)) {\n throw Error(`cannot parse address string: '${addressString}'`);\n }\n // parse using regex\n const components = (_a = addressString.match(Address.AddressRegex)) === null || _a === void 0 ? void 0 : _a.slice(1, 3);\n const host = components[0];\n const port = parseInt(components[1]);\n return { host, port };\n }\n}\nexports.Address = Address;\n/**\n * Parses an address string in the format of `host:port` with the help of regex\n */\nAddress.AddressRegex = /^([a-zA-Z.]+|(?:[0-9]{1,3}\\.){3}[0-9]{1,3})(?::)([0-9]{1,5})$/;\nclass PeerInfo {\n constructor(publicKey, relayPublicKey, peerAddress, apiAddress) {\n this.publicKey = PeerInfo.formatPublicKey(publicKey);\n if (relayPublicKey) {\n this.relayPublicKey = PeerInfo.formatPublicKey(relayPublicKey);\n }\n if (peerAddress) {\n const addr = Address.parse(peerAddress);\n this.peerAddress = addr;\n }\n if (apiAddress) {\n const addr = Address.parse(apiAddress);\n this.apiAddress = addr;\n }\n }\n static formatPublicKey(str) {\n const startString = '-----BEGIN PGP PUBLIC KEY BLOCK-----';\n const endString = '-----END PGP PUBLIC KEY BLOCK-----';\n return str.slice(str.indexOf(startString), str.indexOf(endString) + endString.length);\n }\n deepCopy() {\n var _a, _b;\n return new PeerInfo(this.publicKey, this.relayPublicKey, (_a = this.peerAddress) === null || _a === void 0 ? void 0 : _a.toString(), (_b = this.apiAddress) === null || _b === void 0 ? void 0 : _b.toString());\n }\n toStringB64() {\n var _a, _b;\n const message = Peer_1.peerInterface.PeerInfoMessage.encodeDelimited({\n publicKey: this.publicKey,\n relayPublicKey: this.relayPublicKey,\n peerAddress: (_a = this.peerAddress) === null || _a === void 0 ? void 0 : _a.toString(),\n apiAddress: (_b = this.apiAddress) === null || _b === void 0 ? void 0 : _b.toString(),\n }).finish();\n return utils_1.protobufToString(message);\n }\n static parseB64(str) {\n const message = utils_1.stringToProtobuf(str);\n const decoded = Peer_1.peerInterface.PeerInfoMessage.decodeDelimited(message);\n return new PeerInfo(decoded.publicKey, decoded.relayPublicKey, decoded.peerAddress, decoded.apiAddress);\n }\n}\nexports.default = PeerInfo;\n","module.exports = require(\"../proto/js/Peer\");","module.exports = require(\"events\");","module.exports = require(\"os\");","module.exports = require(\"fs\");","\"use strict\";\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst protobufjs = __importStar(require(\"protobufjs\"));\n/**\n * Returns a 5 character long random string of lower case letters\n */\nfunction randomString() {\n return Math.random()\n .toString(36)\n .replace(/[^a-z]+/g, '')\n .substr(0, 5);\n}\nexports.randomString = randomString;\n/**\n * Gets the first promise fulfiled\n * @param promiseList List of promises\n */\nasync function promiseAny(promiseList) {\n return await new Promise((resolve, reject) => {\n const errorList = [];\n for (const promise of promiseList) {\n promise\n .then((p) => {\n resolve(p);\n })\n .catch((_) => null);\n promise.catch((error) => {\n errorList.push(error);\n // check if all have failed\n if (errorList.length == promiseList.length) {\n reject(errorList);\n }\n });\n }\n });\n}\nexports.promiseAny = promiseAny;\nfunction protobufToString(message) {\n return protobufjs.util.base64.encode(message, 0, message.length);\n}\nexports.protobufToString = protobufToString;\nfunction stringToProtobuf(str) {\n const buffer = protobufjs.util.newBuffer(protobufjs.util.base64.length(str));\n protobufjs.util.base64.decode(str, buffer, 0);\n return buffer;\n}\nexports.stringToProtobuf = stringToProtobuf;\nasync function sleep(ms) {\n await new Promise((resolve, reject) => {\n setTimeout(() => resolve(), ms);\n });\n}\nexports.sleep = sleep;\n","module.exports = require(\"net\");","module.exports = require(\"../proto/compiled/Peer_pb\");","module.exports = require(\"readable-stream\");","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst dgram_1 = __importDefault(require(\"dgram\"));\nconst cyclist_1 = __importDefault(require(\"cyclist\"));\nconst events_1 = require(\"events\");\nconst readable_stream_1 = require(\"readable-stream\");\nconst PeerInfo_1 = require(\"../PeerInfo\");\nconst EXTENSION = 0;\nconst VERSION = 1;\nconst UINT16 = 0xffff;\nconst ID_MASK = 0xf << 4;\nconst MTU = 1400;\nconst PACKET_DATA = 0 << 4;\nconst PACKET_FIN = 1 << 4;\nconst PACKET_STATE = 2 << 4;\nconst PACKET_RESET = 3 << 4;\nconst PACKET_SYN = 4 << 4;\nconst MIN_PACKET_SIZE = 20;\nconst DEFAULT_WINDOW_SIZE = 1 << 18;\nconst CLOSE_GRACE = 5000;\nconst BUFFER_SIZE = 512;\nconst uint32 = function (n) {\n return n >>> 0;\n};\nconst uint16 = function (n) {\n return n & UINT16;\n};\nconst timestamp = (function () {\n const offset = process.hrtime();\n const then = Date.now() * 1000;\n return function () {\n const diff = process.hrtime(offset);\n return uint32(then + 1000000 * diff[0] + ((diff[1] / 1000) | 0));\n };\n})();\nconst bufferToPacket = function (buffer) {\n const packet = {\n id: buffer[0] & ID_MASK,\n connection: buffer.readUInt16BE(2),\n timestamp: buffer.readUInt32BE(4),\n timediff: buffer.readUInt32BE(8),\n window: buffer.readUInt32BE(12),\n seq: buffer.readUInt16BE(16),\n ack: buffer.readUInt16BE(18),\n data: buffer.length > 20 ? buffer.slice(20) : null,\n };\n return packet;\n};\nconst packetToBuffer = function (packet) {\n const buffer = Buffer.alloc(20 + (packet.data ? packet.data.length : 0));\n buffer[0] = packet.id | VERSION;\n buffer[1] = EXTENSION;\n buffer.writeUInt16BE(packet.connection, 2);\n buffer.writeUInt32BE(packet.timestamp, 4);\n buffer.writeUInt32BE(packet.timediff, 8);\n buffer.writeUInt32BE(packet.window, 12);\n buffer.writeUInt16BE(packet.seq, 16);\n buffer.writeUInt16BE(packet.ack, 18);\n if (packet.data) {\n packet.data.copy(buffer, 20);\n }\n return buffer;\n};\nconst createPacket = function (connection, id, data) {\n return {\n id: id,\n connection: id === PACKET_SYN ? connection._recvId : connection._sendId,\n seq: connection._seq,\n ack: connection._ack,\n timestamp: timestamp(),\n timediff: 0,\n window: DEFAULT_WINDOW_SIZE,\n data: data,\n sent: 0,\n };\n};\nclass MTPConnection extends readable_stream_1.Duplex {\n constructor(port, host, socket, syn) {\n super();\n this.remoteAddress = new PeerInfo_1.Address(host, port);\n if (isNaN(port)) {\n throw Error('port cannot be NaN');\n }\n this.port = port;\n this.host = host;\n this.socket = socket;\n this._outgoing = cyclist_1.default(BUFFER_SIZE);\n this._incoming = cyclist_1.default(BUFFER_SIZE);\n this._closed = false;\n this._inflightPackets = 0;\n this._closed = false;\n this._alive = false;\n if (syn) {\n this._connecting = false;\n this._recvId = uint16(syn.connection + 1);\n this._sendId = syn.connection;\n this._seq = (Math.random() * UINT16) | 0;\n this._ack = syn.seq;\n this._synack = createPacket(this, PACKET_STATE, null);\n this._transmit(this._synack);\n }\n else {\n this._connecting = true;\n this._recvId = 0; // tmp value for v8 opt\n this._sendId = 0; // tmp value for v8 opt\n this._seq = (Math.random() * UINT16) | 0;\n this._ack = 0;\n this._synack = undefined;\n socket.on('listening', () => {\n this._recvId = socket.address().port; // using the port gives us system wide clash protection\n this._sendId = uint16(this._recvId + 1);\n this._sendOutgoing(createPacket(this, PACKET_SYN, null));\n });\n socket.on('error', (err) => {\n this.emit('error', err);\n });\n socket.bind();\n }\n const resend = setInterval(this._resend.bind(this), 500);\n const keepAlive = setInterval(this._keepAlive.bind(this), 10 * 1000);\n let tick = 0;\n const closed = () => {\n if (++tick === 2) {\n this._closing();\n }\n };\n const sendFin = () => {\n if (this._connecting) {\n return this.once('connect', sendFin);\n }\n this._sendOutgoing(createPacket(this, PACKET_FIN, null));\n this.once('flush', closed);\n };\n this.once('finish', sendFin);\n this.once('close', () => {\n if (!syn) {\n setTimeout(socket.close.bind(socket), CLOSE_GRACE);\n }\n clearInterval(resend);\n clearInterval(keepAlive);\n });\n this.once('end', () => {\n process.nextTick(closed);\n });\n }\n get RecvID() {\n return this._recvId;\n }\n destroy(err, callback) {\n this.end();\n return this;\n }\n address() {\n return new PeerInfo_1.Address(this.host, this.port);\n }\n _read() {\n // do nothing...\n }\n _write(data, enc, callback) {\n if (this._connecting) {\n return this._writeOnce('connect', data, enc, callback);\n }\n while (this._writable()) {\n const payload = this._payload(data);\n this._sendOutgoing(createPacket(this, PACKET_DATA, payload));\n if (payload.length === data.length) {\n return callback();\n }\n data = data.slice(payload.length);\n }\n this._writeOnce('flush', data, enc, callback);\n }\n _writeOnce(event, data, enc, callback) {\n this.once(event, () => {\n this._write(data, enc, callback);\n });\n }\n _writable() {\n return this._inflightPackets < BUFFER_SIZE - 1;\n }\n _payload(data) {\n if (data.length > MTU) {\n return data.slice(0, MTU);\n }\n return data;\n }\n _resend() {\n const offset = this._seq - this._inflightPackets;\n const first = this._outgoing.get(offset);\n if (!first) {\n return;\n }\n const timeout = 500000;\n const now = timestamp();\n if (uint32(first.sent - now) < timeout) {\n return;\n }\n for (let i = 0; i < this._inflightPackets; i++) {\n const packet = this._outgoing.get(offset + i);\n if (uint32(packet.sent - now) >= timeout) {\n this._transmit(packet);\n }\n }\n }\n _keepAlive() {\n if (this._alive) {\n return (this._alive = false);\n }\n this._sendAck();\n }\n _closing() {\n if (this._closed) {\n return;\n }\n this._closed = true;\n process.nextTick(this.emit.bind(this, 'close'));\n }\n // packet handling\n _recvAck(ack) {\n const offset = this._seq - this._inflightPackets;\n const acked = uint16(ack - offset) + 1;\n if (acked >= BUFFER_SIZE) {\n return; // sanity check\n }\n for (let i = 0; i < acked; i++) {\n this._outgoing.del(offset + i);\n this._inflightPackets--;\n }\n if (!this._inflightPackets) {\n this.emit('flush');\n }\n }\n _recvIncoming(packet) {\n if (this._closed) {\n return;\n }\n if (packet.id === PACKET_SYN && this._connecting) {\n this._transmit(this._synack);\n return;\n }\n if (packet.id === PACKET_RESET) {\n this.push(null);\n this.end();\n this._closing();\n return;\n }\n if (this._connecting) {\n if (packet.id !== PACKET_STATE) {\n return this._incoming.put(packet.seq, packet);\n }\n this._ack = uint16(packet.seq - 1);\n this._recvAck(packet.ack);\n this._connecting = false;\n this.emit('connect');\n packet = this._incoming.del(packet.seq);\n if (!packet) {\n return;\n }\n }\n if (uint16(packet.seq - this._ack) >= BUFFER_SIZE) {\n return this._sendAck(); // old packet\n }\n this._recvAck(packet.ack); // TODO: other calcs as well\n if (packet.id === PACKET_STATE) {\n return;\n }\n this._incoming.put(packet.seq, packet);\n while ((packet = this._incoming.del(this._ack + 1))) {\n this._ack = uint16(this._ack + 1);\n if (packet.id === PACKET_DATA) {\n this.push(packet.data);\n }\n if (packet.id === PACKET_FIN) {\n this.push(null);\n }\n }\n this._sendAck();\n }\n _sendAck() {\n this._transmit(createPacket(this, PACKET_STATE, null)); // TODO: make this delayed\n }\n _sendOutgoing(packet) {\n this._outgoing.put(packet.seq, packet);\n this._seq = uint16(this._seq + 1);\n this._inflightPackets++;\n this._transmit(packet);\n }\n _transmit(packet) {\n try {\n packet.sent = packet.sent === 0 ? packet.timestamp : timestamp();\n const message = packetToBuffer(packet);\n this._alive = true;\n this.socket.send(message, 0, message.length, this.port, this.host);\n }\n catch (error) { }\n }\n}\nexports.MTPConnection = MTPConnection;\nclass UTPServer extends events_1.EventEmitter {\n constructor() {\n super();\n this._connections = {};\n }\n address() {\n return PeerInfo_1.Address.fromAddressInfo(this._socket.address());\n }\n listenSocket(socket, onlistening) {\n this._socket = socket;\n const connections = this._connections;\n socket.on('message', (message, rinfo) => {\n if (message.length < MIN_PACKET_SIZE) {\n return;\n }\n const packet = bufferToPacket(message);\n const id = rinfo.address + ':' + (packet.id === PACKET_SYN ? uint16(packet.connection + 1) : packet.connection);\n if (connections[id]) {\n return connections[id]._recvIncoming(packet);\n }\n if (packet.id !== PACKET_SYN || this._closed) {\n return;\n }\n connections[id] = new MTPConnection(rinfo.port, rinfo.address, socket, packet);\n connections[id].on('close', () => {\n delete connections[id];\n });\n this.emit('connection', connections[id]);\n });\n socket.once('listening', () => {\n this.emit('listening');\n });\n if (onlistening) {\n this.once('listening', onlistening);\n }\n }\n listen(connection, onlistening) {\n this.listenSocket(connection.socket, onlistening);\n }\n listenPort(port, onlistening) {\n const socket = dgram_1.default.createSocket('udp4');\n this.listenSocket(socket, onlistening);\n socket.bind(port);\n }\n close(cb) {\n let openConnections = 0;\n this._closed = true;\n function onClose() {\n if (--openConnections === 0) {\n if (this._socket) {\n this._socket.close();\n }\n if (cb) {\n cb();\n }\n }\n }\n for (const id in this._connections) {\n if (this._connections[id]._closed) {\n continue;\n }\n openConnections++;\n this._connections[id].once('close', onClose);\n this._connections[id].end();\n }\n }\n}\nexports.UTPServer = UTPServer;\nfunction createServer(onconnection) {\n const server = new UTPServer();\n if (onconnection) {\n server.on('connection', onconnection);\n }\n return server;\n}\nexports.createServer = createServer;\nfunction connect(port, host) {\n const socket = dgram_1.default.createSocket('udp4');\n const connection = new MTPConnection(port, host || '127.0.0.1', socket, undefined);\n socket.on('message', (message) => {\n if (message.length < MIN_PACKET_SIZE) {\n return;\n }\n const packet = bufferToPacket(message);\n if (packet.id === PACKET_SYN) {\n return;\n }\n if (packet.connection !== connection.RecvID) {\n return;\n }\n connection._recvIncoming(packet);\n });\n return connection;\n}\nexports.connect = connect;\n","module.exports = require(\"@grpc/grpc-js\");","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst os_1 = __importDefault(require(\"os\"));\nconst HttpApi_1 = __importDefault(require(\"./api/HttpApi\"));\nconst KeyManager_1 = __importDefault(require(\"./keys/KeyManager\"));\nexports.KeyManager = KeyManager_1.default;\nconst PeerManager_1 = __importDefault(require(\"./peers/PeerManager\"));\nexports.PeerManager = PeerManager_1.default;\nconst VaultManager_1 = __importDefault(require(\"./vaults/VaultManager\"));\nexports.VaultManager = VaultManager_1.default;\nconst PolykeyAgent_1 = __importDefault(require(\"./agent/PolykeyAgent\"));\nexports.PolykeyAgent = PolykeyAgent_1.default;\nconst PeerInfo_1 = __importStar(require(\"./peers/PeerInfo\"));\nexports.PeerInfo = PeerInfo_1.default;\nexports.Address = PeerInfo_1.Address;\nclass Polykey {\n constructor(polykeyPath = `${os_1.default.homedir()}/.polykey`, fileSystem, keyManager, peerManager, vaultManager) {\n this.polykeyPath = polykeyPath;\n // Set key manager\n this.keyManager = keyManager !== null && keyManager !== void 0 ? keyManager : new KeyManager_1.default(this.polykeyPath, fileSystem);\n // Initialize peer store and peer discovery classes\n this.peerManager = peerManager !== null && peerManager !== void 0 ? peerManager : new PeerManager_1.default(this.polykeyPath, fileSystem, this.keyManager);\n // Set or Initialize vaultManager\n this.vaultManager = vaultManager !== null && vaultManager !== void 0 ? vaultManager : new VaultManager_1.default(this.polykeyPath, fileSystem, this.keyManager, this.peerManager);\n // start the api\n this.httpApi = new HttpApi_1.default((() => this.peerManager.peerInfo).bind(this), ((apiAddress) => {\n this.peerManager.peerInfo.apiAddress = apiAddress;\n }).bind(this), this.keyManager.pki.handleCSR.bind(this), (() => this.keyManager.pki.RootCert).bind(this));\n }\n}\nexports.default = Polykey;\n","module.exports = require(\"crypto\");","module.exports = require(\"util\");","module.exports = require(\"dgram\");","module.exports = require(\"../proto/compiled/Peer_grpc_pb\");","module.exports = require(\"isomorphic-git\");","module.exports = require(\"encryptedfs\");","module.exports = require(\"virtualfs\");","module.exports = require(\"../proto/js/Git\");","\"use strict\";\n/**\npkt-line Format\n---------------\n\nMuch (but not all) of the payload is described around pkt-lines.\n\nA pkt-line is a variable length binary string. The first four bytes\nof the line, the pkt-len, indicates the total length of the line,\nin hexadecimal. The pkt-len includes the 4 bytes used to contain\nthe length's hexadecimal representation.\n\nA pkt-line MAY contain binary data, so implementors MUST ensure\npkt-line parsing/formatting routines are 8-bit clean.\n\nA non-binary line SHOULD BE terminated by an LF, which if present\nMUST be included in the total length. Receivers MUST treat pkt-lines\nwith non-binary data the same whether or not they contain the trailing\nLF (stripping the LF if present, and not complaining when it is\nmissing).\n\nThe maximum length of a pkt-line's data component is 65516 bytes.\nImplementations MUST NOT send pkt-line whose length exceeds 65520\n(65516 bytes of payload + 4 bytes of length data).\n\nImplementations SHOULD NOT send an empty pkt-line (\"0004\").\n\nA pkt-line with a length field of 0 (\"0000\"), called a flush-pkt,\nis a special case and MUST be handled differently than an empty\npkt-line (\"0004\").\n\n----\n pkt-line = data-pkt / flush-pkt\n\n data-pkt = pkt-len pkt-payload\n pkt-len = 4*(HEXDIG)\n pkt-payload = (pkt-len - 4)*(OCTET)\n\n flush-pkt = \"0000\"\n----\n\nExamples (as C-style strings):\n\n----\n pkt-line actual value\n ---------------------------------\n \"0006a\\n\" \"a\\n\"\n \"0005a\" \"a\"\n \"000bfoobar\\n\" \"foobar\\n\"\n \"0004\" \"\"\n----\n*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction padHex(b, n) {\n const s = n.toString(16);\n return '0'.repeat(b - s.length) + s;\n}\n// I'm really using this more as a namespace.\n// There's not a lot of \"state\" in a pkt-line\nclass GitPktLine {\n static flush() {\n return Buffer.from('0000', 'utf8');\n }\n static encode(line) {\n if (typeof line === 'string') {\n line = Buffer.from(line);\n }\n const length = line.length + 4;\n const hexlength = padHex(4, length);\n return Buffer.concat([Buffer.from(hexlength, 'utf8'), line]);\n }\n static streamReader(stream) {\n return async function read() {\n try {\n let length = await stream.slice(4);\n if (length === null)\n return true;\n length = parseInt(length.toString('utf8'), 16);\n if (length === 0)\n return null;\n let buffer = await stream.slice(length - 4);\n if (buffer === null)\n return true;\n return buffer;\n }\n catch (err) {\n console.log('error', err);\n return true;\n }\n };\n }\n}\nexports.default = GitPktLine;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// This is a convenience wrapper for reading and writing files in the 'refs' directory.\nconst path_1 = __importDefault(require(\"path\"));\nconst GitPackedRefs_1 = __importDefault(require(\"./GitPackedRefs\"));\n// @see https://git-scm.com/docs/git-rev-parse.html#_specifying_revisions\nconst refpaths = (ref) => [\n `${ref}`,\n `refs/${ref}`,\n `refs/tags/${ref}`,\n `refs/heads/${ref}`,\n `refs/remotes/${ref}`,\n `refs/remotes/${ref}/HEAD`,\n];\nfunction compareRefNames(a, b) {\n // https://stackoverflow.com/a/40355107/2168416\n const _a = a.replace(/\\^\\{\\}$/, '');\n const _b = b.replace(/\\^\\{\\}$/, '');\n const tmp = -(_a < _b) || +(_a > _b);\n if (tmp === 0) {\n return a.endsWith('^{}') ? 1 : -1;\n }\n return tmp;\n}\n// @see https://git-scm.com/docs/gitrepository-layout\nconst GIT_FILES = ['config', 'description', 'index', 'shallow', 'commondir'];\n// This function is used to get all the files in the refs folder for listRefs function\nasync function recursiveDirectoryWalk(dir, fileSystem) {\n return new Promise((resolve, reject) => {\n let results = [];\n fileSystem.promises\n .readdir(dir)\n .then(async (list) => {\n var pending = list.length;\n if (!pending)\n return resolve(results);\n list.forEach(async function (file) {\n file = path_1.default.resolve(dir, file);\n fileSystem.promises.stat(file).then(async (stat) => {\n if (stat && stat.isDirectory()) {\n const res = await recursiveDirectoryWalk(file, fileSystem);\n results = results.concat(res);\n if (!--pending)\n resolve(results);\n }\n else {\n results.push(file);\n if (!--pending)\n resolve(results);\n }\n });\n });\n })\n .catch((err) => {\n if (err)\n return reject(err);\n });\n });\n}\nclass GitRefManager {\n static async packedRefs(fileSystem, gitdir) {\n const text = fileSystem.readFileSync(`${gitdir}/packed-refs`, { encoding: 'utf8' });\n const packed = GitPackedRefs_1.default.from(text);\n return packed.refs;\n }\n // List all the refs that match the `filepath` prefix\n static async listRefs(fileSystem, gitdir, filepath) {\n const packedMap = GitRefManager.packedRefs(fileSystem, gitdir);\n let files = [];\n try {\n files = await recursiveDirectoryWalk(`${gitdir}/${filepath}`, fileSystem);\n files = files.map((x) => x.replace(`${gitdir}/${filepath}/`, ''));\n }\n catch (err) {\n files = [];\n }\n for (let key of (await packedMap).keys()) {\n // filter by prefix\n if (key.startsWith(filepath)) {\n // remove prefix\n key = key.replace(filepath + '/', '');\n // Don't include duplicates; the loose files have precedence anyway\n if (!files.includes(key)) {\n files.push(key);\n }\n }\n }\n // since we just appended things onto an array, we need to sort them now\n files.sort(compareRefNames);\n return files;\n }\n static async resolve(fileSystem, gitdir, ref, depth) {\n if (depth !== undefined) {\n depth--;\n if (depth === -1) {\n return ref;\n }\n }\n // Is it a ref pointer?\n if (ref.startsWith('ref: ')) {\n ref = ref.slice('ref: '.length);\n return GitRefManager.resolve(fileSystem, gitdir, ref, depth);\n }\n // Is it a complete and valid SHA?\n if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) {\n return ref;\n }\n // We need to alternate between the file system and the packed-refs\n const packedMap = await GitRefManager.packedRefs(fileSystem, gitdir);\n // Look in all the proper paths, in this order\n const allpaths = refpaths(ref).filter((p) => !GIT_FILES.includes(p)); // exclude git system files (#709)\n for (const ref of allpaths) {\n const sha = fileSystem.readFileSync(`${gitdir}/${ref}`, { encoding: 'utf8' }).toString() || packedMap.get(ref);\n if (sha) {\n return GitRefManager.resolve(fileSystem, gitdir, sha.trim(), depth);\n }\n }\n // Do we give up?\n throw Error('RefNotFound');\n }\n}\nexports.default = GitRefManager;\n","module.exports = require(\"pako\");","\"use strict\";\n// The amount of work that went into crafting these cases to handle\n// -0 (just so we don't lose that information when parsing and reconstructing)\n// but can also default to +0 was extraordinary.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction simpleSign(n) {\n return Math.sign(n) || (Object.is(n, -0) ? -1 : 1);\n}\nfunction negateExceptForZero(n) {\n return n === 0 ? n : -n;\n}\nfunction formatTimezoneOffset(minutes) {\n let sign = simpleSign(negateExceptForZero(minutes));\n minutes = Math.abs(minutes);\n let hours = Math.floor(minutes / 60);\n minutes -= hours * 60;\n let strHours = String(hours);\n let strMinutes = String(minutes);\n if (strHours.length < 2)\n strHours = '0' + strHours;\n if (strMinutes.length < 2)\n strMinutes = '0' + strMinutes;\n return (sign === -1 ? '-' : '+') + strHours + strMinutes;\n}\nfunction parseTimezoneOffset(offset) {\n let [, sign, hours, minutes] = offset.match(/(\\+|-)(\\d\\d)(\\d\\d)/);\n minutes = (sign === '+' ? 1 : -1) * (Number(hours) * 60 + Number(minutes));\n return negateExceptForZero(minutes);\n}\nfunction parseAuthor(author) {\n let [, name, email, timestamp, offset] = author.match(/^(.*) <(.*)> (.*) (.*)$/);\n return {\n name: name,\n email: email,\n timestamp: Number(timestamp),\n timezoneOffset: parseTimezoneOffset(offset),\n };\n}\nfunction normalize(str) {\n // remove all \n str = str.replace(/\\r/g, '');\n // no extra newlines up front\n str = str.replace(/^\\n+/, '');\n // and a single newline at the end\n str = str.replace(/\\n+$/, '') + '\\n';\n return str;\n}\nfunction indent(str) {\n return (str\n .trim()\n .split('\\n')\n .map((x) => ' ' + x)\n .join('\\n') + '\\n');\n}\nfunction outdent(str) {\n return str\n .split('\\n')\n .map((x) => x.replace(/^ /, ''))\n .join('\\n');\n}\n// TODO: Make all functions have static async signature?\nclass GitCommit {\n constructor(commit) {\n if (typeof commit === 'string') {\n this._commit = commit;\n }\n else if (Buffer.isBuffer(commit)) {\n this._commit = commit.toString('utf8');\n }\n else if (typeof commit === 'object') {\n this._commit = GitCommit.render(commit);\n }\n else {\n throw new Error('invalid type passed to GitCommit constructor');\n }\n }\n static fromPayloadSignature({ payload, signature }) {\n let headers = GitCommit.justHeaders(payload);\n let message = GitCommit.justMessage(payload);\n let commit = normalize(headers + '\\ngpgsig' + indent(signature) + '\\n' + message);\n return new GitCommit(commit);\n }\n static from(commit) {\n return new GitCommit(commit);\n }\n toObject() {\n return Buffer.from(this._commit, 'utf8');\n }\n // Todo: allow setting the headers and message\n headers() {\n return this.parseHeaders();\n }\n // Todo: allow setting the headers and message\n message() {\n return GitCommit.justMessage(this._commit);\n }\n parse() {\n return Object.assign({ message: this.message() }, this.headers());\n }\n static justMessage(commit) {\n return normalize(commit.slice(commit.indexOf('\\n\\n') + 2));\n }\n static justHeaders(commit) {\n return commit.slice(0, commit.indexOf('\\n\\n'));\n }\n parseHeaders() {\n let headers = GitCommit.justHeaders(this._commit).split('\\n');\n let hs = [];\n for (let h of headers) {\n if (h[0] === ' ') {\n // combine with previous header (without space indent)\n hs[hs.length - 1] += '\\n' + h.slice(1);\n }\n else {\n hs.push(h);\n }\n }\n let obj = {\n parent: [],\n };\n for (let h of hs) {\n let key = h.slice(0, h.indexOf(' '));\n let value = h.slice(h.indexOf(' ') + 1);\n if (Array.isArray(obj[key])) {\n obj[key].push(value);\n }\n else {\n obj[key] = value;\n }\n }\n if (obj.author) {\n obj.author = parseAuthor(obj.author);\n }\n if (obj.committer) {\n obj.committer = parseAuthor(obj.committer);\n }\n return obj;\n }\n static renderHeaders(obj) {\n let headers = '';\n if (obj.tree) {\n headers += `tree ${obj.tree}\\n`;\n }\n else {\n headers += `tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\\n`; // the null tree\n }\n if (obj.parent) {\n if (obj.parent.length === undefined) {\n throw new Error(`commit 'parent' property should be an array`);\n }\n for (let p of obj.parent) {\n headers += `parent ${p}\\n`;\n }\n }\n let author = obj.author;\n headers += `author ${author.name} <${author.email}> ${author.timestamp} ${formatTimezoneOffset(author.timezoneOffset)}\\n`;\n let committer = obj.committer || obj.author;\n headers += `committer ${committer.name} <${committer.email}> ${committer.timestamp} ${formatTimezoneOffset(committer.timezoneOffset)}\\n`;\n if (obj.gpgsig) {\n headers += 'gpgsig' + indent(obj.gpgsig);\n }\n return headers;\n }\n static render(obj) {\n return GitCommit.renderHeaders(obj) + '\\n' + normalize(obj.message);\n }\n render() {\n return this._commit;\n }\n withoutSignature() {\n let commit = normalize(this._commit);\n if (commit.indexOf('\\ngpgsig') === -1)\n return commit;\n let headers = commit.slice(0, commit.indexOf('\\ngpgsig'));\n let message = commit.slice(commit.indexOf('-----END PGP SIGNATURE-----\\n') + '-----END PGP SIGNATURE-----\\n'.length);\n return normalize(headers + '\\n' + message);\n }\n isolateSignature() {\n let signature = this._commit.slice(this._commit.indexOf('-----BEGIN PGP SIGNATURE-----'), this._commit.indexOf('-----END PGP SIGNATURE-----') + '-----END PGP SIGNATURE-----'.length);\n return outdent(signature);\n }\n}\nexports.default = GitCommit;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst fs_1 = __importDefault(require(\"fs\"));\nconst pako_1 = __importDefault(require(\"pako\"));\nconst path_1 = __importDefault(require(\"path\"));\nconst GitObject_1 = __importDefault(require(\"./GitObject\"));\nconst PackfileCache = new Map();\nclass GitObjectManager {\n static async read(fileSystem, gitdir, oid, format = 'content') {\n // Look for it in the loose object directory.\n let file = fileSystem.readFileSync(`${gitdir}/objects/${oid.slice(0, 2)}/${oid.slice(2)}`);\n let source = `./objects/${oid.slice(0, 2)}/${oid.slice(2)}`;\n // Check to see if it's in a packfile.\n if (!file) {\n // Curry the current read method so that the packfile un-deltification\n // process can acquire external ref-deltas.\n const getExternalRefDelta = (oid) => GitObjectManager.read(fileSystem, gitdir, oid);\n // Iterate through all the .pack files\n let list = fs_1.default.readdirSync(path_1.default.join(gitdir, '/objects/pack'));\n list = list.filter((x) => x.endsWith('.pack'));\n for (let filename of list) {\n // Try to get the packfile from the in-memory cache\n let p = PackfileCache.get(filename);\n // If the packfile DOES have the oid we're looking for...\n if (p.offsets.has(oid)) {\n // Make sure the packfile is loaded in memory\n if (!p.pack) {\n const pack = fileSystem.readFileSync(`${gitdir}/objects/pack/${filename}`);\n await p.load({ pack });\n }\n // Get the resolved git object from the packfile\n let result = await p.read({ oid, getExternalRefDelta });\n result.source = `./objects/pack/${filename}`;\n return result;\n }\n }\n }\n // Check to see if it's in shallow commits.\n if (!file) {\n let text = fileSystem.readFileSync(`${gitdir}/shallow`, { encoding: 'utf8' });\n if (text !== null && text.includes(oid)) {\n throw new Error(`ReadShallowObjectFail: ${oid}`);\n }\n }\n // Finally\n if (!file) {\n throw new Error(`ReadObjectFail: ${oid}`);\n }\n if (format === 'deflated') {\n return { format: 'deflated', object: file, source };\n }\n let buffer = Buffer.from(pako_1.default.inflate(file));\n if (format === 'wrapped') {\n return { format: 'wrapped', object: buffer, source };\n }\n let { type, object } = GitObject_1.default.unwrap({ oid, buffer });\n if (format === 'content')\n return { type, format: 'content', object, source };\n }\n}\nexports.default = GitObjectManager;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst fs_1 = __importDefault(require(\"fs\"));\nconst http_1 = __importDefault(require(\"http\"));\nconst path_1 = __importDefault(require(\"path\"));\nconst js_yaml_1 = __importDefault(require(\"js-yaml\"));\nconst connect_1 = __importDefault(require(\"connect\"));\nconst swagger_tools_1 = __importDefault(require(\"swagger-tools\"));\nconst PeerInfo_1 = require(\"../peers/PeerInfo\");\nclass ResponsePayload {\n constructor(code, payload) {\n this.code = code;\n this.payload = payload;\n }\n}\nclass HttpApi {\n constructor(getPeerInfo, updateApiAddress, handleCSR, getRootCertificate) {\n this.certificateSigningRequest = async (req, res, next) => {\n try {\n const body = req.swagger.params['body'].value;\n const response = await this.handleCertificateSigningRequest(body);\n this.writeJson(res, response);\n }\n catch (error) {\n this.writeJson(res, error);\n }\n };\n this.rootCertificate = async (req, res, next) => {\n try {\n const response = await this.handleRootCertificateRequest();\n this.writeJson(res, response);\n }\n catch (error) {\n this.writeJson(res, error);\n }\n };\n this.getLocalPeerInfo = getPeerInfo;\n this.updateApiAddress = updateApiAddress;\n this.handleCSR = handleCSR;\n this.getRootCertificate = getRootCertificate;\n this.connectServer = connect_1.default();\n }\n async start(port = 0) {\n return await new Promise((resolve, reject) => {\n // this code is needed as we can't require yaml files\n let yamlDoc;\n const fromSrcFolderPath = path_1.default.join(__dirname, '../../openapi.yaml');\n const fromDistFolderPath = path_1.default.join(__dirname, '../openapi.yaml');\n if (fs_1.default.existsSync(fromSrcFolderPath)) {\n yamlDoc = fs_1.default.readFileSync(fromSrcFolderPath).toString();\n }\n else {\n yamlDoc = fs_1.default.readFileSync(fromDistFolderPath).toString();\n }\n const swaggerDoc = js_yaml_1.default.load(yamlDoc);\n // Initialize the Swagger middleware\n swagger_tools_1.default.initializeMiddleware(swaggerDoc, (middleware) => {\n // Interpret Swagger resources and attach metadata to request - must be first in swagger-tools middleware chain\n this.connectServer.use(middleware.swaggerMetadata());\n // Validate Swagger requests\n this.connectServer.use(middleware.swaggerValidator());\n // Route validated requests to appropriate controller\n this.connectServer.use(middleware.swaggerRouter({\n controllers: this.ControllerOptions,\n // controllers: path.join(__dirname, './controllers'),\n useStubs: process.env.NODE_ENV === 'development',\n }));\n // Serve the Swagger documents and Swagger UI\n this.connectServer.use(middleware.swaggerUi());\n // Start the server\n this.httpServer = http_1.default.createServer(this.connectServer).listen(port, () => {\n const addressInfo = this.httpServer.address();\n const address = PeerInfo_1.Address.fromAddressInfo(addressInfo);\n this.updateApiAddress(address);\n console.log(`HTTP API served at: http://${address.toString()}`);\n console.log(`HTTP API docs served at: http://${address.toString()}/docs`);\n resolve(port);\n });\n });\n });\n }\n async handleCertificateSigningRequest(body) {\n const publicKey = body.publicKey;\n const csr = body.csr;\n return {\n publicKey: this.getLocalPeerInfo().publicKey,\n csr: this.handleCSR(csr),\n };\n }\n async handleRootCertificateRequest() {\n return {\n rootCert: this.getRootCertificate(),\n };\n }\n ////////////////////////\n // Controller methods //\n ////////////////////////\n get ControllerOptions() {\n const options = {};\n options['certificateSigningRequest'] = this.certificateSigningRequest.bind(this);\n options['rootCertificate'] = this.rootCertificate.bind(this);\n return options;\n }\n // === Helper methods === //\n writeJson(response, payload, code = 200) {\n let responseString;\n if (!payload) {\n responseString = undefined;\n }\n else if (payload instanceof Error) {\n code = 500;\n responseString = JSON.stringify({ error: payload.message }, null, 2);\n }\n else {\n responseString = JSON.stringify(payload, null, 2);\n }\n response.writeHead(code, { 'Content-Type': 'application/json' });\n response.end(responseString);\n }\n}\nexports.default = HttpApi;\n","module.exports = require(\"http\");","module.exports = require(\"js-yaml\");","module.exports = require(\"connect\");","module.exports = require(\"swagger-tools\");","module.exports = require(\"protobufjs\");","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst os_1 = __importDefault(require(\"os\"));\nconst path_1 = __importDefault(require(\"path\"));\nconst kbpgp_1 = __importDefault(require(\"kbpgp\"));\nconst crypto_1 = __importDefault(require(\"crypto\"));\nconst util_1 = require(\"util\");\nconst PublicKeyInfrastructure_1 = __importDefault(require(\"./pki/PublicKeyInfrastructure\"));\nclass KeyManager {\n constructor(polykeyPath = `${os_1.default.homedir()}/.polykey`, fileSystem, useWebWorkers = false, workerPool) {\n this.primaryKeyPair = { private: null, public: null };\n this.metadata = {\n privateKeyPath: null,\n publicKeyPath: null,\n };\n this.useWebWorkers = useWebWorkers;\n this.workerPool = workerPool;\n this.derivedKeys = new Map();\n this.fileSystem = fileSystem;\n // Load key manager metadata\n this.polykeyPath = polykeyPath;\n this.keypairPath = path_1.default.join(polykeyPath, '.keys');\n if (!this.fileSystem.existsSync(this.keypairPath)) {\n this.fileSystem.mkdirSync(this.keypairPath, { recursive: true });\n }\n this.metadataPath = path_1.default.join(this.keypairPath, 'metadata');\n this.derivedKeysPath = path_1.default.join(this.keypairPath, 'derived-keys');\n this.loadMetadata();\n // Load keys if they were provided\n if (this.metadata.privateKeyPath && this.metadata.publicKeyPath) {\n // Load files into memory\n this.loadKeyPair(this.metadata.publicKeyPath, this.metadata.privateKeyPath);\n }\n /////////\n // PKI //\n /////////\n this.pki = new PublicKeyInfrastructure_1.default(this.polykeyPath, this.fileSystem);\n }\n get identityLoaded() {\n return this.primaryIdentity ? true : false;\n }\n /**\n * Generates a new assymetric key pair (publicKey and privateKey).\n * @param name Name of keypair owner\n * @param email Email of keypair owner\n * @param passphrase Passphrase to lock the keypair\n * @param nbits Size of the new keypair\n * @param replacePrimary If true, the generated keypair becomes the new primary identity of the key manager\n * @param progressCallback A progress hook for keypair generation\n */\n async generateKeyPair(userId, passphrase, nbits = 4096, replacePrimary = false, progressCallback) {\n // kbpgp doesn't seem to work for small nbits so set a minimum of 1024\n if (nbits < 1024) {\n throw Error('nbits must be greater than 1024 for keypair generation');\n }\n // Define options\n const flags = kbpgp_1.default['const'].openpgp;\n const params = {\n asp: progressCallback ? new kbpgp_1.default.ASP({ progress_hook: progressCallback }) : undefined,\n userid: userId,\n primary: {\n nbits: nbits,\n flags: flags.certify_keys | flags.sign_data | flags.auth | flags.encrypt_comm | flags.encrypt_storage,\n expire_in: 0,\n },\n subkeys: [],\n };\n const identity = await util_1.promisify(kbpgp_1.default.KeyManager.generate)(params);\n await util_1.promisify(identity.sign.bind(identity))({});\n // Export pub key first\n const publicKey = await util_1.promisify(identity.export_pgp_public.bind(identity))({});\n // Finally export priv key\n const privateKey = await util_1.promisify(identity.export_pgp_private.bind(identity))({ passphrase: passphrase });\n // Resolve to parent promise\n const keypair = { private: privateKey, public: publicKey };\n if (replacePrimary) {\n // Set the new keypair\n this.primaryKeyPair = keypair;\n // Set the new identity\n this.primaryIdentity = identity;\n // Overwrite in memory\n const privateKeyPath = path_1.default.join(this.keypairPath, 'private_key');\n const publicKeyPath = path_1.default.join(this.keypairPath, 'public_key');\n await this.fileSystem.promises.writeFile(privateKeyPath, keypair.private);\n await this.fileSystem.promises.writeFile(publicKeyPath, keypair.public);\n // Set metadata\n this.metadata.privateKeyPath = privateKeyPath;\n this.metadata.publicKeyPath = publicKeyPath;\n this.writeMetadata();\n }\n return keypair;\n }\n /**\n * Get the primary keypair\n */\n getKeyPair() {\n return this.primaryKeyPair;\n }\n /**\n * Determines whether public key is loaded or not\n */\n hasPublicKey() {\n return this.primaryKeyPair.public ? true : false;\n }\n /**\n * Determines whether public key is loaded or not\n */\n hasPrivateKey() {\n return this.primaryKeyPair.private ? true : false;\n }\n /**\n * Get the public key of the primary keypair\n */\n getPublicKey() {\n if (!this.primaryKeyPair.public) {\n throw Error('public key does not exist in memory');\n }\n return this.primaryKeyPair.public;\n }\n /**\n * Get the private key of the primary keypair\n */\n getPrivateKey() {\n if (!this.primaryKeyPair.private) {\n throw Error('private key does not exist in memory');\n }\n return this.primaryKeyPair.private;\n }\n /**\n * Loads the keypair into the key manager as the primary identity\n * @param publicKey Public Key\n * @param privateKey Private Key\n */\n loadKeyPair(publicKey, privateKey) {\n this.loadPrivateKey(privateKey);\n this.loadPublicKey(publicKey);\n }\n /**\n * Loads the private key into the primary keypair\n * @param privateKey Private Key\n */\n loadPrivateKey(privateKey) {\n let keyBuffer;\n if (typeof privateKey === 'string') {\n keyBuffer = this.fileSystem.readFileSync(privateKey);\n this.metadata.privateKeyPath = privateKey;\n this.writeMetadata();\n }\n else {\n keyBuffer = privateKey;\n }\n this.primaryKeyPair.private = keyBuffer.toString();\n }\n /**\n * Loads the public key into the primary keypair\n * @param publicKey Public Key\n */\n loadPublicKey(publicKey) {\n let keyBuffer;\n if (typeof publicKey === 'string') {\n keyBuffer = this.fileSystem.readFileSync(publicKey);\n this.metadata.publicKeyPath = publicKey;\n this.writeMetadata();\n }\n else {\n keyBuffer = publicKey;\n }\n this.primaryKeyPair.public = keyBuffer.toString();\n }\n /**\n * Loads the primary identity into the key manager from the existing keypair\n * @param passphrase Passphrase to unlock the private key\n */\n async unlockIdentity(passphrase) {\n const publicKey = this.getPublicKey();\n const privateKey = this.getPrivateKey();\n const identity = await util_1.promisify(kbpgp_1.default.KeyManager.import_from_armored_pgp)({ armored: publicKey });\n await util_1.promisify(identity.merge_pgp_private.bind(identity))({ armored: privateKey });\n if (identity.is_pgp_locked.bind(identity)()) {\n await util_1.promisify(identity.unlock_pgp.bind(identity))({ passphrase: passphrase });\n }\n this.primaryIdentity = identity;\n }\n /**\n * Export the primary private key to a specified location\n * @param path Destination path\n */\n exportPrivateKey(path) {\n this.fileSystem.writeFileSync(path, this.primaryKeyPair.private);\n this.metadata.privateKeyPath = path;\n this.writeMetadata();\n }\n /**\n * Export the primary public key to a specified location\n * @param path Destination path\n */\n exportPublicKey(path) {\n this.fileSystem.writeFileSync(path, this.primaryKeyPair.public);\n this.metadata.publicKeyPath = path;\n this.writeMetadata();\n }\n /**\n * Asynchronously Generates a new symmetric key and stores it in the key manager\n * @param name Unique name of the generated key\n * @param passphrase Passphrase to derive the key from\n * @param storeKey Whether to store the key in the key manager\n */\n async generateKey(name, passphrase, storeKey = true) {\n const salt = crypto_1.default.randomBytes(32);\n const key = await util_1.promisify(crypto_1.default.pbkdf2)(passphrase, salt, 10000, 256 / 8, 'sha256');\n if (storeKey) {\n this.derivedKeys[name] = key;\n await this.writeMetadata();\n }\n return key;\n }\n /**\n * Synchronously Generates a new symmetric key and stores it in the key manager\n * @param name Unique name of the generated key\n * @param passphrase Passphrase to derive the key from\n * @param storeKey Whether to store the key in the key manager\n */\n generateKeySync(name, passphrase, storeKey = true) {\n const salt = crypto_1.default.randomBytes(32);\n const key = crypto_1.default.pbkdf2Sync(passphrase, salt, 10000, 256 / 8, 'sha256');\n if (storeKey) {\n this.derivedKeys[name] = key;\n this.writeMetadata();\n }\n return key;\n }\n /**\n * Deletes a derived symmetric key from the key manager\n * @param name Name of the key to be deleted\n */\n async deleteKey(name) {\n const successful = delete this.derivedKeys[name];\n await this.writeMetadata();\n return successful;\n }\n /**\n * List all keys in the current keymanager\n */\n listKeys() {\n return Object.keys(this.derivedKeys);\n }\n /**\n * Synchronously imports an existing key from file or Buffer\n * @param name Unique name of the imported key\n * @param key Key to be imported\n */\n importKeySync(name, key) {\n if (typeof key === 'string') {\n this.derivedKeys[name] = this.fileSystem.readFileSync(key);\n }\n else {\n this.derivedKeys[name] = key;\n }\n }\n /**\n * Asynchronously imports an existing key from file or Buffer\n * @param name Unique name of the imported key\n * @param key Key to be imported\n */\n async importKey(name, key) {\n if (typeof key === 'string') {\n this.derivedKeys[name] = await this.fileSystem.promises.readFile(key);\n }\n else {\n this.derivedKeys[name] = key;\n }\n }\n /**\n * Synchronously exports an existing key from file or Buffer\n * @param name Name of the key to be exported\n * @param dest Destination path\n * @param createPath If set to true, the path is recursively created\n */\n exportKeySync(name, dest, createPath) {\n if (!this.derivedKeys.has(name)) {\n throw Error(`There is no key loaded for name: ${name}`);\n }\n if (createPath) {\n this.fileSystem.mkdirSync(path_1.default.dirname(dest), { recursive: true });\n }\n this.fileSystem.writeFileSync(dest, this.derivedKeys[name]);\n }\n /**\n * Asynchronously exports an existing key from file or Buffer\n * @param name Name of the key to be exported\n * @param dest Destination path\n * @param createPath If set to true, the path is recursively created\n */\n async exportKey(name, dest, createPath) {\n if (!this.derivedKeys.has(name)) {\n throw Error(`There is no key loaded for name: ${name}`);\n }\n if (createPath) {\n await this.fileSystem.promises.mkdir(path_1.default.dirname(dest), { recursive: true });\n }\n await this.fileSystem.promises.writeFile(dest, this.derivedKeys[name]);\n }\n /**\n * Loads an identity from the given public key\n * @param publicKey Buffer containing the public key\n */\n async getIdentityFromPublicKey(publicKey) {\n const identity = await util_1.promisify(kbpgp_1.default.KeyManager.import_from_armored_pgp)({ armored: publicKey });\n return identity;\n }\n /**\n * Loads an identity from the given private key\n * @param publicKey Buffer containing the public key\n */\n async getIdentityFromPrivateKey(privateKey, passphrase) {\n const identity = await util_1.promisify(kbpgp_1.default.KeyManager.import_from_armored_pgp)({ armored: privateKey });\n if (identity.is_pgp_locked()) {\n await util_1.promisify(identity.unlock_pgp.bind(identity))({ passphrase });\n }\n return identity;\n }\n /**\n * Signs the given data with the provided key or the primary key if none is specified\n * @param data Buffer or file containing the data to be signed\n * @param privateKey Buffer containing the key to sign with. Defaults to primary private key if no key is given.\n * @param keyPassphrase Required if privateKey is provided.\n */\n async signData(data, privateKey, keyPassphrase) {\n let resolvedIdentity;\n if (privateKey) {\n if (!keyPassphrase) {\n throw Error('passphrase for private key was not provided');\n }\n resolvedIdentity = await this.getIdentityFromPrivateKey(privateKey, keyPassphrase);\n }\n else if (this.primaryIdentity) {\n resolvedIdentity = this.primaryIdentity;\n }\n else {\n throw Error('key pair is not loaded');\n }\n if (this.useWebWorkers && this.workerPool) {\n const workerResponse = await this.workerPool.queue(async (workerCrypto) => {\n return await workerCrypto.signData(data, resolvedIdentity);\n });\n return workerResponse;\n }\n else {\n const params = {\n msg: data.toString(),\n sign_with: resolvedIdentity,\n };\n const result_string = await util_1.promisify(kbpgp_1.default.box)(params);\n return Buffer.from(result_string);\n }\n }\n /**\n * Signs the given file with the provided key or the primary key if none is specified\n * @param filePath Path to file containing the data to be signed\n * @param privateKey The key to sign with. Defaults to primary public key if no key is given.\n * @param keyPassphrase Required if privateKey is provided.\n */\n async signFile(filePath, privateKey, keyPassphrase) {\n // Get key if provided\n let keyBuffer;\n if (privateKey) {\n if (typeof privateKey === 'string') {\n // Path\n // Read in from fs\n keyBuffer = this.fileSystem.readFileSync(privateKey);\n }\n else {\n // Buffer\n keyBuffer = privateKey;\n }\n }\n // Read file into buffer\n const buffer = this.fileSystem.readFileSync(filePath);\n // Sign the buffer\n const signedBuffer = await this.signData(buffer, keyBuffer, keyPassphrase);\n // Write buffer to signed file\n const signedPath = `${filePath}.sig`;\n this.fileSystem.writeFileSync(signedPath, signedBuffer);\n return signedPath;\n }\n /**\n * Verifies the given data with the provided key or the primary key if none is specified\n * @param data Buffer or file containing the data to be verified\n * @param publicKey Buffer containing the key to verify with. Defaults to primary public key if no key is given.\n */\n async verifyData(data, publicKey) {\n const ring = new kbpgp_1.default.keyring.KeyRing();\n let resolvedIdentity;\n if (publicKey) {\n resolvedIdentity = await this.getIdentityFromPublicKey(publicKey);\n }\n else if (this.primaryIdentity) {\n resolvedIdentity = this.primaryIdentity;\n }\n else {\n throw Error('key pair is not loaded');\n }\n ring.add_key_manager(resolvedIdentity);\n if (this.useWebWorkers && this.workerPool) {\n const workerResponse = await this.workerPool.queue(async (workerCrypto) => {\n return await workerCrypto.verifyData(data, resolvedIdentity);\n });\n return workerResponse;\n }\n else {\n const params = {\n armored: data,\n keyfetch: ring,\n };\n const literals = await util_1.promisify(kbpgp_1.default.unbox)(params);\n // get the verified message\n const verifiedMessage = Buffer.from(literals[0].toString());\n // Get the identity that signed the data if any\n let dataSigner = literals[0].get_data_signer();\n // Retrieve the key manager associated with that data signer\n let verifiedKM;\n if (dataSigner) {\n verifiedKM = dataSigner.get_key_manager();\n }\n if (!verifiedKM) {\n throw Error('data could not be verified: could not determine data signer');\n }\n // If we know the pgp finger print then we say the data is verified.\n // Otherwise it is unverified.\n const actualFingerprint = verifiedKM.get_pgp_fingerprint().toString('hex');\n const expectedFingerprint = resolvedIdentity.get_pgp_fingerprint().toString('hex');\n if (actualFingerprint == expectedFingerprint) {\n return verifiedMessage;\n }\n else {\n throw Error('data could not be verified: actual and expected data signer pgp fingerprint mismatch');\n }\n }\n }\n /**\n * Verifies the given file with the provided key or the primary key if none is specified\n * @param filePath Path to file containing the data to be verified\n * @param publicKey Buffer containing the key to verify with. Defaults to primary public key if no key is given.\n */\n async verifyFile(filePath, publicKey) {\n // Get key if provided\n let keyBuffer;\n if (publicKey) {\n if (typeof publicKey === 'string') {\n // Path\n // Read in from fs\n keyBuffer = this.fileSystem.readFileSync(publicKey);\n }\n else {\n // Buffer\n keyBuffer = publicKey;\n }\n }\n // Read in file buffer and signature\n const signatureBuffer = this.fileSystem.readFileSync(filePath);\n const verifiedMessage = await this.verifyData(signatureBuffer, keyBuffer);\n this.fileSystem.writeFileSync(filePath, verifiedMessage);\n return true;\n }\n /**\n * Encrypts the given data for a specific public key\n * @param data The data to be encrypted\n * @param publicKey The key to encrypt for\n */\n async encryptData(data, publicKey) {\n let resolvedIdentity;\n if (publicKey) {\n resolvedIdentity = await this.getIdentityFromPublicKey(publicKey);\n }\n else if (this.primaryIdentity) {\n resolvedIdentity = this.primaryIdentity;\n }\n else {\n throw Error(`Identity could not be resolved for encrypting`);\n }\n if (this.useWebWorkers && this.workerPool) {\n const workerResponse = await this.workerPool.queue(async (workerCrypto) => {\n return await workerCrypto.encryptData(data, resolvedIdentity);\n });\n return workerResponse;\n }\n else {\n const params = {\n msg: data,\n encrypt_for: resolvedIdentity,\n };\n const result_string = await util_1.promisify(kbpgp_1.default.box)(params);\n return Buffer.from(result_string);\n }\n }\n /**\n * Encrypts the given file for a specific public key\n * @param filePath Path to file containing the data to be encrypted\n * @param publicKey Buffer containing the key to verify with. Defaults to primary public key if no key is given.\n */\n async encryptFile(filePath, publicKey) {\n // Get key if provided\n let keyBuffer;\n if (publicKey) {\n if (typeof publicKey === 'string') {\n // Read in from fs\n keyBuffer = this.fileSystem.readFileSync(publicKey);\n }\n else {\n // Buffer\n keyBuffer = publicKey;\n }\n }\n // Read file into buffer\n const buffer = this.fileSystem.readFileSync(filePath);\n // Encrypt the buffer\n const encryptedBuffer = await this.encryptData(buffer, keyBuffer);\n // Write buffer to encrypted file\n this.fileSystem.writeFileSync(filePath, encryptedBuffer);\n return filePath;\n }\n /**\n * Decrypts the given data with the provided key or the primary key if none is given\n * @param data The data to be decrypted\n * @param privateKey The key to decrypt with. Defaults to primary private key if no key is given.\n * @param keyPassphrase Required if privateKey is provided.\n */\n async decryptData(data, privateKey, keyPassphrase) {\n var ring = new kbpgp_1.default.keyring.KeyRing();\n let resolvedIdentity;\n if (privateKey) {\n if (keyPassphrase) {\n resolvedIdentity = await this.getIdentityFromPrivateKey(privateKey, keyPassphrase);\n }\n else {\n throw Error('A key passphrase must be supplied if a privateKey is specified');\n }\n }\n else if (this.primaryIdentity) {\n resolvedIdentity = this.primaryIdentity;\n }\n else {\n throw Error('no identity available for decrypting');\n }\n if (this.useWebWorkers && this.workerPool) {\n const workerResponse = await this.workerPool.queue(async (workerCrypto) => {\n return await workerCrypto.decryptData(data, resolvedIdentity);\n });\n return workerResponse;\n }\n else {\n ring.add_key_manager(resolvedIdentity);\n const params = {\n armored: data.toString(),\n keyfetch: ring,\n };\n const literals = await util_1.promisify(kbpgp_1.default.unbox)(params);\n const decryptedData = Buffer.from(literals[0].toString());\n return decryptedData;\n }\n }\n /**\n * Decrypts the given file with the provided key or the primary key if none is given\n * @param filePath Path to file containing the data to be decrypted\n * @param privateKey The key to decrypt with. Defaults to primary private key if no key is given.\n * @param keyPassphrase Required if privateKey is provided.\n */\n async decryptFile(filePath, privateKey, keyPassphrase) {\n // Get key if provided\n let keyBuffer;\n if (privateKey) {\n if (typeof privateKey === 'string') {\n // Read in from fs\n keyBuffer = this.fileSystem.readFileSync(privateKey);\n }\n else {\n // Buffer\n keyBuffer = privateKey;\n }\n }\n // Read in file buffer\n const fileBuffer = this.fileSystem.readFileSync(filePath);\n // Decrypt file buffer\n const decryptedData = await this.decryptData(fileBuffer, keyBuffer, keyPassphrase);\n // Write buffer to decrypted file\n this.fileSystem.writeFileSync(filePath, decryptedData);\n return filePath;\n }\n /* ============ HELPERS =============== */\n /**\n * Get the key for a given name\n * @param name The unique name of the desired key\n */\n getKey(name) {\n return this.derivedKeys[name];\n }\n /**\n * Determines if the Key Manager has a certain key\n * @param name The unique name of the desired key\n */\n hasKey(name) {\n if (this.derivedKeys[name]) {\n return true;\n }\n return false;\n }\n async writeMetadata() {\n const metadata = JSON.stringify(this.metadata);\n this.fileSystem.writeFileSync(this.metadataPath, metadata);\n this.writeEncryptedMetadata();\n }\n async writeEncryptedMetadata() {\n // Store the keys if identity is loaded\n if (this.identityLoaded) {\n const derivedKeys = JSON.stringify(this.derivedKeys);\n const encryptedMetadata = await this.encryptData(Buffer.from(derivedKeys));\n await this.fileSystem.promises.writeFile(this.derivedKeysPath, encryptedMetadata);\n }\n }\n loadMetadata() {\n // Check if file exists\n if (this.fileSystem.existsSync(this.metadataPath)) {\n const metadata = this.fileSystem.readFileSync(this.metadataPath).toString();\n this.metadata = JSON.parse(metadata);\n this.loadEncryptedMetadata();\n }\n }\n async loadEncryptedMetadata() {\n if (this.identityLoaded && this.fileSystem.existsSync(this.derivedKeysPath)) {\n const encryptedMetadata = this.fileSystem.readFileSync(this.derivedKeysPath);\n const metadata = (await this.decryptData(encryptedMetadata)).toString();\n const derivedKeys = JSON.parse(metadata);\n for (const key of Object.keys(derivedKeys)) {\n this.derivedKeys[key] = Buffer.from(derivedKeys[key]);\n }\n }\n }\n}\nexports.default = KeyManager;\n","module.exports = require(\"kbpgp\");","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst path_1 = __importDefault(require(\"path\"));\nconst node_forge_1 = require(\"node-forge\");\n/**\n * This class manages X.509 certificates for secure and authenticated communication between peers.\n */\nclass PublicKeyInfrastructure {\n constructor(polykeyPath, fileSystem) {\n var _a;\n this.commonName = (_a = process.env.PK_HOST) !== null && _a !== void 0 ? _a : 'localhost';\n this.pkiPath = path_1.default.join(polykeyPath, '.pki');\n this.pkiFs = fileSystem;\n this.loadMetadata();\n }\n get CACertificates() {\n return this.CAStore.listAllCertificates()\n .map((c) => node_forge_1.pki.certificateToPem(c))\n .join('\\n');\n }\n get TLSClientCredentials() {\n if (this.certificate) {\n return {\n privateKey: node_forge_1.pki.privateKeyToPem(this.keypair.privateKey),\n certificate: node_forge_1.pki.certificateToPem(this.certificate),\n rootCertificate: this.CACertificates,\n };\n }\n else {\n return undefined;\n }\n }\n get TLSServerCredentials() {\n if (this.certificate) {\n return {\n privateKey: node_forge_1.pki.privateKeyToPem(this.keypair.privateKey),\n certificate: node_forge_1.pki.certificateToPem(this.certificate),\n rootCertificate: this.CACertificates,\n };\n }\n else {\n return undefined;\n }\n }\n get RootCert() {\n return node_forge_1.pki.certificateToPem(this.rootCertificate);\n }\n // private createCACertificate(\n createCACertificate(organizationName = 'MatrixAI') {\n const certificate = node_forge_1.pki.createCertificate();\n certificate.publicKey = this.rootKeypair.publicKey;\n certificate.serialNumber = '01';\n certificate.validity.notBefore = new Date();\n certificate.validity.notAfter = new Date();\n certificate.validity.notAfter.setFullYear(certificate.validity.notBefore.getFullYear() + 1);\n const attrs = [\n {\n name: 'commonName',\n value: this.commonName,\n },\n {\n name: 'organizationName',\n value: organizationName,\n },\n ];\n certificate.setSubject(attrs);\n certificate.setIssuer(attrs);\n certificate.setExtensions([\n {\n name: 'basicConstraints',\n cA: true,\n },\n {\n name: 'keyUsage',\n keyCertSign: true,\n digitalSignature: true,\n nonRepudiation: true,\n keyEncipherment: true,\n dataEncipherment: true,\n },\n {\n name: 'extKeyUsage',\n serverAuth: true,\n clientAuth: true,\n codeSigning: true,\n emailProtection: true,\n timeStamping: true,\n },\n {\n name: 'nsCertType',\n client: true,\n server: true,\n email: true,\n objsign: true,\n sslCA: true,\n emailCA: true,\n objCA: true,\n },\n {\n name: 'subjectKeyIdentifier',\n },\n ]);\n certificate.sign(this.rootKeypair.privateKey);\n return certificate;\n }\n createCSR(commonName, challengePassword) {\n // create a certification request (CSR)\n const csr = node_forge_1.pki.createCertificationRequest();\n csr.serialNumber = '01';\n csr.publicKey = this.keypair.publicKey;\n csr.setSubject([\n {\n name: 'commonName',\n value: commonName,\n },\n {\n name: 'countryName',\n value: 'US',\n },\n {\n shortName: 'ST',\n value: 'Virginia',\n },\n {\n name: 'localityName',\n value: 'Blacksburg',\n },\n {\n name: 'organizationName',\n value: 'Test',\n },\n {\n shortName: 'OU',\n value: 'Test',\n },\n ]);\n // set (optional) attributes\n csr.setAttributes([\n {\n name: 'challengePassword',\n value: 'password',\n },\n {\n name: 'unstructuredName',\n value: 'My company',\n },\n ]);\n csr.sign(this.keypair.privateKey);\n return node_forge_1.pki.certificationRequestToPem(csr);\n }\n createAgentServerCredentials() {\n const keypair = node_forge_1.pki.rsa.generateKeyPair();\n // create a certification request (CSR)\n const csr = node_forge_1.pki.createCertificationRequest();\n csr.serialNumber = '01';\n csr.publicKey = keypair.publicKey;\n csr.setSubject([\n {\n name: 'commonName',\n value: 'localhost',\n },\n {\n name: 'countryName',\n value: 'US',\n },\n {\n shortName: 'ST',\n value: 'Virginia',\n },\n {\n name: 'localityName',\n value: 'Blacksburg',\n },\n {\n name: 'organizationName',\n value: 'Test',\n },\n {\n shortName: 'OU',\n value: 'Test',\n },\n ]);\n // set (optional) attributes\n csr.setAttributes([\n {\n name: 'challengePassword',\n value: 'password',\n },\n {\n name: 'unstructuredName',\n value: 'My company',\n },\n ]);\n csr.sign(keypair.privateKey);\n const csrPem = node_forge_1.pki.certificationRequestToPem(csr);\n const cert = this.handleCSR(csrPem);\n return {\n serverCert: cert,\n serverKeyPair: {\n private: node_forge_1.pki.privateKeyToPem(keypair.privateKey),\n public: node_forge_1.pki.publicKeyToPem(keypair.publicKey),\n },\n };\n }\n createAgentClientCredentials() {\n const keypair = node_forge_1.pki.rsa.generateKeyPair();\n // create a certification request (CSR)\n const csr = node_forge_1.pki.createCertificationRequest();\n csr.serialNumber = '01';\n csr.publicKey = keypair.publicKey;\n csr.setSubject([\n {\n name: 'commonName',\n value: 'localhost',\n },\n {\n name: 'countryName',\n value: 'US',\n },\n {\n shortName: 'ST',\n value: 'Virginia',\n },\n {\n name: 'localityName',\n value: 'Blacksburg',\n },\n {\n name: 'organizationName',\n value: 'Test',\n },\n {\n shortName: 'OU',\n value: 'Test',\n },\n ]);\n // set (optional) attributes\n csr.setAttributes([\n {\n name: 'challengePassword',\n value: 'password',\n },\n {\n name: 'unstructuredName',\n value: 'My company',\n },\n ]);\n csr.sign(keypair.privateKey);\n const csrPem = node_forge_1.pki.certificationRequestToPem(csr);\n const cert = this.handleCSR(csrPem);\n return {\n clientCert: cert,\n clientKeyPair: {\n private: node_forge_1.pki.privateKeyToPem(keypair.privateKey),\n public: node_forge_1.pki.publicKeyToPem(keypair.publicKey),\n },\n };\n }\n importCertificate(certString) {\n this.certificate = node_forge_1.pki.certificateFromPem(certString);\n }\n addCA(certString) {\n this.CAStore.addCertificate(certString);\n }\n handleCSR(csrPem) {\n var _a;\n const csr = node_forge_1.pki.certificationRequestFromPem(csrPem);\n // verify certification request\n try {\n if (!csr.verify(csr)) {\n throw new Error('Signature not verified.');\n }\n }\n catch (err) {\n throw new Error('Signature not verified.');\n }\n // TODO validate challenge password\n const challengePassword = csr.getAttribute({ name: 'challengePassword' });\n const cert = node_forge_1.pki.createCertificate();\n cert.serialNumber = '01';\n cert.validity.notBefore = new Date();\n cert.validity.notAfter = new Date();\n cert.validity.notAfter.setFullYear(cert.validity.notBefore.getFullYear() + 1);\n cert.setSubject(csr.subject.attributes);\n cert.setIssuer(this.rootCertificate.issuer.attributes);\n cert.publicKey = csr.publicKey;\n cert.setExtensions([\n ...((_a = csr.extensions) !== null && _a !== void 0 ? _a : []),\n {\n name: 'basicConstraints',\n cA: true,\n },\n {\n name: 'keyUsage',\n keyCertSign: true,\n digitalSignature: true,\n nonRepudiation: true,\n keyEncipherment: true,\n dataEncipherment: true,\n },\n {\n name: 'extKeyUsage',\n serverAuth: true,\n clientAuth: true,\n codeSigning: true,\n emailProtection: true,\n timeStamping: true,\n },\n {\n name: 'nsCertType',\n client: true,\n server: true,\n email: true,\n objsign: true,\n sslCA: true,\n emailCA: true,\n objCA: true,\n },\n {\n name: 'subjectKeyIdentifier',\n },\n ]);\n // sign certificate\n cert.sign(this.rootKeypair.privateKey);\n // return certificate in pem form\n return node_forge_1.pki.certificateToPem(cert);\n }\n // ===== Helper methods ===== //\n loadMetadata() {\n if (this.pkiFs) {\n // make the pkiPath directory\n this.pkiFs.mkdirSync(this.pkiPath, { recursive: true });\n // load keypair\n const keypairPath = path_1.default.join(this.pkiPath, 'keypair');\n if (this.pkiFs.existsSync(keypairPath)) {\n this.keypair = this.jsonToKeyPair(this.pkiFs.readFileSync(keypairPath).toString());\n }\n else {\n // create the keypair if it doesn't exist\n this.keypair = node_forge_1.pki.rsa.generateKeyPair();\n }\n // load root keypair\n const rootKeypairPath = path_1.default.join(this.pkiPath, 'root_keypair');\n if (this.pkiFs.existsSync(rootKeypairPath)) {\n this.rootKeypair = this.jsonToKeyPair(this.pkiFs.readFileSync(rootKeypairPath).toString());\n }\n else {\n // create the keypair if it doesn't exist\n this.rootKeypair = node_forge_1.pki.rsa.generateKeyPair();\n }\n // load certificate\n const certificatePath = path_1.default.join(this.pkiPath, 'certificate');\n if (this.pkiFs.existsSync(certificatePath)) {\n this.certificate = node_forge_1.pki.certificateFromPem(this.pkiFs.readFileSync(certificatePath).toString());\n }\n // load root certificate\n const rootCertificatePath = path_1.default.join(this.pkiPath, 'root_certificate');\n if (this.pkiFs.existsSync(rootCertificatePath)) {\n this.rootCertificate = node_forge_1.pki.certificateFromPem(this.pkiFs.readFileSync(rootCertificatePath).toString());\n }\n else {\n // create the certificate if it doesn't exist\n this.rootCertificate = this.createCACertificate();\n }\n // CA store\n const parsedCertificates = [];\n const caStorePath = path_1.default.join(this.pkiPath, 'ca_store_certificates');\n if (this.pkiFs.existsSync(caStorePath)) {\n const certificates = JSON.parse(this.pkiFs.readFileSync(caStorePath).toString());\n parsedCertificates.push(...certificates.map((c) => node_forge_1.pki.certificateFromPem(c)));\n }\n this.CAStore = node_forge_1.pki.createCaStore(parsedCertificates);\n // this is a little recursive but necessary since we initialize all the variables if they are empty in this method\n this.writeMetadata();\n }\n }\n writeMetadata() {\n if (this.pkiFs) {\n // write keypairs\n this.pkiFs.writeFileSync(path_1.default.join(this.pkiPath, 'keypair'), Buffer.from(this.keyPairToJSON(this.keypair)));\n this.pkiFs.writeFileSync(path_1.default.join(this.pkiPath, 'root_keypair'), Buffer.from(this.keyPairToJSON(this.rootKeypair)));\n // write certificates\n if (this.certificate) {\n this.pkiFs.writeFileSync(path_1.default.join(this.pkiPath, 'certificate'), Buffer.from(node_forge_1.pki.certificateToPem(this.certificate)));\n }\n this.pkiFs.writeFileSync(path_1.default.join(this.pkiPath, 'root_certificate'), Buffer.from(node_forge_1.pki.certificateToPem(this.rootCertificate)));\n // write ca store\n const certsJson = JSON.stringify(this.CAStore.listAllCertificates().map((c) => node_forge_1.pki.certificateToPem(c)));\n this.pkiFs.writeFileSync(path_1.default.join(this.pkiPath, 'ca_store_certificates'), certsJson);\n }\n }\n // === Helper Methods === //\n keyPairToJSON(keypair) {\n const obj = {\n privateKey: node_forge_1.pki.privateKeyToPem(keypair.privateKey),\n publicKey: node_forge_1.pki.publicKeyToPem(keypair.publicKey),\n };\n return JSON.stringify(obj);\n }\n jsonToKeyPair(json) {\n const obj = JSON.parse(json);\n return {\n privateKey: node_forge_1.pki.privateKeyFromPem(obj.privateKey),\n publicKey: node_forge_1.pki.publicKeyFromPem(obj.publicKey),\n };\n }\n}\nexports.default = PublicKeyInfrastructure;\n","module.exports = require(\"node-forge\");","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst os_1 = __importDefault(require(\"os\"));\nconst path_1 = __importDefault(require(\"path\"));\nconst TurnClient_1 = __importDefault(require(\"./turn/TurnClient\"));\nconst Peer_1 = require(\"../../proto/js/Peer\");\nconst PeerInfo_1 = __importDefault(require(\"../peers/PeerInfo\"));\nconst PeerServer_1 = __importDefault(require(\"./peer-connection/PeerServer\"));\nconst PeerConnection_1 = __importDefault(require(\"./peer-connection/PeerConnection\"));\nconst MulticastBroadcaster_1 = __importDefault(require(\"../peers/MulticastBroadcaster\"));\nconst keybaseDiscovery = {\n name: 'Keybase',\n findUser: async (handle, service) => {\n const url = `https://keybase.io/_/api/1.0/user/lookup.json?${service}=${handle}`;\n try {\n const response = await fetch(url);\n const data = await response.json();\n const pubKey = data.them[0].public_keys.primary.bundle;\n return pubKey;\n }\n catch (err) {\n throw Error(`User was not found: ${err.message}`);\n }\n },\n};\nclass PeerManager {\n constructor(polykeyPath = `${os_1.default.homedir()}/.polykey`, fileSystem, keyManager, peerInfo, socialDiscoveryServices = []) {\n this.fileSystem = fileSystem;\n this.peerStore = new Map();\n this.fileSystem.mkdirSync(polykeyPath, { recursive: true });\n this.peerInfoMetadataPath = path_1.default.join(polykeyPath, '.peerInfo');\n this.peerStoreMetadataPath = path_1.default.join(polykeyPath, '.peerStore');\n // Set given variables\n this.keyManager = keyManager;\n this.socialDiscoveryServices = socialDiscoveryServices;\n // Load metadata with peer info\n this.loadMetadata();\n // Load peer store and local peer info\n if (peerInfo) {\n this.peerInfo = peerInfo;\n this.writeMetadata();\n }\n else if (this.keyManager.hasPublicKey()) {\n this.peerInfo = new PeerInfo_1.default(this.keyManager.getPublicKey());\n }\n this.socialDiscoveryServices = [];\n this.socialDiscoveryServices.push(keybaseDiscovery);\n for (const service of socialDiscoveryServices) {\n this.socialDiscoveryServices.push(service);\n }\n this.multicastBroadcaster = new MulticastBroadcaster_1.default(this, this.keyManager);\n ////////////\n // Server //\n ////////////\n this.peerServer = new PeerServer_1.default(this, this.keyManager);\n this.peerConnections = new Map();\n /////////////////\n // TURN Client //\n /////////////////\n this.turnClient = new TurnClient_1.default(this);\n }\n toggleStealthMode(active) {\n if (!this.stealthMode && active) {\n this.multicastBroadcaster.stopBroadcasting();\n }\n else if (this.stealthMode && !active) {\n this.multicastBroadcaster.startListening();\n }\n this.stealthMode = active;\n }\n setGitHandler(handler) {\n this.peerServer.handleGitRequest = handler;\n }\n setNatHandler(handler) {\n this.peerServer.handleNatRequest = handler;\n }\n ////////////////\n // Peer store //\n ////////////////\n /**\n * Add a peer's info to the peerStore\n * @param peerInfo Info of the peer to be added\n */\n addPeer(peerInfo) {\n const publicKey = PeerInfo_1.default.formatPublicKey(peerInfo.publicKey);\n if (this.hasPeer(publicKey)) {\n throw Error('peer already exists in peer store');\n }\n this.peerStore.set(publicKey, peerInfo.deepCopy());\n this.writeMetadata();\n }\n /**\n * Update a peer's info in the peerStore\n * @param peerInfo Info of the peer to be updated\n */\n updatePeer(peerInfo) {\n const publicKey = PeerInfo_1.default.formatPublicKey(peerInfo.publicKey);\n if (!this.hasPeer(publicKey)) {\n throw Error('peer does not exist in peer store');\n }\n this.peerStore.set(publicKey, peerInfo.deepCopy());\n this.writeMetadata();\n }\n /**\n * Retrieves a peer for the given public key\n * @param publicKey Public key of the desired peer\n */\n getPeer(publicKey) {\n var _a, _b;\n return (_b = (_a = this.peerStore.get(PeerInfo_1.default.formatPublicKey(publicKey))) === null || _a === void 0 ? void 0 : _a.deepCopy()) !== null && _b !== void 0 ? _b : null;\n }\n /**\n * Determines if the peerStore contains the desired peer\n * @param publicKey Public key of the desired peer\n */\n hasPeer(publicKey) {\n return this.peerStore.has(PeerInfo_1.default.formatPublicKey(publicKey));\n }\n /**\n * List all peer public keys in the peer store\n */\n listPeers() {\n return Array.from(this.peerStore.values()).map((p) => p.publicKey);\n }\n //////////////////////\n // Social discovery //\n //////////////////////\n /**\n * Finds an existing peer using multicast peer discovery\n * @param publicKey Public key of the desired peer\n */\n async findPublicKey(publicKey, timeout) {\n return new Promise((resolve, reject) => {\n this.multicastBroadcaster.startListening();\n this.multicastBroadcaster.on('found', (foundPublicKey) => {\n if (PeerInfo_1.default.formatPublicKey(foundPublicKey) == PeerInfo_1.default.formatPublicKey(publicKey)) {\n resolve(true);\n }\n });\n setTimeout(() => reject(Error('peer discovery timed out')), timeout && timeout != 0 ? timeout : 5e4);\n });\n }\n /**\n * Finds an existing peer given a social service and handle\n * @param username Username (e.g. @github/john-smith)\n */\n async findSocialUser(handle, service, timeout) {\n // parse with regex\n const tasks = this.socialDiscoveryServices.map((s) => s.findUser(handle, service));\n const pubKeyOrFail = await Promise.race(tasks);\n if (!pubKeyOrFail) {\n throw Error('Could not find public key from services');\n }\n return await this.findPublicKey(pubKeyOrFail, timeout);\n }\n ///////////////////////\n // Peers Connections //\n ///////////////////////\n /**\n * Get a secure connection to the peer\n * @param publicKey Public key of an existing peer or address of new peer\n */\n connectToPeer(publicKey) {\n // Throw error if trying to connect to self\n if (publicKey == this.peerInfo.publicKey) {\n throw Error('Cannot connect to self');\n }\n const existingSocket = this.peerConnections.get(publicKey);\n if (existingSocket) {\n return existingSocket;\n }\n // try to create a connection to the address\n const peerConnection = new PeerConnection_1.default(publicKey, this.keyManager, this);\n this.peerConnections.set(publicKey, peerConnection);\n return peerConnection;\n }\n async pingPeer(publicKey, timeout) {\n const peerConnection = this.connectToPeer(publicKey);\n return await peerConnection.pingPeer(timeout);\n }\n /* ============ HELPERS =============== */\n writeMetadata() {\n var _a, _b;\n // write peer info\n const peerInfo = this.peerInfo;\n const metadata = Peer_1.peerInterface.PeerInfoMessage.encodeDelimited({\n publicKey: peerInfo.publicKey,\n peerAddress: (_a = peerInfo.peerAddress) === null || _a === void 0 ? void 0 : _a.toString(),\n relayPublicKey: peerInfo.relayPublicKey,\n }).finish();\n this.fileSystem.writeFileSync(this.peerInfoMetadataPath, metadata);\n // write peer store\n const peerInfoList = [];\n for (const [publicKey, peerInfo] of this.peerStore) {\n peerInfoList.push(new Peer_1.peerInterface.PeerInfoMessage({\n publicKey: peerInfo.publicKey,\n peerAddress: (_b = peerInfo.peerAddress) === null || _b === void 0 ? void 0 : _b.toString(),\n relayPublicKey: peerInfo.relayPublicKey,\n }));\n }\n const peerStoreMetadata = Peer_1.peerInterface.PeerInfoListMessage.encodeDelimited({ peerInfoList }).finish();\n this.fileSystem.writeFileSync(this.peerStoreMetadataPath, peerStoreMetadata);\n }\n loadMetadata() {\n var _a, _b, _c;\n // load peer info if path exists\n if (this.fileSystem.existsSync(this.peerInfoMetadataPath)) {\n const metadata = this.fileSystem.readFileSync(this.peerInfoMetadataPath);\n const { publicKey, relayPublicKey, peerAddress, apiAddress } = Peer_1.peerInterface.PeerInfoMessage.decodeDelimited(metadata);\n this.peerInfo = new PeerInfo_1.default(publicKey, relayPublicKey, peerAddress, apiAddress);\n }\n // load peer store if path exists\n if (this.fileSystem.existsSync(this.peerStoreMetadataPath)) {\n const metadata = this.fileSystem.readFileSync(this.peerStoreMetadataPath);\n const { peerInfoList } = Peer_1.peerInterface.PeerInfoListMessage.decodeDelimited(metadata);\n for (const peerInfoMessage of peerInfoList) {\n const peerInfo = new PeerInfo_1.default(peerInfoMessage.publicKey, (_a = peerInfoMessage.relayPublicKey) !== null && _a !== void 0 ? _a : undefined, (_b = peerInfoMessage.peerAddress) !== null && _b !== void 0 ? _b : undefined, (_c = peerInfoMessage.apiAddress) !== null && _c !== void 0 ? _c : undefined);\n this.peerStore.set(peerInfo.publicKey, peerInfo);\n }\n }\n }\n}\nexports.default = PeerManager;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// adapted from https://github.com/advance512/nat-traversal\nconst net_1 = __importDefault(require(\"net\"));\nconst events_1 = require(\"events\");\nconst PeerInfo_1 = require(\"../PeerInfo\");\nconst Peer_1 = require(\"../../../proto/js/Peer\");\nconst Peer_pb_1 = require(\"../../../proto/compiled/Peer_pb\");\nconst UDPHolePunchClient_1 = __importDefault(require(\"../udp-hole-punch/UDPHolePunchClient\"));\nlet socketPipeId = 1;\nclass SocketPipe extends events_1.EventEmitter {\n constructor(localAddress, relayAddress) {\n super();\n this.id = socketPipeId;\n socketPipeId += 1;\n this.localAddress = localAddress;\n this.relayAddress = relayAddress;\n this.targetSocketPending = true;\n this.buffer = [];\n console.log(`[client-relay:${this.id}] Created new pending SocketPipe.`);\n this.openRelayEnd();\n }\n openRelayEnd() {\n console.log(`[client-relay:${this.id}] Socket pipe will TCP connection to connect to relay server.`);\n this.relaySocket = net_1.default.connect(this.relayAddress.port, this.relayAddress.host, () => {\n console.log(`[client-relay:${this.id}] Created new TCP connection.`);\n // Configure socket for keeping connections alive\n this.relaySocket.setKeepAlive(true, 120 * 1000);\n });\n // We have a relay socket - now register its handlers\n // On data\n this.relaySocket.on('data', (data) => {\n // Got data - do we have a target socket?\n if (this.targetSocket === undefined) {\n // Create a target socket for the relay socket - connecting to the target\n this.openTargetEnd();\n this.emit('pair');\n }\n // Is the target socket still connecting? If so, are we buffering data?\n if (this.targetSocketPending) {\n // Store the data until we have a target socket\n this.buffer[this.buffer.length] = data;\n }\n else {\n try {\n // Or just pass it directly\n this.targetSocket.write(data);\n }\n catch (ex) {\n console.error(`[client-relay:${this.id}] Error writing to target socket: `, ex);\n }\n }\n });\n // On closing\n this.relaySocket.on('close', (hadError) => {\n if (hadError) {\n console.error(`[client-relay:${this.id}] Relay socket closed with error.`);\n }\n if (this.targetSocket !== undefined) {\n // Destroy the other socket\n this.targetSocket.destroy();\n }\n else {\n // Signal we are closing - server closed the connection\n this.emit('close');\n }\n });\n this.relaySocket.on('error', (error) => {\n console.error(`[client-relay:${this.id}] Error with relay socket: `, error);\n });\n }\n openTargetEnd() {\n console.log(`[client-relay:${this.id}] Authorized by relay server. Creating new connection to target ${this.localAddress.toString()}...`);\n console.log(`[client-target:${this.id}] Socket pipe will TCP connection to connect to target server.`);\n // Or use TCP\n this.targetSocket = net_1.default.connect(this.localAddress.port, this.localAddress.host, () => {\n console.log(`[client-target:${this.id}] Successfully connected to target ${this.localAddress.toString()}.`);\n // Configure socket for keeping connections alive\n this.targetSocket.setKeepAlive(true, 120 * 1000);\n // Connected, not pending anymore\n this.targetSocketPending = false;\n // And if we have any buffered data, forward it\n try {\n for (const bufferItem of this.buffer) {\n this.targetSocket.write(bufferItem);\n }\n }\n catch (ex) {\n console.error(`[client-target:${this.id}] Error writing to target socket: `, ex);\n }\n // Clear the array\n this.buffer.length = 0;\n });\n // Got data from the target socket?\n this.targetSocket.on('data', (data) => {\n try {\n // Forward it!\n this.relaySocket.write(data);\n }\n catch (ex) {\n console.error(`target:${this.id}] Error writing to target socket: `, ex);\n }\n });\n this.targetSocket.on('error', (hadError) => {\n if (hadError) {\n console.error(`[target:${this.id}] Target socket was closed with error: `, hadError);\n }\n this.terminate();\n });\n }\n terminate() {\n console.log(`[client-relay:${this.id}] Terminating socket pipe...`);\n this.removeAllListeners();\n this.relaySocket.destroy();\n }\n}\nclass TurnClient {\n // default is to support up to 10 connections at once, change this with 'numSockets' parameter\n constructor(peerManager) {\n this.peerManager = peerManager;\n // create udp hole punch client\n this.udpHolePunchClient = new UDPHolePunchClient_1.default(this.peerManager);\n this.socketPipes = [];\n }\n async sendMessage(type, publicKey, message) {\n const peerConnection = this.peerManager.connectToPeer(publicKey);\n const encodedMessage = Peer_1.peerInterface.NatMessage.encodeDelimited({\n type,\n isResponse: false,\n subMessage: message,\n }).finish();\n const responseMessage = await peerConnection.sendPeerRequest(Peer_pb_1.SubServiceType.NAT_TRAVERSAL, encodedMessage);\n const { type: responseType, isResponse, subMessage } = Peer_1.peerInterface.NatMessage.decodeDelimited(responseMessage);\n return subMessage;\n }\n async requestPeerConnection(peerPublicKey, relayPublicKey) {\n var _a;\n const requestMessage = Peer_1.peerInterface.PeerConnectionRequest.encodeDelimited({ publicKey: peerPublicKey }).finish();\n const responseMessage = await this.sendMessage(Peer_1.peerInterface.NatMessageType.PEER_CONNECTION, relayPublicKey, requestMessage);\n const { peerAddress } = Peer_1.peerInterface.PeerConnectionResponse.decodeDelimited(responseMessage);\n if (!peerAddress) {\n throw Error('relay does not know of requested peer');\n }\n const address = PeerInfo_1.Address.parse(peerAddress);\n const relayPeerInfo = this.peerManager.getPeer(relayPublicKey);\n address.updateHost((_a = relayPeerInfo === null || relayPeerInfo === void 0 ? void 0 : relayPeerInfo.peerAddress) === null || _a === void 0 ? void 0 : _a.host);\n return address;\n }\n async requestRelayConnection(relayPublicKey) {\n var _a, _b, _c;\n const requestMessage = Peer_1.peerInterface.RelayConnectionRequest.encodeDelimited({\n publicKey: this.peerManager.peerInfo.publicKey,\n }).finish();\n const responseMessage = await this.sendMessage(Peer_1.peerInterface.NatMessageType.RELAY_CONNECTION, relayPublicKey, requestMessage);\n const { serverAddress } = Peer_1.peerInterface.RelayConnectionResponse.decodeDelimited(responseMessage);\n const incoming = PeerInfo_1.Address.parse(serverAddress);\n console.log(incoming);\n incoming.host = (_c = (_b = (_a = this.peerManager.getPeer(relayPublicKey)) === null || _a === void 0 ? void 0 : _a.peerAddress) === null || _b === void 0 ? void 0 : _b.host) !== null && _c !== void 0 ? _c : incoming.host;\n // add relay node to turn server address\n this.peerManager.peerInfo.relayPublicKey = relayPublicKey;\n // Create pending socketPipes\n this.createSocketPipe(incoming);\n }\n async requestLocalHolePunchAddress(relayPublicKey) {\n // request hole punch\n const udpAddress = await this.requestUDPAddress(relayPublicKey);\n const localUdpAddress = await this.udpHolePunchClient.requestHolePunch(udpAddress, this.peerManager.peerInfo.peerAddress);\n // add to peer info as relay node\n this.peerManager.peerInfo.relayPublicKey = relayPublicKey;\n return localUdpAddress;\n }\n async requestHolePunchConnection(relayPublicKey, peerPublicKey) {\n const peerUDPAddress = await this.requestPeerUDPAddress(relayPublicKey, peerPublicKey);\n return this.udpHolePunchClient.createPipeServer(peerUDPAddress);\n }\n // returns the address for a local tcp server that is routed via UTP\n async requestPeerUDPAddress(relayPublicKey, peerPublicKey) {\n const requestMessage = Peer_1.peerInterface.PeerUdpAddressRequest.encodeDelimited({ publicKey: peerPublicKey }).finish();\n const responseMessage = await this.sendMessage(Peer_1.peerInterface.NatMessageType.PEER_UDP_ADDRESS, relayPublicKey, requestMessage);\n const { address } = Peer_1.peerInterface.PeerUdpAddressResponse.decodeDelimited(responseMessage);\n return PeerInfo_1.Address.parse(address);\n }\n async requestUDPAddress(relayPublicKey) {\n const responseMessage = await this.sendMessage(Peer_1.peerInterface.NatMessageType.UDP_ADDRESS, relayPublicKey);\n const { address } = Peer_1.peerInterface.UDPAddressResponse.decodeDelimited(responseMessage);\n return PeerInfo_1.Address.parse(address);\n }\n async createSocketPipe(relayAddress) {\n const localAddress = this.peerManager.peerInfo.peerAddress;\n // wait for local address\n while (!localAddress) {\n await new Promise((resolve, reject) => setTimeout(() => resolve(), 1000));\n }\n // Create a new socketPipe\n const socketPipe = new SocketPipe(localAddress, relayAddress);\n this.socketPipes.push(socketPipe);\n socketPipe.on('pair', () => {\n // Create a new pending socketPipe\n this.createSocketPipe(relayAddress);\n });\n socketPipe.on('close', () => {\n // Server closed the connection\n // Remove paired pipe\n this.removeSocketPipe(socketPipe);\n // Create a new replacement socketPipe, that is pending and waiting, if required\n setTimeout(() => {\n if (this.terminating) {\n return;\n }\n // Create a new pending socketPipe\n this.createSocketPipe(relayAddress);\n }, 5000);\n });\n }\n removeSocketPipe(socketPipe) {\n // SocketPipe closed - is it still stored by us?\n const i = this.socketPipes.indexOf(socketPipe);\n // If so, remove it\n if (i !== -1) {\n this.socketPipes.splice(i, 1);\n }\n socketPipe.terminate();\n }\n terminate() {\n this.terminating = true;\n for (const socketPipe of this.socketPipes) {\n socketPipe.terminate();\n }\n }\n}\nexports.default = TurnClient;\n","\"use strict\";\n// based on https://github.com/SamDecrock/node-udp-hole-punching\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst net_1 = __importDefault(require(\"net\"));\nconst PeerInfo_1 = require(\"../PeerInfo\");\nconst Peer_1 = require(\"../../../proto/js/Peer\");\nconst UDPToTCPSocketPipe_1 = __importDefault(require(\"./socket-pipes/UDPToTCPSocketPipe\"));\nconst TCPToUDPSocketPipe_1 = __importDefault(require(\"./socket-pipes/TCPToUDPSocketPipe\"));\nconst MicroTransportProtocol_1 = require(\"./MicroTransportProtocol\");\nclass UDPHolePunchClient {\n constructor(peerManager) {\n this.outgoingSocketPipes = new Map();\n this.incomingSocketPipes = new Map();\n this.peerManager = peerManager;\n }\n async requestHolePunch(address, peerServerAddress) {\n const relayConnection = MicroTransportProtocol_1.connect(address.port, address.host);\n // const relayConnection = connect(address.port, address.host)\n const relayServer = MicroTransportProtocol_1.createServer((conn) => {\n const socketPipe = new TCPToUDPSocketPipe_1.default(peerServerAddress, conn);\n this.outgoingSocketPipes.set(socketPipe.id, socketPipe);\n });\n await new Promise((resolve, reject) => {\n relayServer.listen(relayConnection, () => {\n console.log(`relay connection listening on: ${relayServer.address().host}:${relayServer.address().port}`);\n resolve();\n });\n });\n const request = Peer_1.peerInterface.HolePunchRegisterRequest.encodeDelimited({\n publicKey: this.peerManager.peerInfo.publicKey,\n }).finish();\n relayConnection.write(request);\n const connectedAddress = await new Promise((resolve, reject) => {\n let buf = [];\n relayConnection.on('data', (data) => {\n buf.push(data);\n try {\n const { connectedAddress } = Peer_1.peerInterface.HolePunchRegisterResponse.decodeDelimited(Buffer.concat(buf));\n resolve(PeerInfo_1.Address.parse(connectedAddress));\n }\n catch (error) { }\n });\n });\n return connectedAddress;\n }\n // returns the address for a local tcp server that is routed via UTP\n async createPipeServer(peerUDPAddress) {\n console.log('connecting to', peerUDPAddress);\n // create a TCP server and bind it to a random port\n const server = net_1.default.createServer((socket) => {\n // create a new socket pipe\n const socketPipe = new UDPToTCPSocketPipe_1.default(socket, peerUDPAddress);\n this.incomingSocketPipes.set(socketPipe.id, socketPipe);\n });\n return await new Promise((resolve, reject) => {\n server.listen(0, () => {\n console.log('TCP server routing to UDP server');\n resolve(PeerInfo_1.Address.fromAddressInfo(server.address()));\n });\n });\n }\n}\nexports.default = UDPHolePunchClient;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst events_1 = require(\"events\");\nconst MicroTransportProtocol_1 = require(\"../MicroTransportProtocol\");\nlet socketPipeId = 0;\nclass UDPToTCPSocketPipe extends events_1.EventEmitter {\n constructor(tcpSocket, udpAddress) {\n super();\n this.id = socketPipeId;\n socketPipeId += 1;\n this.udpAddress = udpAddress;\n this.tcpSocket = tcpSocket;\n this.targetSocketPending = true;\n this.buffer = [];\n console.log(`[udp-tcp-relay:${this.id}] Created new pending SocketPipe.`);\n this.openRelayEnd();\n }\n openRelayEnd() {\n console.log(`[udp-tcp-relay:${this.id}] Socket pipe will TCP connection to connect to relay server.`);\n // We have a relay socket - now register its handlers\n // On data\n this.tcpSocket.on('data', (data) => {\n // Got data - do we have a target socket?\n if (this.udpSocket === undefined) {\n // Create a target socket for the relay socket - connecting to the target\n this.openTargetEnd();\n this.emit('pair');\n }\n // Is the target socket still connecting? If so, are we buffering data?\n if (this.targetSocketPending) {\n // Store the data until we have a target socket\n this.buffer[this.buffer.length] = data;\n }\n else {\n try {\n // Or just pass it directly\n this.udpSocket.write(data);\n }\n catch (ex) {\n console.error(`[udp-tcp-relay:${this.id}] Error writing to target socket: `, ex);\n }\n }\n });\n // On closing\n this.tcpSocket.on('close', (hadError) => {\n if (hadError) {\n console.error(`[udp-tcp-relay:${this.id}] Relay socket closed with error.`);\n }\n if (this.udpSocket !== undefined) {\n // Destroy the other socket\n this.udpSocket.destroy();\n }\n else {\n // Signal we are closing - server closed the connection\n this.emit('close');\n }\n });\n this.tcpSocket.on('error', (error) => {\n console.error(`[udp-tcp-relay:${this.id}] Error with relay socket: `, error);\n });\n }\n openTargetEnd() {\n console.log(`[udp-tcp-relay:${this.id}] Authorized by relay server. Creating new connection to target ${this.udpAddress.toString()}...`);\n console.log(`[udp-tcp-target:${this.id}] Socket pipe will TCP connection to connect to target server.`);\n // connect udp socket\n this.udpSocket = MicroTransportProtocol_1.connect(this.udpAddress.port, this.udpAddress.host);\n console.log(`[udp-tcp-target:${this.id}] Successfully connected to target ${this.udpAddress.toString()}.`);\n // Connected, not pending anymore\n this.targetSocketPending = false;\n // And if we have any buffered data, forward it\n try {\n for (const bufferItem of this.buffer) {\n this.udpSocket.write(bufferItem);\n }\n }\n catch (ex) {\n console.error(`[udp-tcp-target:${this.id}] Error writing to target socket: `, ex);\n }\n // Clear the array\n this.buffer.length = 0;\n // Got data from the target socket?\n this.udpSocket.on('data', (data) => {\n try {\n // Forward it!\n if (!this.tcpSocket.destroyed) {\n this.tcpSocket.write(data);\n }\n }\n catch (ex) {\n console.error(`target:${this.id}] Error writing to target socket: `, ex);\n }\n });\n this.udpSocket.on('error', (hadError) => {\n if (hadError) {\n console.error(`[target:${this.id}] Target socket was closed with error: `, hadError);\n }\n this.terminate();\n });\n }\n terminate() {\n console.log(`[udp-tcp-relay:${this.id}] Terminating socket pipe...`);\n this.removeAllListeners();\n this.tcpSocket.destroy();\n }\n}\nexports.default = UDPToTCPSocketPipe;\n","module.exports = require(\"cyclist\");","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst net_1 = __importDefault(require(\"net\"));\nconst events_1 = require(\"events\");\nlet socketPipeId = 1;\nclass TCPToUDPSocketPipe extends events_1.EventEmitter {\n constructor(localAddress, relaySocket) {\n super();\n this.id = socketPipeId;\n socketPipeId += 1;\n this.localAddress = localAddress;\n if (localAddress == undefined) {\n throw Error('localAddress cannot be undefined');\n }\n this.udpSocket = relaySocket;\n this.targetSocketPending = true;\n this.buffer = [];\n console.log(`[tcp-udp-relay:${this.id}] Created new pending SocketPipe.`);\n this.openRelayEnd();\n }\n openRelayEnd() {\n console.log(`[tcp-udp-relay:${this.id}] Socket pipe will TCP connection to connect to relay server.`);\n // We have a relay socket - now register its handlers\n // On data\n this.udpSocket.on('data', (data) => {\n // Got data - do we have a target socket?\n if (this.tcpSocket === undefined) {\n // Create a target socket for the relay socket - connecting to the target\n this.openTargetEnd();\n this.emit('pair');\n }\n // Is the target socket still connecting? If so, are we buffering data?\n if (this.targetSocketPending) {\n // Store the data until we have a target socket\n this.buffer[this.buffer.length] = data;\n }\n else {\n try {\n // Or just pass it directly\n this.tcpSocket.write(data);\n }\n catch (ex) {\n console.error(`[tcp-udp-relay:${this.id}] Error writing to target socket: `, ex);\n }\n }\n });\n // On closing\n this.udpSocket.on('close', (hadError) => {\n if (hadError) {\n console.error(`[tcp-udp-relay:${this.id}] Relay socket closed with error.`);\n }\n if (this.tcpSocket !== undefined) {\n // Destroy the other socket\n this.tcpSocket.destroy();\n }\n else {\n // Signal we are closing - server closed the connection\n this.emit('close');\n }\n });\n this.udpSocket.on('error', (error) => {\n console.error(`[tcp-udp-relay:${this.id}] Error with relay socket: `, error);\n });\n }\n openTargetEnd() {\n console.log(`[tcp-udp-relay:${this.id}] Authorized by relay server. Creating new connection to target ${this.localAddress.toString()}...`);\n console.log(`[tcp-udp-target:${this.id}] Socket pipe will TCP connection to connect to target server.`);\n // Or use TCP\n this.tcpSocket = net_1.default.connect(this.localAddress.port, this.localAddress.host, () => {\n console.log(`[tcp-udp-target:${this.id}] Successfully connected to target ${this.localAddress.toString()}.`);\n // Configure socket for keeping connections alive\n this.tcpSocket.setKeepAlive(true, 120 * 1000);\n // Connected, not pending anymore\n this.targetSocketPending = false;\n // And if we have any buffered data, forward it\n try {\n for (const bufferItem of this.buffer) {\n this.tcpSocket.write(bufferItem);\n }\n }\n catch (ex) {\n console.error(`[tcp-udp-target:${this.id}] Error writing to target socket: `, ex);\n }\n // Clear the array\n this.buffer.length = 0;\n });\n // Got data from the target socket?\n this.tcpSocket.on('data', (data) => {\n try {\n // Forward it!\n this.udpSocket.write(data);\n }\n catch (ex) {\n console.error(`target:${this.id}] Error writing to target socket: `, ex);\n }\n });\n this.tcpSocket.on('error', (hadError) => {\n if (hadError) {\n console.error(`[target:${this.id}] Target socket was closed with error: `, hadError);\n }\n this.terminate();\n });\n }\n terminate() {\n console.log(`[tcp-udp-relay:${this.id}] Terminating socket pipe...`);\n this.removeAllListeners();\n this.udpSocket.destroy();\n }\n}\nexports.default = TCPToUDPSocketPipe;\n","\"use strict\";\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst PeerInfo_1 = require(\"../PeerInfo\");\nconst grpc = __importStar(require(\"@grpc/grpc-js\"));\nconst TurnServer_1 = __importDefault(require(\"../turn/TurnServer\"));\nconst utils_1 = require(\"../../utils\");\nconst Peer_grpc_pb_1 = require(\"../../../proto/compiled/Peer_grpc_pb\");\nconst Peer_pb_1 = require(\"../../../proto/compiled/Peer_pb\");\nclass PeerServer {\n constructor(peerManager, keyManager) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\n this.started = false;\n this.peerManager = peerManager;\n this.keyManager = keyManager;\n /////////////////\n // GRPC Server //\n /////////////////\n this.server = new grpc.Server();\n this.server.addService(Peer_grpc_pb_1.PeerService, this);\n // Create the server credentials. SSL only if ca cert exists\n const credentials = (_a = this.keyManager.pki) === null || _a === void 0 ? void 0 : _a.TLSServerCredentials;\n if (credentials) {\n this.credentials = grpc.ServerCredentials.createSsl(Buffer.from(credentials.rootCertificate), [\n {\n private_key: Buffer.from(credentials.privateKey),\n cert_chain: Buffer.from(credentials.certificate),\n },\n ], true);\n }\n else {\n this.credentials = grpc.ServerCredentials.createInsecure();\n }\n const port = (_e = (_b = process.env.PK_PORT) !== null && _b !== void 0 ? _b : (_d = (_c = this.peerManager.peerInfo) === null || _c === void 0 ? void 0 : _c.peerAddress) === null || _d === void 0 ? void 0 : _d.port) !== null && _e !== void 0 ? _e : 0;\n const host = (_j = (_f = process.env.PK_HOST) !== null && _f !== void 0 ? _f : (_h = (_g = this.peerManager.peerInfo) === null || _g === void 0 ? void 0 : _g.peerAddress) === null || _h === void 0 ? void 0 : _h.host) !== null && _j !== void 0 ? _j : 'localhost';\n this.server.bindAsync(`${host}:${port}`, this.credentials, async (err, boundPort) => {\n if (err) {\n throw err;\n }\n else {\n const address = new PeerInfo_1.Address(host, boundPort);\n this.server.start();\n if (this.peerManager.peerInfo) {\n this.peerManager.peerInfo.peerAddress = address;\n }\n console.log(`Peer Server running on: ${address}`);\n this.started = true;\n this.turnServer = new TurnServer_1.default(this.peerManager);\n }\n });\n }\n async messagePeer(call, callback) {\n const peerRequest = call.request;\n const { publicKey, type, subMessage: requestMessage } = peerRequest.toObject();\n // if we don't know publicKey, end connection\n if (!this.peerManager.hasPeer(publicKey)) {\n throw Error('unknown public key');\n }\n // verify and decrypt request\n const verifiedMessage = await this.keyManager.verifyData(Buffer.from(requestMessage), Buffer.from(publicKey));\n const decryptedMessage = await this.keyManager.decryptData(verifiedMessage);\n const request = utils_1.stringToProtobuf(decryptedMessage.toString());\n let response;\n switch (type) {\n case Peer_pb_1.SubServiceType.PING_PEER:\n response = await this.handlePing(request);\n break;\n case Peer_pb_1.SubServiceType.GIT:\n response = await this.handleGitRequest(request, publicKey);\n break;\n case Peer_pb_1.SubServiceType.NAT_TRAVERSAL:\n response = await this.handleNatRequest(request);\n break;\n default:\n throw Error('peer message type not identified');\n }\n // encrypt and sign response\n const encryptedResponse = await this.keyManager.encryptData(Buffer.from(utils_1.protobufToString(response)), Buffer.from(publicKey));\n const signedResponse = await this.keyManager.signData(encryptedResponse);\n const subMessage = signedResponse.toString();\n // composes peer message\n const peerResponse = new Peer_pb_1.PeerMessage();\n peerResponse.setPublicKey(this.peerManager.peerInfo.publicKey);\n peerResponse.setType(type);\n peerResponse.setSubMessage(subMessage);\n // return peer response\n callback(null, peerResponse);\n }\n async handlePing(request) {\n const challenge = Buffer.from(request).toString();\n return request;\n }\n}\nexports.default = PeerServer;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// adapted from https://github.com/advance512/nat-traversal\nconst PeerInfo_1 = require(\"../PeerInfo\");\nconst events_1 = require(\"events\");\nconst net_1 = __importDefault(require(\"net\"));\nconst Peer_1 = require(\"../../../proto/js/Peer\");\nconst UDPHolePunchServer_1 = __importDefault(require(\"../udp-hole-punch/UDPHolePunchServer\"));\nclass SocketPipe extends events_1.EventEmitter {\n constructor(serverSocket, id) {\n super();\n this.id = id;\n this.serverSocket = serverSocket;\n this.bufferQueue = [];\n // Configure socket for keeping connections alive\n this.serverSocket.setKeepAlive(true, 120 * 1000);\n // New data\n this.serverSocket.on('data', (data) => {\n // if outgoing socket is connected, write data\n this.bufferQueue.push(data);\n if (this.clientSocket) {\n this.writeBuffer();\n }\n });\n this.serverSocket.on('close', (hadError) => {\n if (hadError) {\n console.error(`[${this}] Socket was closed due to error.`);\n }\n // Destroy the paired socket too\n if (this.clientSocket !== undefined) {\n this.clientSocket.destroy();\n }\n // Mark this socketPipe is closing\n this.emit('close');\n });\n this.serverSocket.on('error', (err) => {\n console.error(`Socket error: ${err}`);\n });\n }\n terminate() {\n this.serverSocket.destroy();\n }\n activate(outgoingSocket) {\n if (this.clientSocket) {\n throw new Error(`[${this}] Attempted to pair socket more than once.`);\n }\n console.log(`[socket-pipe: ${this.id}] Socket pipe activated!`);\n this.clientSocket = outgoingSocket;\n // Configure socket for keeping connections alive\n this.clientSocket.setKeepAlive(true, 120 * 1000);\n // If we have any data in the buffer, write it\n this.writeBuffer();\n }\n writeBuffer() {\n while (this.bufferQueue.length > 0) {\n const buffer = this.bufferQueue.shift();\n this.clientSocket.write(buffer);\n }\n }\n}\nclass EndpointServer extends events_1.EventEmitter {\n constructor(edgeType) {\n super();\n this.pendingSocketPipes = [];\n this.activeSocketPipes = [];\n this.edgeType = edgeType;\n }\n async start(port = 0) {\n await new Promise((resolve, reject) => {\n console.log(`[${this.edgeType}] endpoint server Will listen to incoming TCP connections.`);\n this.server = net_1.default\n .createServer((socket) => {\n console.log(`[endpoint-server: ${this.edgeType}] Incoming TCP connection from ${socket.remoteAddress}:${socket.remotePort}`);\n this.createSocketPipe(socket);\n })\n .listen(port, '0.0.0.0', () => {\n this.address = PeerInfo_1.Address.fromAddressInfo(this.server.address());\n console.log(`[${this.edgeType}] Listening on adress ${this.address.toString()}...`);\n resolve();\n });\n });\n }\n async createSocketPipe(incomingSocket) {\n const id = Math.max(0, ...this.activeSocketPipes.map((v) => v.id), ...this.pendingSocketPipes.map((v) => v.id)) + 1;\n const newSocketPipe = new SocketPipe(incomingSocket, id);\n console.log(`[${this.edgeType}-server-socket-pipe: ${newSocketPipe.id}] SocketPipe authorized.`);\n this.emit('new', newSocketPipe);\n newSocketPipe.on('close', () => {\n console.log(`[${this.edgeType}-server-socket-pipe: ${newSocketPipe.id}] SocketPipe closed connection`);\n this.removeSocketPipe(newSocketPipe);\n });\n return;\n }\n activateSocketPipe(pairServer, connectingSocketPipe) {\n // Do we have a pending socketPipe waiting?\n if (this.hasPendingSocketPipes()) {\n // Get the current pending socketPipe\n const pendingSocketPipe = this.getPendingSocketPipe();\n console.log(`[${this.edgeType}-server] Activating pending SocketPipe: connecting SocketPipes ${this.edgeType}-${pendingSocketPipe.id} and ${pairServer.edgeType}-${connectingSocketPipe.id}`);\n // Pair the connecting socketPipe with the pending socketPipe, allow data flow in one direction\n connectingSocketPipe.activate(pendingSocketPipe.serverSocket);\n this.addActiveSocketPipe(pendingSocketPipe);\n // And vice versa, for the second direction\n pendingSocketPipe.activate(connectingSocketPipe.serverSocket);\n pairServer.addActiveSocketPipe(connectingSocketPipe);\n }\n else {\n console.log(`[${this.edgeType}-server-socket-pipe: ${pairServer.edgeType}-${connectingSocketPipe.id}] SocketPipe will be pending until a parallel connection occurs`);\n // If we don't then our new connecting socketPipe is now pending and waiting for another connecting socketPipe\n pairServer.addPendingSocketPipe(connectingSocketPipe);\n }\n }\n getPendingSocketPipe() {\n const pendingSocketPipe = this.pendingSocketPipes[0];\n this.pendingSocketPipes.splice(0, 1);\n return pendingSocketPipe;\n }\n addActiveSocketPipe(socketPipe) {\n this.activeSocketPipes.push(socketPipe);\n }\n addPendingSocketPipe(socketPipe) {\n this.pendingSocketPipes.push(socketPipe);\n }\n removeSocketPipe(newSocketPipe) {\n let i = this.pendingSocketPipes.indexOf(newSocketPipe);\n if (i !== -1) {\n this.pendingSocketPipes.splice(i, 1);\n }\n else {\n i = this.activeSocketPipes.indexOf(newSocketPipe);\n if (i !== -1) {\n this.activeSocketPipes.splice(i, 1);\n }\n }\n }\n hasPendingSocketPipes() {\n return this.pendingSocketPipes.length > 0;\n }\n terminate() {\n console.log(`[${this.edgeType}] Terminating SocketListener.`);\n this.server.close();\n for (const socketPipe of this.pendingSocketPipes) {\n socketPipe.terminate();\n }\n for (const socketPipe of this.activeSocketPipes) {\n socketPipe.terminate();\n }\n this.server.unref();\n }\n}\nclass TurnServer {\n constructor(peerManager) {\n // public key -> {incoming, outgoing}\n this.connectionMap = new Map();\n this.peerManager = peerManager;\n this.peerManager.setNatHandler(this.handleNatMessage.bind(this));\n this.udpHolePunchServer = new UDPHolePunchServer_1.default(this.peerManager);\n }\n async handleNatMessage(request) {\n const { type, subMessage } = Peer_1.peerInterface.NatMessage.decodeDelimited(request);\n let response;\n switch (type) {\n case Peer_1.peerInterface.NatMessageType.PEER_CONNECTION:\n response = await this.handlePeerConnectionRequest(subMessage);\n break;\n case Peer_1.peerInterface.NatMessageType.RELAY_CONNECTION:\n response = await this.handleRelayConnectionRequest(subMessage);\n break;\n case Peer_1.peerInterface.NatMessageType.UDP_ADDRESS:\n response = await this.handleUDPAddressRequest();\n break;\n case Peer_1.peerInterface.NatMessageType.PEER_UDP_ADDRESS:\n response = await this.handlePeerUDPAddressRequest(subMessage);\n break;\n default:\n throw Error(`type not supported: ${type}`);\n }\n const encodedResponse = Peer_1.peerInterface.NatMessage.encodeDelimited({\n type,\n isResponse: true,\n subMessage: response,\n }).finish();\n return encodedResponse;\n }\n async handlePeerConnectionRequest(request) {\n var _a, _b;\n const { publicKey } = Peer_1.peerInterface.PeerConnectionRequest.decodeDelimited(request);\n const peerAddress = (_b = (_a = this.connectionMap.get(publicKey)) === null || _a === void 0 ? void 0 : _a.client.address.toString()) !== null && _b !== void 0 ? _b : '';\n const responseMessage = Peer_1.peerInterface.PeerConnectionResponse.encodeDelimited({ peerAddress }).finish();\n return responseMessage;\n }\n async handleRelayConnectionRequest(request) {\n const { publicKey } = Peer_1.peerInterface.RelayConnectionRequest.decodeDelimited(request);\n let server;\n let client;\n server = new EndpointServer('server');\n server.on('new', (connectingSocketPipe) => {\n client.activateSocketPipe(server, connectingSocketPipe);\n });\n await server.start();\n client = new EndpointServer('client');\n client.on('new', (connectingSocketPipe) => {\n server.activateSocketPipe(client, connectingSocketPipe);\n });\n await client.start();\n this.connectionMap.set(publicKey, { server, client });\n // send back response message\n const serverAddress = server.address.toString();\n const responseMessage = Peer_1.peerInterface.RelayConnectionResponse.encodeDelimited({ serverAddress }).finish();\n return responseMessage;\n }\n async handleUDPAddressRequest() {\n // send back response message\n const address = this.udpHolePunchServer.server.address().toString();\n const responseMessage = Peer_1.peerInterface.UDPAddressResponse.encodeDelimited({ address }).finish();\n return responseMessage;\n }\n async handlePeerUDPAddressRequest(request) {\n const { publicKey } = Peer_1.peerInterface.PeerUdpAddressRequest.decodeDelimited(request);\n // send back response message\n const address = this.udpHolePunchServer.getAddress(publicKey);\n const responseMessage = Peer_1.peerInterface.PeerUdpAddressResponse.encodeDelimited({ address }).finish();\n return responseMessage;\n }\n terminate() {\n this.connectionMap.forEach(({ server, client }) => {\n server.terminate();\n client.terminate();\n });\n this.relayServer.close();\n }\n}\nexports.default = TurnServer;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst PeerInfo_1 = __importDefault(require(\"../PeerInfo\"));\nconst Peer_1 = require(\"../../../proto/js/Peer\");\nconst MicroTransportProtocol_1 = require(\"./MicroTransportProtocol\");\nclass UDPHolePunchServer {\n constructor(peerManager) {\n // publicKey -> Server\n this.clientList = new Map();\n this.peerManager = peerManager;\n this.server = MicroTransportProtocol_1.createServer((conn) => {\n this.handleConnection(conn);\n });\n this.server.listenPort(0, () => {\n console.log(`UDP Server listening on ` + this.server.address().host + ':' + this.server.address().port);\n });\n }\n getAddress(publicKey) {\n var _a;\n return (_a = this.clientList.get(PeerInfo_1.default.formatPublicKey(publicKey))) === null || _a === void 0 ? void 0 : _a.remoteAddress.toString();\n }\n handleConnection(conn) {\n let buf = [];\n conn.on('data', (data) => {\n buf.push(data);\n // try decoding\n try {\n const { publicKey } = Peer_1.peerInterface.HolePunchRegisterRequest.decodeDelimited(Buffer.concat(buf));\n const remote = conn.remoteAddress;\n this.clientList.set(PeerInfo_1.default.formatPublicKey(publicKey), MicroTransportProtocol_1.connect(remote.port, remote.host));\n const response = Peer_1.peerInterface.HolePunchRegisterResponse.encodeDelimited({\n connectedAddress: remote.toString(),\n }).finish();\n conn.write(response);\n }\n catch (error) { }\n });\n }\n}\nexports.default = UDPHolePunchServer;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst PeerInfo_1 = __importDefault(require(\"../PeerInfo\"));\nconst crypto_1 = require(\"crypto\");\nconst grpc = __importStar(require(\"@grpc/grpc-js\"));\nconst utils_1 = require(\"../../utils\");\nconst Peer_grpc_pb_1 = require(\"../../../proto/compiled/Peer_grpc_pb\");\nconst Peer_pb_1 = require(\"../../../proto/compiled/Peer_pb\");\nclass PeerConnection {\n constructor(publicKey, keyManager, peerManager) {\n var _a;\n this.connected = false;\n this.publicKey = publicKey;\n this.keyManager = keyManager;\n this.peerManager = peerManager;\n const credentials = (_a = this.keyManager.pki) === null || _a === void 0 ? void 0 : _a.TLSClientCredentials;\n if (credentials) {\n this.credentials = grpc.ChannelCredentials.createSsl(Buffer.from(credentials.rootCertificate), Buffer.from(credentials.privateKey), Buffer.from(credentials.certificate));\n }\n else {\n this.credentials = grpc.credentials.createInsecure();\n }\n }\n async connectDirectly() {\n // try to create a direct connection\n if (this.getPeerInfo().peerAddress) {\n // direct connection attempt\n const address = this.getPeerInfo().peerAddress;\n const peerClient = new Peer_grpc_pb_1.PeerClient(address.toString(), this.credentials);\n this.connected = true;\n return peerClient;\n }\n else if (!this.getPeerInfo().peerAddress) {\n throw Error('peer does not have a connected address');\n }\n else {\n throw Error('peer is already connected');\n }\n }\n async connectHolePunch() {\n // try to hole punch to peer via relay peer\n if (!this.connected && this.getPeerInfo().relayPublicKey) {\n // connect to relay and ask it to create a relay\n console.log('requesting udp hole punch connection');\n const connectedAddress = await this.peerManager.turnClient.requestHolePunchConnection(this.getPeerInfo().relayPublicKey, this.getPeerInfo().publicKey);\n const peerClient = new Peer_grpc_pb_1.PeerClient(connectedAddress.toString(), this.credentials);\n this.connected = true;\n return peerClient;\n }\n else if (!this.getPeerInfo().relayPublicKey) {\n throw Error('peer does not have relay public key specified');\n }\n else {\n throw Error('peer is already connected');\n }\n }\n async connectRelay() {\n // try to relay to peer via relay peer\n if (!this.connected && this.getPeerInfo().relayPublicKey) {\n // turn relay\n // connect to relay and ask it to create a relay\n const connectedAddress = await this.peerManager.turnClient.requestPeerConnection(this.getPeerInfo().publicKey, this.getPeerInfo().relayPublicKey);\n const peerClient = new Peer_grpc_pb_1.PeerClient(connectedAddress.toString(), this.credentials);\n this.connected = true;\n return peerClient;\n }\n else if (!this.getPeerInfo().relayPublicKey) {\n throw Error('peer does not have relay public key specified');\n }\n else {\n throw Error('peer is already connected');\n }\n }\n async connectFirstChannel() {\n return await new Promise((resolve, reject) => {\n const promiseList = [this.connectDirectly(), this.connectHolePunch(), this.connectRelay()];\n const errorList = [];\n for (const promise of promiseList) {\n promise\n .then((p) => {\n resolve(p);\n })\n .catch((error) => null);\n promise.catch((error) => {\n errorList.push(error);\n // check if all have failed\n if (errorList.length == promiseList.length) {\n reject(errorList);\n }\n });\n }\n });\n }\n async connect() {\n // connect if not already connected\n if (!this.connected) {\n try {\n this.peerClient = await this.connectFirstChannel();\n }\n catch (error) {\n console.log(error);\n }\n }\n // try a ping\n if (this.connected && (await this.sendPingRequest(5000))) {\n return;\n }\n else {\n this.connected = false;\n // still not connected\n throw Error('could not connect to peer');\n }\n }\n getPeerInfo() {\n if (!this.peerManager.hasPeer(this.publicKey)) {\n throw Error('peer does not exist in peer store');\n }\n return this.peerManager.getPeer(this.publicKey);\n }\n async sendPingRequest(timeout) {\n // eslint-disable-next-line\n return await new Promise(async (resolve, reject) => {\n try {\n if (timeout) {\n setTimeout(() => reject('ping timed out'), timeout);\n }\n const challenge = crypto_1.randomBytes(16).toString('base64');\n // encode request\n const peerRequest = await this.encodeRequest(Peer_pb_1.SubServiceType.PING_PEER, utils_1.stringToProtobuf(challenge));\n // send request\n const peerResponse = await new Promise((resolve, reject) => {\n this.peerClient.messagePeer(peerRequest, (err, response) => {\n if (err) {\n reject(err);\n }\n else {\n resolve(response);\n }\n });\n });\n // decode response\n const { type: responseType, response } = await this.decodeResponse(peerResponse);\n const challengeResponse = utils_1.protobufToString(response);\n resolve(challenge == challengeResponse);\n }\n catch (error) {\n reject(error);\n }\n });\n }\n async pingPeer(timeout) {\n // connect to peer\n await this.connect();\n // send ping request\n return await this.sendPingRequest(timeout);\n }\n async sendPeerRequest(type, request) {\n // connect to peer\n await this.connect();\n // encode request\n const peerRequest = await this.encodeRequest(type, request);\n const peerResponse = await new Promise((resolve, reject) => {\n this.peerClient.messagePeer(peerRequest, (err, response) => {\n if (err) {\n reject(err);\n }\n else {\n resolve(response);\n }\n });\n });\n // decode response\n const { type: responseType, response } = await this.decodeResponse(peerResponse);\n // return response\n return response;\n }\n // ======== Helper Methods ======== //\n async encodeRequest(type, request) {\n // encrypt message\n const requestString = utils_1.protobufToString(request);\n const encryptedMessage = await this.keyManager.encryptData(Buffer.from(requestString), Buffer.from(this.publicKey));\n // sign message\n const signedMessage = await this.keyManager.signData(encryptedMessage);\n const subMessage = signedMessage.toString();\n // encode and send message\n const peerRequest = new Peer_pb_1.PeerMessage();\n peerRequest.setPublicKey(this.peerManager.peerInfo.publicKey);\n peerRequest.setType(type);\n peerRequest.setSubMessage(subMessage);\n return peerRequest;\n }\n async decodeResponse(response) {\n const { publicKey, type: responseType, subMessage } = response.toObject();\n // decode peerResponse\n if (PeerInfo_1.default.formatPublicKey(this.getPeerInfo().publicKey) != PeerInfo_1.default.formatPublicKey(publicKey)) {\n // drop packet\n throw Error('response public key does not match request public key');\n }\n // verify response\n const verifiedResponse = await this.keyManager.verifyData(Buffer.from(subMessage), Buffer.from(publicKey));\n // decrypt response\n const decryptedResponse = await this.keyManager.decryptData(verifiedResponse);\n const responseBuffer = utils_1.stringToProtobuf(decryptedResponse.toString());\n return { type: responseType, response: responseBuffer };\n }\n}\nexports.default = PeerConnection;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar _a, _b;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst dgram_1 = __importDefault(require(\"dgram\"));\nconst PeerInfo_1 = __importDefault(require(\"./PeerInfo\"));\nconst events_1 = require(\"events\");\nconst Peer_1 = require(\"../../proto/js/Peer\");\nconst utils_1 = require(\"../utils\");\n// This module is based heavily on libp2p's mDNS module:\n// https://github.com/libp2p/js-libp2p-mdns\n// It is supposed to discover peers on the local network\n// This module was also generated with the help of:\n// https://nrempel.com/using-udp-multicast-with-node-js/\n//\n// \"\"\"\n// In computer networking, the multicast DNS (mDNS) protocol\n// resolves hostnames to IP addresses within small networks\n// that do not include a local name server\n// \"\"\"\nconst UDP_MULTICAST_PORT = parseInt((_a = process.env.UDP_MULTICAST_PORT) !== null && _a !== void 0 ? _a : '5353');\nconst UDP_MULTICAST_ADDR = (_b = process.env.UDP_MULTICAST_ADDR) !== null && _b !== void 0 ? _b : '224.0.0.251';\nclass MulticastBroadcaster extends events_1.EventEmitter {\n constructor(peerManager, keyManager) {\n super();\n this.interval = 1e3;\n this.broadcastInterval = null;\n this.peerManager = peerManager;\n this.keyManager = keyManager;\n // Create socket\n this.socket = dgram_1.default.createSocket({ type: 'udp4', reuseAddr: true });\n this.socket.bind(UDP_MULTICAST_PORT);\n // Set up listener\n this.socket.on('listening', (() => {\n this.socket.addMembership(UDP_MULTICAST_ADDR);\n const address = this.socket.address();\n // Start the broadcasting process\n this.startBroadcasting();\n }).bind(this));\n }\n startListening() {\n if (!this.socket.listenerCount('message')) {\n // Handle messages\n this.socket.on('message', this.handleBroadcastMessage.bind(this));\n }\n }\n stopBroadcasting() {\n if (this.broadcastInterval) {\n clearInterval(this.broadcastInterval);\n }\n }\n startBroadcasting() {\n const broadcast = async () => {\n var _a;\n if (!this.keyManager.identityLoaded) {\n return;\n }\n const peerInfo = this.peerManager.peerInfo;\n const encodedPeerInfo = Peer_1.peerInterface.PeerInfoMessage.encodeDelimited({\n publicKey: peerInfo.publicKey,\n peerAddress: (_a = peerInfo.peerAddress) === null || _a === void 0 ? void 0 : _a.toString(),\n relayPublicKey: peerInfo.relayPublicKey,\n }).finish();\n // sign it for authenticity\n const signedPeerInfo = await this.keyManager.signData(Buffer.from(utils_1.protobufToString(encodedPeerInfo)));\n const encodedPeerMessage = Peer_1.peerInterface.PeerMessage.encodeDelimited({\n type: Peer_1.peerInterface.SubServiceType.PING_PEER,\n publicKey: this.peerManager.peerInfo.publicKey,\n subMessage: signedPeerInfo.toString(),\n }).finish();\n this.socket.send(encodedPeerMessage, 0, encodedPeerMessage.length, UDP_MULTICAST_PORT, UDP_MULTICAST_ADDR);\n };\n // Immediately start a query, then do it every interval.\n broadcast();\n this.broadcastInterval = setInterval(broadcast, this.interval);\n }\n async handleBroadcastMessage(request, rinfo) {\n try {\n const { publicKey: signingKey, type, subMessage } = Peer_1.peerInterface.PeerMessage.decodeDelimited(request);\n // only relevant if peer public key exists in store and type is of PING\n if (!this.peerManager.hasPeer(signingKey)) {\n throw Error('peer does not exist in store');\n }\n else if (this.peerManager.peerInfo.publicKey == signingKey) {\n throw Error('peer message is from self');\n }\n else if (!(type == Peer_1.peerInterface.SubServiceType.PING_PEER)) {\n throw Error(`peer message is not of type PING, type is: ${Peer_1.peerInterface.SubServiceType[type]}`);\n }\n // verify the subMessage\n const verifiedMessage = await this.keyManager.verifyData(subMessage, Buffer.from(signingKey));\n const encodedMessage = utils_1.stringToProtobuf(verifiedMessage.toString());\n const { publicKey, relayPublicKey, peerAddress, apiAddress } = Peer_1.peerInterface.PeerInfoMessage.decodeDelimited(encodedMessage);\n // construct a peer info object\n const peerInfo = new PeerInfo_1.default(publicKey, relayPublicKey, peerAddress, apiAddress);\n // update the peer store\n this.peerManager.updatePeer(peerInfo);\n this.emit('found', publicKey);\n }\n catch (err) {\n // Couldn't decode message\n // We don't want the multicast discovery to error on every message it coudln't decode!\n }\n }\n}\nexports.default = MulticastBroadcaster;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst os_1 = __importDefault(require(\"os\"));\nconst path_1 = __importDefault(require(\"path\"));\nconst isomorphic_git_1 = __importDefault(require(\"isomorphic-git\"));\nconst Vault_1 = __importDefault(require(\"../vaults/Vault\"));\nconst encryptedfs_1 = require(\"encryptedfs\");\nconst GitBackend_1 = __importDefault(require(\"../git/GitBackend\"));\nconst GitFrontend_1 = __importDefault(require(\"../git/GitFrontend\"));\nclass VaultManager {\n constructor(polykeyPath = `${os_1.default.homedir()}/.polykey`, fileSystem, keyManager, peerManager) {\n this.polykeyPath = polykeyPath;\n this.fileSystem = fileSystem;\n this.keyManager = keyManager;\n this.peerManager = peerManager;\n this.metadataPath = path_1.default.join(polykeyPath, '.vaultKeys');\n // Make polykeyPath if it doesn't exist\n this.fileSystem.mkdirSync(this.polykeyPath, { recursive: true });\n // Initialize stateful variables\n this.vaults = new Map();\n this.vaultKeys = new Map();\n this.gitBackend = new GitBackend_1.default(polykeyPath, ((repoName) => this.getVault(repoName).EncryptedFS).bind(this), this.getVaultNames.bind(this));\n this.gitFrontend = new GitFrontend_1.default(peerManager);\n this.peerManager.setGitHandler(this.gitBackend.handleGitMessage.bind(this.gitBackend));\n // Read in vault keys\n this.loadEncryptedMetadata();\n }\n /**\n * Get the names of all vaults in memory\n */\n getVaultNames(publicKey) {\n const vaultNames = Array.from(this.vaults.keys());\n if (publicKey) {\n const allowedVaultNames = [];\n for (const vaultName of vaultNames) {\n if (this.getVault(vaultName).peerCanAccess(publicKey)) {\n allowedVaultNames.push(vaultName);\n }\n }\n return allowedVaultNames;\n }\n else {\n return vaultNames;\n }\n }\n /**\n * Get a vault from the vault manager\n * @param vaultName Name of desired vault\n */\n getVault(vaultName) {\n if (this.vaults.has(vaultName)) {\n const vault = this.vaults.get(vaultName);\n return vault;\n }\n else if (this.vaultKeys.has(vaultName)) {\n // vault not in map, create new instance\n this.validateVault(vaultName);\n const vaultKey = this.vaultKeys.get(vaultName);\n const vault = new Vault_1.default(vaultName, vaultKey, this.polykeyPath, this.gitFrontend);\n this.vaults.set(vaultName, vault);\n return vault;\n }\n else {\n throw Error(`vault does not exist in memory: '${vaultName}'`);\n }\n }\n /**\n * Create a new vault\n * @param vaultName Unique name of new vault\n * @param key Optional key to use for the vault encryption, otherwise it is generated\n */\n async newVault(vaultName, key) {\n if (this.vaultExists(vaultName)) {\n throw Error('Vault already exists!');\n }\n try {\n const vaultPath = path_1.default.join(this.polykeyPath, vaultName);\n // Directory not present, create one\n this.fileSystem.mkdirSync(vaultPath, { recursive: true });\n // Create key if not provided\n let vaultKey;\n if (!key) {\n // Generate new key\n vaultKey = await this.keyManager.generateKey(`${vaultName}-Key`, this.keyManager.getPrivateKey(), false);\n }\n else {\n // Assign key if it is provided\n vaultKey = key;\n }\n this.vaultKeys.set(vaultName, vaultKey);\n await this.writeEncryptedMetadata();\n // Create vault\n const vault = new Vault_1.default(vaultName, vaultKey, this.polykeyPath, this.gitFrontend);\n await vault.initializeVault();\n // Set vault\n this.vaults.set(vaultName, vault);\n return this.getVault(vaultName);\n }\n catch (err) {\n // Delete vault dir and garbage collect\n await this.deleteVault(vaultName);\n throw err;\n }\n }\n /**\n * Clone a vault from a peer\n * @param vaultName Name of vault to be cloned\n * @param address Address of polykey node that owns vault to be cloned\n * @param getSocket Function to get an active connection to provided address\n */\n async cloneVault(vaultName, publicKey) {\n // Confirm it doesn't exist locally already\n if (this.vaultExists(vaultName)) {\n throw Error('Vault name already exists locally, try pulling instead');\n }\n const vaultUrl = `http://0.0.0.0/${vaultName}`;\n // First check if it exists on remote\n const gitRequest = this.gitFrontend.connectToPeerGit(publicKey);\n const info = await isomorphic_git_1.default.getRemoteInfo({\n http: gitRequest,\n url: vaultUrl,\n });\n if (!info.refs) {\n throw Error(`Peer does not have vault: '${vaultName}'`);\n }\n // Create new efs first\n // Generate new key\n const vaultKey = await this.keyManager.generateKey(`${vaultName}-Key`, this.keyManager.getPrivateKey());\n // Set filesystem\n const vfsInstance = new (require('virtualfs').VirtualFS)();\n const newEfs = new encryptedfs_1.EncryptedFS(vaultKey, vfsInstance, vfsInstance, this.fileSystem, process);\n // Clone vault from address\n await isomorphic_git_1.default.clone({\n fs: { promises: newEfs.promises },\n http: gitRequest,\n dir: path_1.default.join(this.polykeyPath, vaultName),\n url: vaultUrl,\n ref: 'master',\n singleBranch: true,\n });\n // Finally return the vault\n const vault = new Vault_1.default(vaultName, vaultKey, this.polykeyPath, this.gitFrontend);\n this.vaults.set(vaultName, vault);\n return vault;\n }\n async scanVaultNames(publicKey) {\n const gitRequest = this.gitFrontend.connectToPeerGit(publicKey);\n const vaultNameList = await gitRequest.scanVaults();\n return vaultNameList;\n }\n /**\n * Pull a vault from a specific peer\n * @param vaultName Name of vault to be pulled\n * @param publicKey Public key of polykey node that owns vault to be pulled\n */\n async pullVault(vaultName, publicKey) {\n const vault = this.getVault(vaultName);\n await vault.pullVault(publicKey);\n }\n /**\n * Determines whether the vault exists\n * @param vaultName Name of desired vault\n */\n vaultExists(vaultName) {\n const vaultPath = path_1.default.join(this.polykeyPath, vaultName);\n const vaultExists = this.fileSystem.existsSync(vaultPath);\n return vaultExists;\n }\n /**\n * [WARNING] Destroys a certain vault and all its secrets\n * @param vaultName Name of vault to be destroyed\n */\n async deleteVault(vaultName) {\n // this is convenience function for removing all tags\n // and triggering garbage collection\n // destruction is a better word as we should ensure all traces are removed\n const vaultPath = path_1.default.join(this.polykeyPath, vaultName);\n // Remove directory on file system\n if (this.fileSystem.existsSync(vaultPath)) {\n this.fileSystem.rmdirSync(vaultPath, { recursive: true });\n }\n // Remove from maps\n this.vaults.delete(vaultName);\n this.vaultKeys.delete(vaultName);\n // Write to metadata file\n await this.writeEncryptedMetadata();\n const vaultPathExists = this.fileSystem.existsSync(vaultPath);\n if (vaultPathExists) {\n throw Error('Vault folder could not be deleted!');\n }\n }\n /* ============ HELPERS =============== */\n validateVault(vaultName) {\n if (!this.vaults.has(vaultName)) {\n throw Error(`vault does not exist in memory: '${vaultName}'`);\n }\n if (!this.vaultKeys.has(vaultName)) {\n throw Error(`vault key does not exist in memory: '${vaultName}'`);\n }\n const vaultPath = path_1.default.join(this.polykeyPath, vaultName);\n if (!this.fileSystem.existsSync(vaultPath)) {\n throw Error(`vault directory does not exist: '${vaultPath}'`);\n }\n }\n async writeEncryptedMetadata() {\n const metadata = JSON.stringify([...this.vaultKeys]);\n const encryptedMetadata = await this.keyManager.encryptData(Buffer.from(metadata));\n await this.fileSystem.promises.writeFile(this.metadataPath, encryptedMetadata);\n }\n async loadEncryptedMetadata() {\n // Check if file exists\n if (this.fileSystem.existsSync(this.metadataPath) && this.keyManager.identityLoaded) {\n const encryptedMetadata = this.fileSystem.readFileSync(this.metadataPath);\n const metadata = (await this.keyManager.decryptData(encryptedMetadata)).toString();\n for (const [key, value] of new Map(JSON.parse(metadata))) {\n this.vaultKeys.set(key, Buffer.from(value));\n }\n // Initialize vaults in memory\n for (const [vaultName, vaultKey] of this.vaultKeys.entries()) {\n console.log(vaultName);\n console.log(vaultKey);\n const vaultPath = path_1.default.join(this.polykeyPath, vaultName);\n if (this.fileSystem.existsSync(vaultPath)) {\n const vault = new Vault_1.default(vaultName, vaultKey, this.polykeyPath, this.gitFrontend);\n this.vaults.set(vaultName, vault);\n }\n }\n }\n }\n}\nexports.default = VaultManager;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst fs_1 = __importDefault(require(\"fs\"));\nconst path_1 = __importDefault(require(\"path\"));\nconst isomorphic_git_1 = __importDefault(require(\"isomorphic-git\"));\nconst async_mutex_1 = require(\"async-mutex\");\nconst encryptedfs_1 = require(\"encryptedfs\");\nclass Vault {\n constructor(name, symKey, baseDir, gitFrontend) {\n // Concurrency\n this.mutex = new async_mutex_1.Mutex();\n // how do we create pub/priv key pair?\n // do we use the same gpg pub/priv keypair\n this.key = symKey;\n // Set filesystem\n const vfsInstance = new (require('virtualfs').VirtualFS)();\n this.efs = new encryptedfs_1.EncryptedFS(this.key, vfsInstance, vfsInstance, fs_1.default, process);\n this.name = name;\n this.vaultPath = path_1.default.join(baseDir, name);\n // make the vault directory\n this.efs.mkdirSync(this.vaultPath, { recursive: true });\n this.secrets = new Map();\n this.loadSecrets();\n this.gitFrontend = gitFrontend;\n // Load metadata\n this.metadataPath = path_1.default.join(this.vaultPath, '.vault', 'metadata');\n this.loadMetadata();\n }\n async initializeVault() {\n // Init repository for vault\n const efs = this.EncryptedFS;\n const fileSystem = { promises: efs.promises };\n // first make sure its not already initialized\n try {\n const statusMatrix = await isomorphic_git_1.default.statusMatrix({\n fs: fileSystem,\n dir: this.vaultPath,\n });\n if (statusMatrix == undefined) {\n return;\n }\n }\n catch (error) {\n return;\n }\n await isomorphic_git_1.default.init({\n fs: fileSystem,\n dir: this.vaultPath,\n });\n // Initial commit\n await isomorphic_git_1.default.commit({\n fs: fileSystem,\n dir: this.vaultPath,\n author: {\n name: this.name,\n },\n message: 'init commit',\n });\n // Write packed-refs file because isomorphic git goes searching for it\n // and apparently its not autogenerated\n efs.writeFileSync(path_1.default.join(this.vaultPath, '.git', 'packed-refs'), '# pack-refs with: peeled fully-peeled sorted');\n }\n /**\n * Returns the Encrypted File System used for vault operations\n */\n get EncryptedFS() {\n return this.efs;\n }\n /**\n * Determines whether a secret exists in the vault\n * @param secretName Name of desired secret\n */\n secretExists(secretName) {\n const secretPath = path_1.default.join(this.vaultPath, secretName);\n return this.secrets.has(secretName) && this.efs.existsSync(secretPath);\n }\n /**\n * Adds a secret to the vault\n * @param secretName Name of new secret\n * @param secret Content of new secret\n */\n async addSecret(secretName, secret) {\n const release = await this.mutex.acquire();\n try {\n // Check if secret already exists\n if (this.secrets.has(secretName)) {\n throw Error('Secret already exists, try updating it instead.');\n }\n const writePath = path_1.default.join(this.vaultPath, secretName);\n // Write secret\n await this.efs.promises.writeFile(writePath, secret, {});\n // Update secrets map\n this.secrets.set(secretName, secret);\n // Auto commit message\n await this.commitChanges(`Add secret: ${secretName}`, secretName, 'added');\n }\n catch (error) {\n release();\n throw error;\n }\n finally {\n release();\n }\n }\n /**\n * Updates a secret in the vault\n * @param secretName Name of secret to be updated\n * @param secret Content of updated secret\n */\n async updateSecret(secretName, secret) {\n const release = await this.mutex.acquire();\n try {\n // Check if secret already exists\n if (!this.secrets.has(secretName)) {\n throw Error('Secret does not exist, try adding it instead.');\n }\n const writePath = path_1.default.join(this.vaultPath, secretName);\n // Write secret\n await this.efs.promises.writeFile(writePath, secret, {});\n // Update secrets map\n this.secrets.set(secretName, secret);\n // Auto commit message\n await this.commitChanges(`Update secret: ${secretName}`, secretName, 'modified');\n }\n catch (error) {\n release();\n throw error;\n }\n finally {\n release();\n }\n }\n /**\n * Get a secret from the vault\n * @param secretName Name of secret to be retrieved\n */\n getSecret(secretName) {\n if (this.secrets.has(secretName)) {\n const secret = this.secrets.get(secretName);\n if (secret) {\n return secret;\n }\n else {\n const secretPath = path_1.default.join(this.vaultPath, secretName);\n // TODO: this should be async\n const secretBuf = this.efs.readFileSync(secretPath, {});\n this.secrets.set(secretName, secretBuf);\n return secretBuf;\n }\n }\n throw Error('Secret: ' + secretName + ' does not exist');\n }\n /**\n * [WARNING] Removes a secret from the vault\n * @param secretName Name of secret to be removed\n */\n async removeSecret(secretName) {\n const release = await this.mutex.acquire();\n try {\n if (this.secrets.has(secretName)) {\n const successful = this.secrets.delete(secretName);\n // Remove from fs\n await this.efs.promises.unlink(path_1.default.join(this.vaultPath, secretName));\n // Auto commit message\n await this.commitChanges(`Remove secret: ${secretName}`, secretName, 'removed');\n if (successful) {\n return;\n }\n throw Error('Secret: ' + secretName + ' was not removed');\n }\n throw Error('Secret: ' + secretName + ' does not exist');\n }\n catch (error) {\n release();\n throw error;\n }\n finally {\n release();\n }\n }\n /**\n * Lists all the secrets currently in the vault\n */\n listSecrets() {\n let secrets = Array.from(this.secrets.keys());\n return secrets;\n }\n tagVault() { }\n untagVault() { }\n /////////////\n // Sharing //\n /////////////\n /**\n * Allows a particular public key to access the vault\n * @param publicKey Public key to share with\n */\n shareVault(publicKey) {\n if (this.sharedPubKeys.has(name)) {\n throw Error('Vault is already shared with given public key');\n }\n this.sharedPubKeys.add(publicKey);\n // Write metadata\n this.writeMetadata();\n }\n /**\n * Removes access to the vault for a particular public key\n * @param publicKey Public key to unshare with\n */\n unshareVault(publicKey) {\n if (!this.sharedPubKeys.has(publicKey)) {\n throw Error('Vault is not shared with given public key');\n }\n this.sharedPubKeys.delete(publicKey);\n // Write metadata\n this.writeMetadata();\n }\n /**\n * Determines if a particular public key can access the vault\n * @param publicKey Public key to check\n */\n peerCanAccess(publicKey) {\n // return this.sharedPubKeys.has(publicKey)\n return true;\n }\n /**\n * Pulls the vault from a specific address\n * @param publicKey Public key of polykey node that owns vault to be pulled\n */\n async pullVault(publicKey) {\n const release = await this.mutex.acquire();\n try {\n // Strangely enough this is needed for pulls along with ref set to 'HEAD'\n // In isogit's documentation, this is just to get the currentBranch name\n // But it solves a bug whereby if not used, git.pull complains that it can't\n // find the master branch or HEAD\n await isomorphic_git_1.default.currentBranch({\n fs: { promises: this.efs.promises },\n dir: this.vaultPath,\n fullname: true,\n });\n // First pull\n const gitClient = this.gitFrontend.connectToPeerGit(publicKey);\n await isomorphic_git_1.default.pull({\n fs: { promises: this.efs.promises },\n http: gitClient,\n dir: this.vaultPath,\n url: 'http://' + '0.0.0.0:0' + '/' + this.name,\n ref: 'HEAD',\n singleBranch: true,\n author: {\n name: this.name,\n },\n });\n // Load any new secrets\n this.loadSecrets();\n }\n catch (error) {\n release();\n throw error;\n }\n finally {\n release();\n }\n }\n async getVaultHistory(depth) {\n const logs = await isomorphic_git_1.default.log({\n fs: { promises: this.efs.promises },\n dir: this.vaultPath,\n depth,\n });\n return logs.map((commit) => {\n return commit.commit.message;\n });\n }\n // ============== Helper methods ============== //\n writeMetadata() {\n // mkdir first\n this.efs.mkdirSync(path_1.default.dirname(this.metadataPath), { recursive: true });\n // Create and write metadata\n const metadata = {\n sharedPubKeys: Array.from(this.sharedPubKeys.keys()),\n };\n this.efs.writeFileSync(this.metadataPath, JSON.stringify(metadata));\n }\n loadMetadata() {\n if (this.efs.existsSync(this.metadataPath)) {\n const fileContents = this.efs.readFileSync(this.metadataPath).toString();\n const metadata = JSON.parse(fileContents);\n this.sharedPubKeys = new Set(metadata.sharedPubKeys);\n }\n else {\n // Need to create it\n this.sharedPubKeys = new Set();\n this.writeMetadata();\n }\n }\n async commitChanges(message, secretName, action) {\n if (action == 'removed') {\n await isomorphic_git_1.default.remove({\n fs: { promises: this.efs.promises },\n dir: this.vaultPath,\n filepath: secretName,\n });\n }\n else {\n await isomorphic_git_1.default.add({\n fs: { promises: this.efs.promises },\n dir: this.vaultPath,\n filepath: secretName,\n });\n }\n return await isomorphic_git_1.default.commit({\n fs: { promises: this.efs.promises },\n dir: this.vaultPath,\n author: {\n name: this.name,\n },\n message: message,\n });\n }\n loadSecrets() {\n const secrets = fs_1.default.readdirSync(this.vaultPath, undefined);\n // Remove all secrets first\n this.secrets.clear();\n // Load secrets\n for (const secret of secrets.filter((s) => s[0] != '.')) {\n this.secrets.set(secret, null);\n }\n }\n}\nexports.default = Vault;\n","module.exports = require(\"async-mutex\");","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst path_1 = __importDefault(require(\"path\"));\nconst Git_1 = require(\"../../proto/js/Git\");\nconst readable_stream_1 = require(\"readable-stream\");\nconst uploadPack_1 = __importDefault(require(\"./upload-pack/uploadPack\"));\nconst GitSideBand_1 = __importDefault(require(\"./side-band/GitSideBand\"));\nconst packObjects_1 = __importDefault(require(\"./pack-objects/packObjects\"));\n// Here is the protocol git outlines for sending pack files over http:\n// https://git-scm.com/docs/pack-protocol/2.17.0\n// https://github.com/git/git/blob/master/Documentation/technical/pack-protocol.txt\n// This should be consulted in developing our upload pack implementation\n// This git backend (as well as HttpDuplex class) is heavily inspired by node-git-server:\n// https://github.com/gabrielcsapo/node-git-server\n// We need someway to notify other agents about what vaults we have based on some type of authorisation because they don't explicitly know about them\nclass GitBackend {\n constructor(repoDirectoryPath, getFileSystem, getVaultNames) {\n this.repoDirectoryPath = repoDirectoryPath;\n this.getFileSystem = getFileSystem;\n this.getVaultNames = getVaultNames;\n }\n async handleGitMessage(request, publicKey) {\n const { type, subMessage } = Git_1.gitInterface.GitMessage.decodeDelimited(request);\n let response;\n switch (type) {\n case Git_1.gitInterface.GitMessageType.INFO:\n {\n const { vaultName } = Git_1.gitInterface.InfoRequest.decodeDelimited(subMessage);\n response = Git_1.gitInterface.InfoReply.encodeDelimited({\n vaultName,\n body: await this.handleInfoRequest(vaultName),\n }).finish();\n }\n break;\n case Git_1.gitInterface.GitMessageType.PACK:\n {\n const { vaultName, body } = Git_1.gitInterface.PackRequest.decodeDelimited(subMessage);\n response = Git_1.gitInterface.PackReply.encodeDelimited({\n vaultName,\n body: await this.handlePackRequest(vaultName, Buffer.from(body)),\n }).finish();\n }\n break;\n case Git_1.gitInterface.GitMessageType.VAULT_NAMES:\n {\n response = Git_1.gitInterface.VaultNamesReply.encodeDelimited({\n vaultNameList: await this.handleVaultNamesRequest(publicKey),\n }).finish();\n }\n break;\n default: {\n throw Error('git message type not supported');\n }\n }\n // encode a git response\n const gitResponse = Git_1.gitInterface.GitMessage.encodeDelimited({ type, subMessage: response }).finish();\n return gitResponse;\n }\n async handleInfoRequest(repoName) {\n // Only handle upload-pack for now\n const service = 'upload-pack';\n const fileSystem = this.getFileSystem(repoName);\n const responseBuffers = [];\n if (!fileSystem.existsSync(path_1.default.join(this.repoDirectoryPath, repoName))) {\n throw Error(`repository does not exist: '${repoName}'`);\n }\n responseBuffers.push(Buffer.from(this.createGitPacketLine('# service=git-' + service + '\\n')));\n responseBuffers.push(Buffer.from('0000'));\n const buffers = await uploadPack_1.default(fileSystem, path_1.default.join(this.repoDirectoryPath, repoName), undefined, true);\n const buffersToWrite = buffers !== null && buffers !== void 0 ? buffers : [];\n responseBuffers.push(...buffersToWrite);\n return Buffer.concat(responseBuffers);\n }\n async handlePackRequest(repoName, body) {\n // eslint-disable-next-line\n return new Promise(async (resolve, reject) => {\n const responseBuffers = [];\n const fileSystem = this.getFileSystem(repoName);\n // Check if repo exists\n if (!fileSystem.existsSync(path_1.default.join(this.repoDirectoryPath, repoName))) {\n throw Error(`repository does not exist: '${repoName}'`);\n }\n if (body.toString().slice(4, 8) == 'want') {\n const wantedObjectId = body.toString().slice(9, 49);\n const packResult = await packObjects_1.default(fileSystem, path_1.default.join(this.repoDirectoryPath, repoName), [wantedObjectId], undefined);\n // This the 'wait for more data' line as I understand it\n responseBuffers.push(Buffer.from('0008NAK\\n'));\n // This is to get the side band stuff working\n const readable = new readable_stream_1.PassThrough();\n const progressStream = new readable_stream_1.PassThrough();\n const sideBand = GitSideBand_1.default.mux('side-band-64', readable, packResult.packstream, progressStream, []);\n sideBand.on('data', (data) => {\n responseBuffers.push(data);\n });\n sideBand.on('end', () => {\n resolve(Buffer.concat(responseBuffers));\n });\n sideBand.on('error', (err) => {\n reject(err);\n });\n // Write progress to the client\n progressStream.write(Buffer.from('0014progress is at 50%\\n'));\n progressStream.end();\n }\n });\n }\n async handleVaultNamesRequest(publicKey) {\n return this.getVaultNames(publicKey);\n }\n // ============ Helper functions ============ //\n createGitPacketLine(line) {\n const hexPrefix = (4 + line.length).toString(16);\n return Array(4 - hexPrefix.length + 1).join('0') + hexPrefix + line;\n }\n}\nexports.default = GitBackend;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst path_1 = __importDefault(require(\"path\"));\nconst GitPktLine_1 = __importDefault(require(\"./GitPktLine\"));\nconst GitRefManager_1 = __importDefault(require(\"./GitRefManager\"));\nasync function writeRefsAdResponse({ capabilities, refs, symrefs }) {\n const stream = [];\n // Compose capabilities string\n let syms = '';\n for (const [key, value] of Object.entries(symrefs)) {\n syms += `symref=${key}:${value} `;\n }\n let caps = `\\x00${[...capabilities].join(' ')} ${syms}agent=git/isomorphic-git@1.4.0`;\n // stream.write(GitPktLine.encode(`# service=${service}\\n`))\n // stream.write(GitPktLine.flush())\n // Note: In the edge case of a brand new repo, zero refs (and zero capabilities)\n // are returned.\n for (const [key, value] of Object.entries(refs)) {\n stream.push(GitPktLine_1.default.encode(`${value} ${key}${caps}\\n`));\n caps = '';\n }\n stream.push(GitPktLine_1.default.flush());\n return stream;\n}\nasync function uploadPack(fileSystem, dir, gitdir = path_1.default.join(dir, '.git'), advertiseRefs = false) {\n try {\n if (advertiseRefs) {\n // Send a refs advertisement\n const capabilities = ['side-band-64k'];\n let keys = await GitRefManager_1.default.listRefs(fileSystem, gitdir, 'refs');\n keys = keys.map((ref) => `refs/${ref}`);\n const refs = {};\n keys.unshift('HEAD'); // HEAD must be the first in the list\n for (const key of keys) {\n refs[key] = await GitRefManager_1.default.resolve(fileSystem, gitdir, key);\n }\n const symrefs = {};\n symrefs['HEAD'] = await GitRefManager_1.default.resolve(fileSystem, gitdir, 'HEAD', 2);\n return writeRefsAdResponse({\n capabilities,\n refs,\n symrefs,\n });\n }\n }\n catch (err) {\n err.caller = 'git.uploadPack';\n throw err;\n }\n}\nexports.default = uploadPack;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass GitPackedRefs {\n constructor(text) {\n this.refs = new Map();\n this.parsedConfig = [];\n if (text) {\n let key;\n this.parsedConfig = text\n .trim()\n .split('\\n')\n .map((line) => {\n if (/^\\s*#/.test(line)) {\n return { line: line, comment: true };\n }\n const i = line.indexOf(' ');\n if (line.startsWith('^')) {\n // This is a oid for the commit associated with the annotated tag immediately preceding this line.\n // Trim off the '^'\n const value = line.slice(1);\n // The tagname^{} syntax is based on the output of `git show-ref --tags -d`\n this.refs.set(key + '^{}', value);\n return { line: line, ref: key, peeled: value };\n }\n else {\n // This is an oid followed by the ref name\n const value = line.slice(0, i);\n key = line.slice(i + 1);\n this.refs.set(key, value);\n return { line: line, ref: key, oid: value };\n }\n });\n }\n return this;\n }\n static from(text) {\n return new GitPackedRefs(text);\n }\n}\nexports.default = GitPackedRefs;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\nIf 'side-band' or 'side-band-64k' capabilities have been specified by\nthe client, the server will send the packfile data multiplexed.\n\nEach packet starting with the packet-line length of the amount of data\nthat follows, followed by a single byte specifying the sideband the\nfollowing data is coming in on.\n\nIn 'side-band' mode, it will send up to 999 data bytes plus 1 control\ncode, for a total of up to 1000 bytes in a pkt-line. In 'side-band-64k'\nmode it will send up to 65519 data bytes plus 1 control code, for a\ntotal of up to 65520 bytes in a pkt-line.\n\nThe sideband byte will be a '1', '2' or a '3'. Sideband '1' will contain\npackfile data, sideband '2' will be used for progress information that the\nclient will generally print to stderr and sideband '3' is used for error\ninformation.\n\nIf no 'side-band' capability was specified, the server will stream the\nentire packfile without multiplexing.\n*/\nconst buffer_1 = require(\"buffer\");\nconst readable_stream_1 = require(\"readable-stream\");\nconst GitPktLine_1 = __importDefault(require(\"../upload-pack/GitPktLine\"));\nfunction splitBuffer(buffer, maxBytes) {\n const result = [];\n let index = 0;\n while (index < buffer.length) {\n const buf = buffer.slice(index, index + maxBytes);\n result.push(buf);\n index += buf.length;\n }\n result.push(buffer.slice(index));\n return result;\n}\nclass GitSideBand {\n static demux(input) {\n let read = GitPktLine_1.default.streamReader(input);\n // And now for the ridiculous side-band or side-band-64k protocol\n let packetlines = new readable_stream_1.PassThrough();\n let packfile = new readable_stream_1.PassThrough();\n let progress = new readable_stream_1.PassThrough();\n // TODO: Use a proper through stream?\n const nextBit = async function () {\n let line = await read();\n // Skip over flush packets\n if (line === null)\n return nextBit();\n // A made up convention to signal there's no more to read.\n if (line === true) {\n packetlines.end();\n progress.end();\n packfile.end();\n return;\n }\n // Examine first byte to determine which output \"stream\" to use\n switch (line[0]) {\n case 1: // pack data\n packfile.write(line.slice(1));\n break;\n case 2: // progress message\n progress.write(line.slice(1));\n break;\n case 3: // fatal error message just before stream aborts\n // eslint-disable-next-line\n const error = line.slice(1);\n progress.write(error);\n packfile.destroy(new Error(error.toString('utf8')));\n return;\n default:\n // Not part of the side-band-64k protocol\n packetlines.write(line.slice(0));\n }\n // Careful not to blow up the stack.\n // I think Promises in a tail-call position should be OK.\n nextBit();\n };\n nextBit();\n return {\n packetlines,\n packfile,\n progress,\n };\n }\n static mux(protocol, // 'side-band' or 'side-band-64k'\n packetlines, packfile, progress, error) {\n const MAX_PACKET_LENGTH = protocol === 'side-band-64k' ? 999 : 65519;\n let output = new readable_stream_1.PassThrough();\n packetlines.on('data', (data) => {\n if (data === null) {\n output.write(GitPktLine_1.default.flush());\n }\n else {\n output.write(GitPktLine_1.default.encode(data));\n }\n });\n let packfileWasEmpty = true;\n let packfileEnded = false;\n let progressEnded = false;\n let errorEnded = true;\n let goodbye = buffer_1.Buffer.concat([GitPktLine_1.default.encode(buffer_1.Buffer.from('010A', 'hex')), GitPktLine_1.default.flush()]);\n packfile\n .on('data', (data) => {\n packfileWasEmpty = false;\n const buffers = splitBuffer(data, MAX_PACKET_LENGTH);\n for (const buffer of buffers) {\n output.write(GitPktLine_1.default.encode(buffer_1.Buffer.concat([buffer_1.Buffer.from('01', 'hex'), buffer])));\n }\n })\n .on('end', () => {\n packfileEnded = true;\n if (!packfileWasEmpty)\n output.write(goodbye);\n if (progressEnded && errorEnded)\n output.end();\n });\n progress\n .on('data', (data) => {\n const buffers = splitBuffer(data, MAX_PACKET_LENGTH);\n for (const buffer of buffers) {\n output.write(GitPktLine_1.default.encode(buffer_1.Buffer.concat([buffer_1.Buffer.from('02', 'hex'), buffer])));\n }\n })\n .on('end', () => {\n progressEnded = true;\n if (packfileEnded && errorEnded)\n output.end();\n });\n // error\n // .on('data', data => {\n // const buffers = splitBuffer(data, MAX_PACKET_LENGTH)\n // for (const buffer of buffers) {\n // output.write(\n // GitPktLine.encode(Buffer.concat([Buffer.from('03', 'hex'), buffer]))\n // )\n // }\n // })\n // .on('end', () => {\n // errorEnded = true\n // if (progressEnded && packfileEnded) output.end()\n // })\n return output;\n }\n}\nexports.default = GitSideBand;\n","module.exports = require(\"buffer\");","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst pako_1 = __importDefault(require(\"pako\"));\nconst path_1 = __importDefault(require(\"path\"));\nconst log_1 = __importDefault(require(\"./log\"));\nconst GitTree_1 = __importDefault(require(\"./GitTree\"));\nconst sha_js_1 = __importDefault(require(\"sha.js\"));\nconst GitCommit_1 = __importDefault(require(\"./GitCommit\"));\nconst readable_stream_1 = require(\"readable-stream\");\nconst GitObjectManager_1 = __importDefault(require(\"./GitObjectManager\"));\nconst types = {\n commit: 0b0010000,\n tree: 0b0100000,\n blob: 0b0110000,\n tag: 0b1000000,\n ofs_delta: 0b1100000,\n ref_delta: 0b1110000,\n};\n/**\n * Create a packfile stream\n *\n * @link https://isomorphic-git.github.io/docs/packObjects.html\n */\nasync function packObjects(fileSystem, dir, refs, depth, haves) {\n const gitdir = path_1.default.join(dir, '.git');\n let oids = new Set();\n let shallows = new Set();\n let unshallows = new Set();\n let acks = [];\n haves = haves ? haves : [];\n const emitter = undefined;\n const since = undefined;\n for (const ref of refs) {\n try {\n let commits = await log_1.default(fileSystem, dir, gitdir, emitter, ref, depth, since);\n let oldshallows = [];\n for (let i = 0; i < commits.length; i++) {\n let commit = commits[i];\n if (haves.includes(commit.oid)) {\n acks.push({\n oid: ref,\n });\n break;\n }\n oids.add(commit.oid);\n if (i === commits.length - 1) {\n if (!oldshallows.includes(commit.oid) && (depth !== undefined || since !== undefined)) {\n console.log('make it shallow', commit.oid);\n shallows.add(commit.oid);\n }\n }\n else if (oldshallows.includes(commit.oid)) {\n console.log('make it unshallow', commit.oid);\n unshallows.add(commit.oid);\n }\n }\n }\n catch (err) {\n console.log(err);\n // oh well.\n }\n }\n let objects = await listObjects(fileSystem, dir, gitdir, Array.from(oids));\n let packstream = new readable_stream_1.PassThrough();\n pack(fileSystem, dir, undefined, [...objects], packstream);\n return { packstream, shallows, unshallows, acks };\n}\nasync function listObjects(fileSystem, dir, gitdir = path_1.default.join(dir, '.git'), oids) {\n let commits = new Set();\n let trees = new Set();\n let blobs = new Set();\n // We don't do the purest simplest recursion, because we can\n // avoid reading Blob objects entirely since the Tree objects\n // tell us which oids are Blobs and which are Trees. And we\n // do not need to recurse through commit parents.\n async function walk(oid) {\n let { type, object } = await GitObjectManager_1.default.read(fileSystem, gitdir, oid);\n if (type === 'commit') {\n commits.add(oid);\n let commit = GitCommit_1.default.from(object);\n let tree = commit.headers().tree;\n await walk(tree);\n }\n else if (type === 'tree') {\n trees.add(oid);\n let tree = GitTree_1.default.from(object);\n for (let entry of tree) {\n if (entry.type === 'blob') {\n blobs.add(entry.oid);\n }\n // only recurse for trees\n if (entry.type === 'tree') {\n await walk(entry.oid);\n }\n }\n }\n }\n // Let's go walking!\n for (let oid of oids) {\n await walk(oid);\n }\n return [...commits, ...trees, ...blobs];\n}\nexports.listObjects = listObjects;\nasync function pack(fileSystem, dir, gitdir = path_1.default.join(dir, '.git'), oids, outputStream) {\n let hash = sha_js_1.default('sha1');\n function write(chunk, enc = undefined) {\n if (enc) {\n outputStream.write(chunk, enc);\n }\n else {\n outputStream.write(chunk);\n }\n hash.update(chunk, enc);\n }\n function writeObject(object, stype) {\n let lastFour;\n let multibyte;\n let length;\n // Object type is encoded in bits 654\n let type = types[stype];\n if (type === undefined)\n throw Error('Unrecognized type: ' + stype);\n // The length encoding get complicated.\n length = object.length;\n // Whether the next byte is part of the variable-length encoded number\n // is encoded in bit 7\n multibyte = length > 0b1111 ? 0b10000000 : 0b0;\n // Last four bits of length is encoded in bits 3210\n lastFour = length & 0b1111;\n // Discard those bits\n length = length >>> 4;\n // The first byte is then (1-bit multibyte?), (3-bit type), (4-bit least sig 4-bits of length)\n let byte = (multibyte | type | lastFour).toString(16);\n write(byte, 'hex');\n // Now we keep chopping away at length 7-bits at a time until its zero,\n // writing out the bytes in what amounts to little-endian order.\n while (multibyte) {\n multibyte = length > 0b01111111 ? 0b10000000 : 0b0;\n byte = multibyte | (length & 0b01111111);\n const unpaddedChunk = byte.toString(16);\n const paddedChunk = '0'.repeat(2 - unpaddedChunk.length) + unpaddedChunk;\n write(paddedChunk, 'hex');\n length = length >>> 7;\n }\n // Lastly, we can compress and write the object.\n write(Buffer.from(pako_1.default.deflate(object)));\n }\n write('PACK');\n write('00000002', 'hex');\n // Write a 4 byte (32-bit) int\n const unpaddedChunk = oids.length.toString(16);\n const paddedChunk = '0'.repeat(8 - unpaddedChunk.length) + unpaddedChunk;\n write(paddedChunk, 'hex');\n for (let oid of oids) {\n let { type, object } = await GitObjectManager_1.default.read(fileSystem, gitdir, oid);\n writeObject(object, type);\n }\n // Write SHA1 checksum\n let digest = hash.digest();\n outputStream.end(digest);\n return outputStream;\n}\nexports.pack = pack;\nexports.default = packObjects;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst path = require(\"path\");\nconst GitCommit_1 = __importDefault(require(\"./GitCommit\"));\nconst GitObjectManager_1 = __importDefault(require(\"./GitObjectManager\"));\nconst GitRefManager_1 = __importDefault(require(\"../upload-pack/GitRefManager\"));\nasync function logCommit(fileSystem, gitdir, oid, signing) {\n try {\n let { type, object } = await GitObjectManager_1.default.read(fileSystem, gitdir, oid);\n if (type !== 'commit') {\n throw new Error('expected type to be commit');\n }\n const commit = GitCommit_1.default.from(object);\n const result = Object.assign({ oid }, commit.parse());\n if (signing) {\n result.payload = commit.withoutSignature();\n }\n return result;\n }\n catch (err) {\n return {\n oid,\n error: err,\n };\n }\n}\nexports.logCommit = logCommit;\nfunction compareAge(a, b) {\n return a.committer.timestamp - b.committer.timestamp;\n}\n/**\n * Get commit descriptions from the git history\n *\n * @link https://isomorphic-git.github.io/docs/log.html\n */\nasync function log(fileSystem, dir, gitdir = path.join(dir, '.git'), ref = 'HEAD', depth, since, // Date\nsigning = false) {\n try {\n let sinceTimestamp = since === undefined ? undefined : Math.floor(since.valueOf() / 1000);\n // TODO: In the future, we may want to have an API where we return a\n // async iterator that emits commits.\n let commits = [];\n let oid = await GitRefManager_1.default.resolve(fileSystem, gitdir, ref);\n let tips = [await logCommit(fileSystem, gitdir, oid, signing)];\n // eslint-disable-next-line\n while (true) {\n let commit = tips.pop();\n // Stop the loop if we encounter an error\n if (commit.error) {\n commits.push(commit);\n break;\n }\n // Stop the log if we've hit the age limit\n if (sinceTimestamp !== undefined && commit.committer.timestamp <= sinceTimestamp) {\n break;\n }\n commits.push(commit);\n // Stop the loop if we have enough commits now.\n if (depth !== undefined && commits.length === depth)\n break;\n // Add the parents of this commit to the queue\n // Note: for the case of a commit with no parents, it will concat an empty array, having no net effect.\n for (const oid of commit.parent) {\n let commit = await logCommit(fileSystem, gitdir, oid, signing);\n if (!tips.map((commit) => commit.oid).includes(commit.oid)) {\n tips.push(commit);\n }\n }\n // Stop the loop if there are no more commit parents\n if (tips.length === 0)\n break;\n // Process tips in order by age\n tips.sort(compareAge);\n }\n return commits;\n }\n catch (err) {\n err.caller = 'git.log';\n throw err;\n }\n}\nexports.default = log;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst shasum_1 = __importDefault(require(\"./shasum\"));\nclass GitObject {\n static hash({ type, object }) {\n let buffer = Buffer.concat([Buffer.from(`${type} ${object.byteLength.toString()}\\0`), Buffer.from(object)]);\n let oid = shasum_1.default(buffer);\n return oid;\n }\n static wrap({ type, object }) {\n let buffer = Buffer.concat([Buffer.from(`${type} ${object.byteLength.toString()}\\0`), object]);\n let oid = shasum_1.default(buffer);\n return {\n oid,\n buffer,\n };\n }\n static unwrap({ oid, buffer }) {\n if (oid) {\n let sha = shasum_1.default(buffer);\n if (sha !== oid) {\n throw new Error(`SHA check failed! Expected ${oid}, computed ${sha}`);\n }\n }\n let s = buffer.indexOf(32); // first space\n let i = buffer.indexOf(0); // first null value\n let type = buffer.slice(0, s).toString('utf8'); // get type of object\n let length = buffer.slice(s + 1, i).toString('utf8'); // get type of object\n let actualLength = buffer.length - (i + 1);\n // verify length\n if (parseInt(length) !== actualLength) {\n throw new Error(`Length mismatch: expected ${length} bytes but got ${actualLength} instead.`);\n }\n return {\n type,\n object: Buffer.from(buffer.slice(i + 1)),\n };\n }\n}\nexports.default = GitObject;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst sha1_1 = __importDefault(require(\"sha.js/sha1\"));\n// This is modeled after @dominictarr's \"shasum\" module,\n// but without the 'json-stable-stringify' dependency and\n// extra type-casting features.\nfunction shasum(buffer) {\n return new sha1_1.default().update(buffer).digest('hex');\n}\nexports.default = shasum;\n","module.exports = require(\"sha.js/sha1\");","\"use strict\";\n/*::\ntype TreeEntry = {\n mode: string,\n path: string,\n oid: string,\n type?: string\n}\n*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction parseBuffer(buffer) {\n let _entries = [];\n let cursor = 0;\n while (cursor < buffer.length) {\n let space = buffer.indexOf(32, cursor);\n if (space === -1) {\n throw new Error(`GitTree: Error parsing buffer at byte location ${cursor}: Could not find the next space character.`);\n }\n let nullchar = buffer.indexOf(0, cursor);\n if (nullchar === -1) {\n throw new Error(`GitTree: Error parsing buffer at byte location ${cursor}: Could not find the next null character.`);\n }\n let mode = buffer.slice(cursor, space).toString('utf8');\n if (mode === '40000')\n mode = '040000'; // makes it line up neater in printed output\n let type = mode === '040000' ? 'tree' : 'blob';\n let path = buffer.slice(space + 1, nullchar).toString('utf8');\n let oid = buffer.slice(nullchar + 1, nullchar + 21).toString('hex');\n cursor = nullchar + 21;\n _entries.push({ mode, path, oid, type });\n }\n return _entries;\n}\nfunction limitModeToAllowed(mode) {\n if (typeof mode === 'number') {\n mode = mode.toString(8);\n }\n // tree\n if (mode.match(/^0?4.*/))\n return '40000'; // Directory\n if (mode.match(/^1006.*/))\n return '100644'; // Regular non-executable file\n if (mode.match(/^1007.*/))\n return '100755'; // Regular executable file\n if (mode.match(/^120.*/))\n return '120000'; // Symbolic link\n if (mode.match(/^160.*/))\n return '160000'; // Commit (git submodule reference)\n throw new Error(`Could not understand file mode: ${mode}`);\n}\nfunction nudgeIntoShape(entry) {\n if (!entry.oid && entry.sha) {\n entry.oid = entry.sha; // Github\n }\n entry.mode = limitModeToAllowed(entry.mode); // index\n if (!entry.type) {\n entry.type = 'blob'; // index\n }\n return entry;\n}\nclass GitTree {\n constructor(entries) {\n if (Buffer.isBuffer(entries)) {\n this._entries = parseBuffer(entries);\n }\n else if (Array.isArray(entries)) {\n this._entries = entries.map(nudgeIntoShape);\n }\n else {\n throw new Error('invalid type passed to GitTree constructor');\n }\n }\n static from(tree) {\n return new GitTree(tree);\n }\n render() {\n return this._entries.map((entry) => `${entry.mode} ${entry.type} ${entry.oid} ${entry.path}`).join('\\n');\n }\n toObject() {\n return Buffer.concat(this._entries.map((entry) => {\n let mode = Buffer.from(entry.mode.replace(/^0/, ''));\n let space = Buffer.from(' ');\n let path = Buffer.from(entry.path);\n // let path = Buffer.from(entry.path, { encoding: 'utf8' })\n let nullchar = Buffer.from([0]);\n let oid = Buffer.from(entry.oid.match(/../g).map((n) => parseInt(n, 16)));\n return Buffer.concat([mode, space, path, nullchar, oid]);\n }));\n }\n entries() {\n return this._entries;\n }\n *[Symbol.iterator]() {\n for (let entry of this._entries) {\n yield entry;\n }\n }\n}\nexports.default = GitTree;\n","module.exports = require(\"sha.js\");","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst GitRequest_1 = __importDefault(require(\"./GitRequest\"));\nconst Git_1 = require(\"../../proto/js/Git\");\nconst Peer_pb_1 = require(\"../../proto/compiled/Peer_pb\");\n/**\n * Responsible for converting HTTP messages from isomorphic-git into requests and sending them to a specific peer.\n */\nclass GitFrontend {\n constructor(peerManager) {\n this.peerManager = peerManager;\n }\n /**\n * Requests remote info from the connected peer for the named vault.\n * @param vaultName Name of the desired vault\n * @param peerConnection A connection object to the peer\n */\n async requestInfo(vaultName, peerConnection) {\n const request = Git_1.gitInterface.InfoRequest.encodeDelimited({ vaultName }).finish();\n const response = await peerConnection.sendPeerRequest(Peer_pb_1.SubServiceType.GIT, Git_1.gitInterface.GitMessage.encodeDelimited({ type: Git_1.gitInterface.GitMessageType.INFO, subMessage: request }).finish());\n const { type, subMessage } = Git_1.gitInterface.GitMessage.decodeDelimited(response);\n const { body: responseBody } = Git_1.gitInterface.InfoReply.decodeDelimited(subMessage);\n return responseBody;\n }\n /**\n * Requests a pack from the connected peer for the named vault.\n * @param vaultName Name of the desired vault\n * @param body Contains the pack request\n * @param peerConnection A connection object to the peer\n */\n async requestPack(vaultName, body, peerConnection) {\n const request = Git_1.gitInterface.PackRequest.encodeDelimited({ vaultName, body }).finish();\n const response = await peerConnection.sendPeerRequest(Peer_pb_1.SubServiceType.GIT, Git_1.gitInterface.GitMessage.encodeDelimited({ type: Git_1.gitInterface.GitMessageType.PACK, subMessage: request }).finish());\n const { type, subMessage } = Git_1.gitInterface.GitMessage.decodeDelimited(response);\n const { body: responseBody } = Git_1.gitInterface.PackReply.decodeDelimited(subMessage);\n return responseBody;\n }\n /**\n * Requests a pack from the connected peer for the named vault.\n * @param vaultName Name of the desired vault\n * @param body Contains the pack request\n * @param peerConnection A connection object to the peer\n */\n async requestVaultNames(peerConnection) {\n const response = await peerConnection.sendPeerRequest(Peer_pb_1.SubServiceType.GIT, Git_1.gitInterface.GitMessage.encodeDelimited({\n type: Git_1.gitInterface.GitMessageType.VAULT_NAMES,\n subMessage: Buffer.from(''),\n }).finish());\n const { type, subMessage } = Git_1.gitInterface.GitMessage.decodeDelimited(response);\n const { vaultNameList } = Git_1.gitInterface.VaultNamesReply.decodeDelimited(subMessage);\n return vaultNameList;\n }\n connectToPeerGit(publicKey) {\n const peerConnection = this.peerManager.connectToPeer(publicKey);\n const gitRequest = new GitRequest_1.default(((vaultName) => this.requestInfo(vaultName, peerConnection)).bind(this), ((vaultName, body) => this.requestPack(vaultName, body, peerConnection)).bind(this), (() => this.requestVaultNames(peerConnection)).bind(this));\n return gitRequest;\n }\n}\nexports.default = GitFrontend;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Responsible for converting HTTP messages from isomorphic-git into requests and sending them to a specific peer.\n */\nclass GitRequest {\n constructor(requestInfo, requestPack, requestVaultNames) {\n this.requestInfo = requestInfo;\n this.requestPack = requestPack;\n this.requestVaultNames = requestVaultNames;\n }\n /**\n * The custom http request method to feed into isomorphic-git's [custom http object](https://isomorphic-git.org/docs/en/http)\n */\n async request({ url, method, headers, body, onProgress }) {\n // eslint-disable-next-line\n return new Promise(async (resolve, reject) => {\n const u = new URL(url);\n // Parse request\n if (method == 'GET') {\n // Info request\n const match = u.pathname.match(/\\/(.+)\\/info\\/refs$/);\n if (!match || /\\.\\./.test(match[1])) {\n reject(new Error('Error'));\n }\n const vaultName = match[1];\n const infoResponse = await this.requestInfo(vaultName);\n resolve({\n url: url,\n method: method,\n statusCode: 200,\n statusMessage: 'OK',\n body: this.iteratorFromData(infoResponse),\n headers: headers,\n });\n }\n else if (method == 'POST') {\n // Info request\n const match = u.pathname.match(/\\/(.+)\\/git-(.+)/);\n if (!match || /\\.\\./.test(match[1])) {\n reject(new Error('Error'));\n }\n const vaultName = match[1];\n const packResponse = await this.requestPack(vaultName, body[0]);\n resolve({\n url: url,\n method: method,\n statusCode: 200,\n statusMessage: 'OK',\n body: this.iteratorFromData(packResponse),\n headers: headers,\n });\n }\n else {\n reject(new Error('Method not supported'));\n }\n });\n }\n async scanVaults() {\n return await this.requestVaultNames();\n }\n // ==== HELPER METHODS ==== //\n /**\n * Converts a buffer into an iterator expected by isomorphic git.\n * @param data Data to be turned into an iterator\n */\n iteratorFromData(data) {\n let ended = false;\n return {\n next() {\n return new Promise((resolve, reject) => {\n if (ended) {\n return resolve({ done: true });\n }\n else {\n ended = true;\n resolve({ value: data, done: false });\n }\n });\n },\n };\n }\n}\nexports.default = GitRequest;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst fs_1 = __importDefault(require(\"fs\"));\nconst path_1 = __importDefault(require(\"path\"));\nconst process_1 = __importDefault(require(\"process\"));\nconst get_port_1 = __importDefault(require(\"get-port\"));\nconst util_1 = require(\"util\");\nconst configstore_1 = __importDefault(require(\"configstore\"));\nconst grpc = __importStar(require(\"@grpc/grpc-js\"));\nconst child_process_1 = require(\"child_process\");\nconst agent = __importStar(require(\"../../proto/compiled/Agent_pb\"));\nconst Polykey_1 = __importStar(require(\"../Polykey\"));\nconst Agent_grpc_pb_1 = require(\"../../proto/compiled/Agent_grpc_pb\");\nclass PolykeyAgent {\n constructor(polykeyPath) {\n /////////////\n // Polykey //\n /////////////\n // construct polykey instance if already initialized\n this.pk = new Polykey_1.default(polykeyPath, fs_1.default);\n //////////////////\n // Config Store //\n //////////////////\n this.configStore = PolykeyAgent.ConfigStore(this.pk.polykeyPath);\n /////////////\n // Process //\n /////////////\n process_1.default.title = 'polykey-agent';\n // set pid for stopAgent command\n this.pid = process_1.default.pid;\n this.configStore.set('pid', this.pid);\n /////////////////\n // GRPC Server //\n /////////////////\n this.server = new grpc.Server();\n this.server.addService(Agent_grpc_pb_1.AgentService, this);\n }\n failOnLocked() {\n if (!this.pk.keyManager.identityLoaded) {\n throw Error(`polykey is locked at ${this.pk.polykeyPath}`);\n }\n }\n static CAStore(polykeyPath) {\n return new configstore_1.default('ca', undefined, {\n configPath: path_1.default.join(polykeyPath, '.agent', 'caStoreConfig.json'),\n });\n }\n get ServerCredentials() {\n const caStoreConfig = PolykeyAgent.CAStore(this.pk.polykeyPath);\n // The agent stores its root certificate and the client cert and keypair\n // in a user specific folder.\n // check if credentials exist for current polykey path\n let caStore;\n if (caStoreConfig.has(this.pk.polykeyPath)) {\n caStore = caStoreConfig.get(this.pk.polykeyPath);\n }\n else {\n const clientCreds = this.pk.keyManager.pki.createAgentClientCredentials();\n caStore = {\n rootCert: this.pk.keyManager.pki.RootCert,\n ...clientCreds,\n };\n caStoreConfig.set(this.pk.polykeyPath, caStore);\n }\n ////////////////////////\n // Server credentials //\n ////////////////////////\n const tlsCredentials = this.pk.keyManager.pki.createAgentServerCredentials();\n if (tlsCredentials) {\n return grpc.ServerCredentials.createSsl(Buffer.from(this.pk.keyManager.pki.RootCert), [\n {\n private_key: Buffer.from(tlsCredentials.serverKeyPair.private),\n cert_chain: Buffer.from(tlsCredentials.serverCert),\n },\n ], true);\n }\n else {\n return grpc.ServerCredentials.createInsecure();\n }\n }\n async startServer() {\n // first try and stop server if its still running\n // don't need to catch errors\n try {\n await util_1.promisify(this.server.tryShutdown)();\n }\n catch (error) { }\n // handle port\n const portString = this.configStore.get('port');\n const portOptions = portString\n ? { host: 'localhost', port: parseInt(portString) }\n : undefined;\n const port = await get_port_1.default(portOptions);\n // bind server to port and start\n const boundPort = await new Promise((resolve, reject) => {\n this.server.bindAsync(`localhost:${port}`, this.ServerCredentials, (error, boundPort) => {\n if (error) {\n reject(error);\n }\n else {\n resolve(boundPort);\n }\n });\n });\n this.server.start();\n this.configStore.set('port', boundPort);\n console.log(`Agent started on: 'localhost:${boundPort}'`);\n }\n async addPeer(call, callback) {\n try {\n this.failOnLocked();\n const { publicKey, peerAddress, relayPublicKey, apiAddress } = call.request.toObject();\n this.pk.peerManager.addPeer(new Polykey_1.PeerInfo(publicKey, peerAddress, relayPublicKey, apiAddress));\n const response = new agent.BooleanMessage();\n response.setB(true);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async decryptFile(call, callback) {\n try {\n this.failOnLocked();\n const { filePath, privateKeyPath, passphrase } = call.request.toObject();\n const decryptedPath = await this.pk.keyManager.decryptFile(filePath, privateKeyPath, passphrase);\n const response = new agent.StringMessage();\n response.setS(decryptedPath);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async deleteKey(call, callback) {\n try {\n this.failOnLocked();\n const { s } = call.request.toObject();\n const successful = await this.pk.keyManager.deleteKey(s);\n const response = new agent.BooleanMessage();\n response.setB(successful);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async deleteSecret(call, callback) {\n try {\n this.failOnLocked();\n const { vaultName, secretName } = call.request.toObject();\n const vault = this.pk.vaultManager.getVault(vaultName);\n await vault.removeSecret(secretName);\n const response = new agent.BooleanMessage();\n response.setB(true);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async deleteVault(call, callback) {\n try {\n this.failOnLocked();\n const { s } = call.request.toObject();\n await this.pk.vaultManager.deleteVault(s);\n const response = new agent.BooleanMessage();\n response.setB(true);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async deriveKey(call, callback) {\n try {\n this.failOnLocked();\n const { keyName, passphrase } = call.request.toObject();\n await this.pk.keyManager.generateKey(keyName, passphrase);\n const response = new agent.BooleanMessage();\n response.setB(true);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async encryptFile(call, callback) {\n try {\n this.failOnLocked();\n const { filePath, publicKeyPath } = call.request.toObject();\n const encryptedPath = await this.pk.keyManager.encryptFile(filePath, publicKeyPath);\n const response = new agent.StringMessage();\n response.setS(encryptedPath);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async findPeer(call, callback) {\n try {\n this.failOnLocked();\n const { publicKeyOrHandle, timeout } = call.request.toObject();\n const successful = await this.pk.peerManager.findPublicKey(publicKeyOrHandle, timeout);\n const response = new agent.BooleanMessage();\n response.setB(successful);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async findSocialPeer(call, callback) {\n try {\n this.failOnLocked();\n const { publicKeyOrHandle, timeout } = call.request.toObject();\n // eslint-disable-next-line\n const usernameRegex = /^\\@([a-zA-Z0-9_-]+)\\/([a-zA-Z0-9_-]+)/;\n const matches = publicKeyOrHandle.match(usernameRegex);\n const service = matches[1];\n const handle = matches[2];\n const successful = await this.pk.peerManager.findSocialUser(handle, service, timeout);\n const response = new agent.BooleanMessage();\n response.setB(successful);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async getKey(call, callback) {\n try {\n this.failOnLocked();\n const { s } = call.request.toObject();\n const keyContent = this.pk.keyManager.getKey(s).toString();\n const response = new agent.StringMessage();\n response.setS(keyContent);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async getLocalPeerInfo(call, callback) {\n var _a, _b;\n try {\n this.failOnLocked();\n const { s } = call.request.toObject();\n const peerInfo = this.pk.peerManager.peerInfo;\n const response = new agent.PeerInfoMessage();\n response.setPublicKey(peerInfo.publicKey);\n if (peerInfo.relayPublicKey) {\n response.setRelayPublicKey(peerInfo.relayPublicKey);\n }\n if (peerInfo.peerAddress) {\n response.setPeerAddress((_a = peerInfo.peerAddress) === null || _a === void 0 ? void 0 : _a.toString());\n }\n if (peerInfo.apiAddress) {\n response.setApiAddress((_b = peerInfo.apiAddress) === null || _b === void 0 ? void 0 : _b.toString());\n }\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async getPeerInfo(call, callback) {\n var _a, _b;\n try {\n this.failOnLocked();\n const { s } = call.request.toObject();\n if (!this.pk.peerManager.hasPeer(s)) {\n throw Error('public key does not exist in peer store');\n }\n const peerInfo = this.pk.peerManager.getPeer(s);\n const response = new agent.PeerInfoMessage();\n response.setPublicKey(peerInfo.publicKey);\n if (peerInfo.relayPublicKey) {\n response.setRelayPublicKey(peerInfo.relayPublicKey);\n }\n if (peerInfo.peerAddress) {\n response.setPeerAddress((_a = peerInfo.peerAddress) === null || _a === void 0 ? void 0 : _a.toString());\n }\n if (peerInfo.apiAddress) {\n response.setApiAddress((_b = peerInfo.apiAddress) === null || _b === void 0 ? void 0 : _b.toString());\n }\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async getPrimaryKeyPair(call, callback) {\n try {\n this.failOnLocked();\n const { b } = call.request.toObject();\n const keypair = this.pk.keyManager.getKeyPair();\n const response = new agent.KeyPairMessage();\n response.setPublicKey(keypair.public);\n if (b) {\n response.setPrivateKey(keypair.private);\n }\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async getSecret(call, callback) {\n try {\n this.failOnLocked();\n const { vaultName, secretName } = call.request.toObject();\n const vault = this.pk.vaultManager.getVault(vaultName);\n const secret = vault.getSecret(secretName).toString();\n const response = new agent.StringMessage();\n response.setS(secret);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async getStatus(call, callback) {\n try {\n const response = new agent.AgentStatusMessage();\n response.setStatus(agent.AgentStatusType.ONLINE);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async listKeys(call, callback) {\n try {\n this.failOnLocked();\n const keyNames = this.pk.keyManager.listKeys();\n const response = new agent.StringListMessage();\n response.setSList(keyNames);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n listNodes(call, callback) {\n try {\n const { b } = call.request.toObject();\n const response = new agent.StringListMessage();\n response.setSList([this.pk.polykeyPath]);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async listPeers(call, callback) {\n try {\n this.failOnLocked();\n const publicKeys = this.pk.peerManager.listPeers();\n const response = new agent.StringListMessage();\n response.setSList(publicKeys);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async listSecrets(call, callback) {\n try {\n this.failOnLocked();\n const { s } = call.request.toObject();\n const vault = this.pk.vaultManager.getVault(s);\n const secretNames = vault.listSecrets();\n const response = new agent.StringListMessage();\n response.setSList(secretNames);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async listVaults(call, callback) {\n try {\n this.failOnLocked();\n const vaultNames = this.pk.vaultManager.getVaultNames();\n const response = new agent.StringListMessage();\n response.setSList(vaultNames);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async newNode(call, callback) {\n try {\n const { userid, passphrase, nbits } = call.request.toObject();\n // check node is already initialized\n if (this.pk.keyManager.hasPrivateKey()) {\n throw Error(`polykey keypair already exists at node path: '${this.pk.polykeyPath}'`);\n }\n const km = new Polykey_1.KeyManager(this.pk.polykeyPath, fs_1.default);\n const resolvedNBits = nbits && nbits != 0 ? nbits : undefined;\n await km.generateKeyPair(userid, passphrase, resolvedNBits, true);\n this.pk = new Polykey_1.default(this.pk.polykeyPath, fs_1.default, km);\n const response = new agent.BooleanMessage();\n response.setB(true);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async newSecret(call, callback) {\n try {\n this.failOnLocked();\n const { secretPath, secretFilePath, secretContent } = call.request.toObject();\n const vault = this.pk.vaultManager.getVault(secretPath === null || secretPath === void 0 ? void 0 : secretPath.vaultName);\n let secretBuffer;\n if (secretFilePath) {\n secretBuffer = await fs_1.default.promises.readFile(secretFilePath);\n }\n else {\n secretBuffer = Buffer.from(secretContent);\n }\n await vault.addSecret(secretPath === null || secretPath === void 0 ? void 0 : secretPath.secretName, secretBuffer);\n const response = new agent.BooleanMessage();\n response.setB(true);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async newVault(call, callback) {\n try {\n this.failOnLocked();\n const { s } = call.request.toObject();\n await this.pk.vaultManager.newVault(s);\n const response = new agent.BooleanMessage();\n response.setB(true);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async pingPeer(call, callback) {\n try {\n this.failOnLocked();\n const { publicKeyOrHandle, timeout } = call.request.toObject();\n const successful = await this.pk.peerManager.pingPeer(publicKeyOrHandle, timeout);\n const response = new agent.BooleanMessage();\n response.setB(successful);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async pullVault(call, callback) {\n try {\n this.failOnLocked();\n const { vaultName, publicKey } = call.request.toObject();\n // pull if vault exists locally, otherwise clone\n if (this.pk.vaultManager.vaultExists(vaultName)) {\n const vault = this.pk.vaultManager.getVault(vaultName);\n await vault.pullVault(publicKey);\n }\n else {\n await this.pk.vaultManager.cloneVault(vaultName, publicKey);\n }\n const response = new agent.BooleanMessage();\n response.setB(true);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async registerNode(call, callback) {\n try {\n if (this.pk.keyManager.identityLoaded) {\n throw Error('node is already unlocked');\n }\n const { s } = call.request.toObject();\n await this.pk.keyManager.unlockIdentity(s);\n // re-load all meta data\n await this.pk.keyManager.loadEncryptedMetadata();\n this.pk.peerManager.loadMetadata();\n await this.pk.vaultManager.loadEncryptedMetadata();\n await this.pk.httpApi.start();\n // send response\n const response = new agent.BooleanMessage();\n response.setB(true);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async requestHolePunch(call, callback) {\n try {\n this.failOnLocked();\n const { s } = call.request.toObject();\n const address = await this.pk.peerManager.turnClient.requestLocalHolePunchAddress(s);\n const response = new agent.BooleanMessage();\n response.setB(true);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async requestRelay(call, callback) {\n try {\n this.failOnLocked();\n const { s } = call.request.toObject();\n await this.pk.peerManager.turnClient.requestRelayConnection(s);\n const response = new agent.BooleanMessage();\n response.setB(true);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async scanVaultNames(call, callback) {\n try {\n this.failOnLocked();\n const { s } = call.request.toObject();\n const vaultNames = await this.pk.vaultManager.scanVaultNames(s);\n const response = new agent.StringListMessage();\n response.setSList(vaultNames);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async signFile(call, callback) {\n try {\n this.failOnLocked();\n const { filePath, privateKeyPath, passphrase } = call.request.toObject();\n const signaturePath = await this.pk.keyManager.signFile(filePath, privateKeyPath, passphrase);\n const response = new agent.StringMessage();\n response.setS(signaturePath);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async stopAgent(call, callback) {\n try {\n this.pk.peerManager.multicastBroadcaster.stopBroadcasting();\n const response = new agent.BooleanMessage();\n response.setB(true);\n this.configStore.clear();\n callback(null, response);\n await util_1.promisify(this.server.tryShutdown)();\n // finally kill the pid of the agent process\n if (process_1.default.env.NODE_ENV !== 'test') {\n process_1.default.kill(this.pid);\n }\n }\n catch (error) {\n callback(error, null);\n }\n }\n async toggleStealthMode(call, callback) {\n try {\n this.failOnLocked();\n const { b } = call.request.toObject();\n this.pk.peerManager.toggleStealthMode(b);\n const response = new agent.BooleanMessage();\n response.setB(true);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async updateLocalPeerInfo(call, callback) {\n try {\n this.failOnLocked();\n const { publicKey, relayPublicKey, peerAddress, apiAddress } = call.request.toObject();\n this.pk.peerManager.peerInfo.relayPublicKey = relayPublicKey;\n this.pk.peerManager.peerInfo.peerAddress = Polykey_1.Address.parse(peerAddress);\n this.pk.peerManager.peerInfo.apiAddress = Polykey_1.Address.parse(apiAddress);\n const response = new agent.BooleanMessage();\n response.setB(true);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async updatePeerInfo(call, callback) {\n try {\n this.failOnLocked();\n const { publicKey, relayPublicKey, peerAddress, apiAddress } = call.request.toObject();\n if (!this.pk.peerManager.hasPeer(publicKey)) {\n throw Error('peer does not exist in store');\n }\n const peerInfo = this.pk.peerManager.getPeer(publicKey);\n peerInfo.relayPublicKey = relayPublicKey;\n peerInfo.peerAddress = Polykey_1.Address.parse(peerAddress);\n peerInfo.apiAddress = Polykey_1.Address.parse(apiAddress);\n this.pk.peerManager.updatePeer(peerInfo);\n const response = new agent.BooleanMessage();\n response.setB(true);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async updateSecret(call, callback) {\n try {\n this.failOnLocked();\n const { secretPath, secretFilePath, secretContent } = call.request.toObject();\n const vault = this.pk.vaultManager.getVault(secretPath === null || secretPath === void 0 ? void 0 : secretPath.vaultName);\n let secretBuffer;\n if (secretFilePath) {\n secretBuffer = await fs_1.default.promises.readFile(secretFilePath);\n }\n else {\n secretBuffer = Buffer.from(secretContent);\n }\n await vault.updateSecret(secretPath === null || secretPath === void 0 ? void 0 : secretPath.secretName, secretBuffer);\n const response = new agent.BooleanMessage();\n response.setB(true);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n async verifyFile(call, callback) {\n try {\n this.failOnLocked();\n const { publicKeyPath, filePath } = call.request.toObject();\n const verified = await this.pk.keyManager.verifyFile(filePath, publicKeyPath);\n const response = new agent.BooleanMessage();\n response.setB(true);\n callback(null, response);\n }\n catch (error) {\n callback(error, null);\n }\n }\n ///////////////////////\n // Client Connection //\n ///////////////////////\n static connectToAgent(polykeyPath) {\n const configStore = PolykeyAgent.ConfigStore(polykeyPath);\n const port = parseInt(configStore.get('port'));\n if (!port) {\n throw Error(`polykey agent is not started at polykey path: '${polykeyPath}'`);\n }\n else {\n // get credentials\n const caStoreConfig = PolykeyAgent.CAStore(polykeyPath);\n // check if credentials exist for current polykey path\n let credentials;\n if (caStoreConfig.has(polykeyPath)) {\n const caStore = caStoreConfig.get(polykeyPath);\n credentials = grpc.ChannelCredentials.createSsl(Buffer.from(caStore.rootCert), Buffer.from(caStore.clientKeyPair.private), Buffer.from(caStore.clientCert));\n }\n else {\n credentials = grpc.credentials.createInsecure();\n }\n const client = new Agent_grpc_pb_1.AgentClient(`localhost:${port}`, credentials);\n return client;\n }\n }\n static ConfigStore(polykeyPath) {\n const configStore = new configstore_1.default('polykey', undefined, {\n configPath: path_1.default.join(polykeyPath, '.agent', '.config.json'),\n });\n return configStore;\n }\n static AgentIsRunning(polykeyPath) {\n const existingPid = PolykeyAgent.AgentPid(polykeyPath);\n if (existingPid) {\n try {\n process_1.default.kill(existingPid, 0);\n return true;\n }\n catch (e) {\n return false;\n }\n }\n else {\n return false;\n }\n }\n static AgentPid(polykeyPath) {\n const configStore = PolykeyAgent.ConfigStore(polykeyPath);\n return parseInt(configStore.get('pid'));\n }\n static async startAgent(polykeyPath, daemon = false, failOnNotInitialized = true) {\n // either resolves a newly started process ID or true if the process is running already\n return new Promise((resolve, reject) => {\n try {\n if (failOnNotInitialized && !fs_1.default.existsSync(path_1.default.join(polykeyPath, '.keys', 'private_key'))) {\n throw Error(`polykey node has not been initialized, initialize with 'pk agent init'`);\n }\n // check if agent is already running\n if (PolykeyAgent.AgentIsRunning(polykeyPath)) {\n resolve(true);\n }\n else {\n const logPath = path_1.default.join(polykeyPath, '.agent', 'log');\n if (fs_1.default.existsSync(logPath)) {\n fs_1.default.rmdirSync(logPath, { recursive: true });\n }\n fs_1.default.mkdirSync(logPath, { recursive: true });\n let options = {\n uid: process_1.default.getuid(),\n detached: daemon,\n stdio: [\n 'ignore',\n fs_1.default.openSync(path_1.default.join(logPath, 'output.log'), 'a'),\n fs_1.default.openSync(path_1.default.join(logPath, 'error.log'), 'a'),\n 'ipc',\n ],\n };\n const agentProcess = child_process_1.spawn(PolykeyAgent.DAEMON_SCRIPT_PATH.includes('.js') ? 'node' : 'ts-node', [PolykeyAgent.DAEMON_SCRIPT_PATH], options);\n agentProcess.send(polykeyPath, (err) => {\n if (err) {\n agentProcess.kill('SIGTERM');\n reject(err);\n }\n else {\n const pid = agentProcess.pid;\n agentProcess.on('message', (msg) => {\n agentProcess.unref();\n agentProcess.disconnect();\n if (msg === 'started') {\n resolve(pid);\n }\n else {\n reject('something went wrong, child process did not start polykey agent');\n }\n });\n }\n });\n }\n }\n catch (error) {\n reject(error);\n }\n });\n }\n}\n//////////////////////\n// Agent Operations //\n//////////////////////\nPolykeyAgent.DAEMON_SCRIPT_PATH_PREFIX = path_1.default.resolve(__dirname, 'internal', 'daemon-script.');\nPolykeyAgent.DAEMON_SCRIPT_PATH_SUFFIX = fs_1.default.existsSync(PolykeyAgent.DAEMON_SCRIPT_PATH_PREFIX + 'js') ? 'js' : 'ts';\nPolykeyAgent.DAEMON_SCRIPT_PATH = PolykeyAgent.DAEMON_SCRIPT_PATH_PREFIX + PolykeyAgent.DAEMON_SCRIPT_PATH_SUFFIX;\nexports.default = PolykeyAgent;\n","module.exports = require(\"process\");","module.exports = require(\"get-port\");","module.exports = require(\"configstore\");","module.exports = require(\"child_process\");","module.exports = require(\"../proto/compiled/Agent_pb\");","module.exports = require(\"../proto/compiled/Agent_grpc_pb\");"],"sourceRoot":""} \ No newline at end of file diff --git a/media/dependencies.png b/media/dependencies.png deleted file mode 100644 index e1201867e540902abc1a23c193a05c346a637aad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 151149 zcmY(qbwHKf6D_QCcQ;6bbf+{3(hUOAB`qb=NO!k{gp`zY=b@1jknWN$sc(bt?|%3G zV{i`p+0X2mHEY()4pml^K}8}$diLxYs+_E(>a%C?9?zaZLm@zcpX`X*?%`9u9ktYeTsHHkrH12-E{OqhXTN&-pQacn{zBr2pK(3~9Nn3sC{g3hi^VL% zKlgu5mtN+Z;y{AfX<7XJ1(yWL*H=0b&KVu1#$e3GB#VNh#^ATSeFwX~RlDWrz&zu`_cR0eV2E-eQ) zKX+YCQ`T>j>r86v@WJP^XJ(O$7**MO-{V+(MR-`7q`1Ts`OtfXcB^JkGB)vHuqallkpVkjt{d9lZ z(=1F9cWb9~jqkO)m}d`<7Ts-awAx0oRH3U}!;LdzWLYFVS2$PA+6M#OYMdhxf!moWfus0|KQ;iXW7B->}LcxsiNO zk$3IMN1peLrQz86<~P7A7U#t8W{p*YE^RRAMq|t+f)ZRfcGikWIIC$3tDFAS|IB+_ zdqSAVO8y&V-ZLUw3EO?$W1SStFK&gei$x`?*L;v3YBVC==%+gK#t*v@&8-|5rv!Yd zwYPs8Z?9@ZSjZgjsrZmyt?aF?BT>Sa_jPl!<30q$9Dea z^ykTS=Yqt;fkUTiHwR_Ko5F(*{SpIq33z2T8t~g?@jW^#d5zE+QMj#BOTrv!{xMnbT1z}{>qy?cy4^f za69jkc3Q)mC9;KalMxMxuw*Ck)bQ2Eo;%*xqiJmxA6mEt=uIoiiKmcnZ!{DhdN+pL zLXXEUG;$l&>hiB+Erx?MJFmpgkcCV-v%Jat6gP#iF5F&OC~BvWVFxVdMHJsEQEO9& zgw0=b_d9Kz_y#y|5i0fOIbM0{DA#w}AShAXI(iCak-b@V<%aHQi%stB;a)FY#{8Vp z&&pcGGJwrdFCL9xhr}owR(QnSb+)_e4Bb9@7TaH1)Q0L`($s**$4{1p{ajrIW%;iJ~hmBLPlv!t}*N_dOT*i*hNF23>V*)!i~a*|@|?sNMsJ}&WF z9uJ3R8A)b3$vg*gM1Pq~5D$Jqz5kgJQC>qny-`zRl2A~S!Sg<@!&*01Al0%bs`0Oj zb@WgANGwymUMOVd?^wio1enMet|3rP7}CnncFaX6NO%g0!w#>mY_d0R?yq#S@}l3H z&Q3?m{Jc32j=tR<&y$(C+iP4L{bc9{5e&o-N1*)QAN@o0If(!Nf5E?oFsz6F_vzCI z=18^X|JQFIP;v(8a{iwMz*k~Y#miFvpG6gNrWGDPIAi1EBR~soYHXaFpI@-6Td?Cz zAKrLcU6NG0O!J1GEE*n-Sg3Ag<()uf;D1ks@IXUD8&vRydf9RjVK#E{@KCuR!a#)> z9AVByK0Zg1Mlx^wh~B%69Q-bCKu65>$ciCJw_c7iSZ~5OFsAsw4Pgfmo|bm~Bb|K9f2-Vzf521Ax2 zBc>jTU7C$xec<(@6=JC9NYFkCk?AZIOza%Z7+1QtELw8CUc(T_`uEZ}43*kL2d?P~ zv?@ucaM1UWl2kP)Pv%OUjJLJ7uhV9JeUIuM$0s|8p}MYY^SGZdtVCfxyELD_$Df{nmMAamH<mW1-ObleO~fSBBI z>C7J32AvW{T=c(foWy}mvk@$Zs~JC?7G+TP(b0G6pozV6+W6w8rgR=kYQry2F1DV! z^%6VvB_8sn`ahQpdc%z8%t!K9<+mL#sgbxk+LQBAi-t&2Re97c9TsvwIkjwM4z(Lk zs>0j1Z@CaC83Ug-m}~txI2gF8g6XC?!;_Z=wlld3WOB^TZa6tsaZ>L3{rjG3?s(Cx z?evbz!NEZd+`k8}0T+b}5G$DyAVCWo30x<6vQo(Ik-LyX^02uxGhW`mME$)G)4P& zf_7g99>WwvT$YEBgal_ib%z@Pf-#wf2;AHj93%?)j1k-aS>{GEPbIu3cgp&}^#*t; zs<>?9zcVn62H{&@?O&)kOwZ`dMv(uX zAyjaI(-ux7CMUx~J=YD0v66Vg5eTz-D%b*WC3NAFgO_g zy(AZQsAP?9*~Csh!;>8l7@mO#F4(a$F$KhrT8#u!|2yzF9^e?m=GEht`OvTbS!`u| zYD&Yvz>bXoysH(ec<;Zx%b^=o)RmSp;~20XB4y}5_cnhGkSA}) zslgKI-wB2VzoPguvo|<6$iEhd@$ZowpTJJ6a1<>lo|ehy11AKw>e0ogQC5 zCZTfH)`4B1w^zE`dktDVpu<e@T+?E9|G95$0Pvv)kR z;?O?(1tra@v9S?DCuP{Y(K%oF(Vn`F`aWHr4lHaN+TG2 z9uJ{*4#%)(V?ush*h!Hd$EiVII!{FiuerT##UUjL0yA!@?j@d*IZXiz2R1A_0?>vm zdP|zA;|;CaYS+av=Y57E9eHzn#LvaW@+s@CybcvsC`gDzC~!SGz;51cKAz%>M@J4? zTFFB0$t5cleQUr`@{8qke~UnjUa7?(iuG*(q?a+HViF{YvbwZ-awkTR#JYs>>iTwE zPEyC%?m$I-rDn@nRX8C9U=!ow?>N5W z5>_7(i)AOHSd*g7yy?KV&O<~@oN5t}-+y$(wp%u3{gok%M2CwJTOomeu)_$0JFxc& z2IS7N6A4AH<`)-7mThR29cf{oJzAOQvqa%UF>#M|Ex=uk1p^9myJ8}aK)!UIe*zX&I7$`&ikz+e9 z=G8jy|DFW$+Sbhv4h$S6E6qU&9uXkVVcJ>+6D>GXv2aKqWDfxU`uB2=ff9#D6&qrk zqA>0;2lnUjNFw@i5MZF5A_sC(U+QKlpdI1b-90GZp6l}} zTCmt2{yuOWTsOOYnW7l+xC(XKmu(@5>}ex53a1sSx4GVrct~sH;4rq~6xwQAtBcGR z@E#;|&5|BNJWotbr%c7ZTvl0(7J3LfK+>hdtu>e@TuQ_Um0Zq|HJ$3Egc;~v%b}wk`iQ^k!}mv>3|I_ERUxk zr;@?UEYoDF8F_>h6P3nO9QzBMWt%Rx5Efz%ARIw861o3(Y`R1UwoO0 zo5S?fT7paQ{ZDxXhd)OdVZ6woqR=}{04-ReWD4&H%k=5o^0x`d$k5;d%&Qx`aLidr zB}`0S^x7(hG0UzV^XY3x_erR&b1y6`XqIRcPRL<-jQBq}7DL1<+;UPcq41v0z!3&% z-m3Q$ckgl;fx%RnL8^p6eHEWuWpy@)TCkh3u61!l3U%Pq*VP?JaPUAPu`HYjB`a-i zCK-;uR(b+UBwY9XDu+mCNmVXcRN$fc zV=<^zl7>IDnZfJSKolIB7QRy#`fagxb#=i7!-Ok$bD8Bngcg>9} zQ%c7^H0Wmt#*xrE(po=8I;=PahB8n8$+Z_rz{K8fqjo!c`$C43C|T;an@Vkv!X7!8T_Cli`D@fTY+&j*i|#c?$gVO-rnR~a0>-#NbMJ@uli9tX z6tbLVV#p!v9J^a0#c_jes%2eux9DxJ$^U}DM(DdwSPe{#r}AsEY*QNOq2h2DphDwjcnI?2;PW^P&I&cP- zIy$LcE6ZF7?CwHjfMSIA0Ne0C9@$6noS1P-<`m(ozc)9TiWVO}e0cL_xFZ1m;V4*C zUkU!Zf}URblyzBYsjZcj$|#9kc#n7ke_eaP-Bs{_4EJ2y)a1H@69#1}dURU1q$^{|bp+7fnnT;z()6kx)Q4 z_>N$|XQUN9mYt@=XPcn5h;d2H$;tWr`EyuU7^lUE{wNEbVut%l5dLpFw-H>6Ba}Mw@hNM-oyN_OY*Qb`#+1RK z=;_UW_%Jp(x$eN{B-qga(4jiLI$*)BuqxZkzvGKH&Q;!j^$SF;h%frND?Jm_nh;hT z%i|$4n5HvlDr&{(B}GO=2;H4c*tcG9238%;R$H8V-p$q8lxgm53?^I9Q?>owEn&z) zOm92tL~f{!c%l!b52+^Z?gZXBeQP-kRRQ^TVp`L`e)W?+Ji(jnJ2o~pz)_bsK8sW8 zLW|*fc?Wlisl}uM8Xd!h9o}QwT{V9I+l=;jkEX4`7}(!)6e$eB>4J zqb_!qmi-=>%620#D-POu=N*#&%rf|ZMu6>B|CfT}nuG1i1?CH$<11Y94eCqpgEq--a zatUNAY9ew714rR_1Mn5tICh<_$0#7XcxDf+xs|;=D=TXuDM#SaAuD+h?spplDYm`b1i{3;K225f@QtW8nO3A~%mx(Z@yZD%L)VRsVvzoX*&_hqI-$~ETU zJ^s;kKYpy1m_eQ2UY|PB-cJEngSS}yaN;%G($d1n{^HwfD=P+0ECu38_!_=B$`(K% zT+EKL!dLtVDNPWf{fmk};h?x)s8DB-K(Cg_EWw%>^MmM6rT>KuIM~4<7784@vJ;g* z2vLfO{G(jHm%eF6Yy>Gv0go6nOz-?L{GDHe>~2WWiUl=)Syh$O(EggFuAW{`0A`L( zQAtSvs^f7uKI`fd@IZ*SuT$oaA3vP8Mi|KZQr+dFTwGmO4KtMW^uqD$6|r)z*CFwM z&1uj^O6Td8B^_82wU-2}$qVL(1C~@W6*jl++C(TC<6k@#5)AG4te06*EF_8j%m_h3 znEVB5g+WVWX{o~Xj421ha~_djS+Dq>|G)uQ9Q1nCee3cj(Gk$zcMg*IwCPw35_Ce& z5DWqoxbXMiSiLK#{g~$hv5Ihihlk`p>O^)Sary3@4J|>z`z_(i%_Su^KjUSjrL(;M z?kLl{ynRC==(-<-Z=js>zCmf3OP5?oH+xh@EgzQ48WAgHJZN1@)R!pS``Jq5u(<>* z%gdLau2zD{Kb?&Oko0lGiIfglbJsds{qyIKvBCDEj9|*8tKMq{(;tfNA{E^8iX^-T z=@%4&HzxD^!NsZo?mc$&zh^{u1?s8`mJL!Y1u*ZY$a6CJY~YqYT<)t^KuyFIZ<9VzxdU+fdE)f(ME znZFHVY6H_8)JnR7x;mfxw)JsOMH$-6(~FByUsN%_AZvUAocc&rpG6BZi35sD5^o4y zj`mUgeLxR!$NZf(yxHkZogUJ)((cQC;PoIZER2hbJ3KtBRjv;S9r(Spbm$^L?tQhA zmPV9VV)dJj4R^Vz)SxAe6Wap8I<3?zkXOMb<~P+uJm!1jda+s@QbMEcSku_JAN~`j zU@tM^R4SjONvNH(KZzK=qfflDaxjl8%w(3uDCkILBC8ElKnJF|H3aZuYHY7U6MTMi zM?m+J!>y^VuCAb<0Hlszl_s;XDZokQ#>Z83bQ(NPH|3LAS~&j(>WGF}2Yda&P6;~{ z#~#LTF$Ouny4DGf9^#FUj})W~P4lvTz25z7TxProcxKniD|g5N{i8Hy?0UXJm!ePr z^i3c=%v}GuXwomQs;V+hpZ8M@aFZ#FdX$YATtUHi<|+KSF?W~Atgf-}DdaMH>pJpyD zTp?e8N|n{t$l0mXv=C*eqQ1v*T(WZiwQ3ZbL9vKCepTwHnUN9w53Yi$F4eid6J`1u z>#1*T4>xUwA_Jm#6QaUb%K-ot^}ic+B)8peylrwN74fPsEVM8(qBvhC0J%&gyP~)l zVqL4LrKP2zQTyXZK@n(|d??eL2kP**ud_g>=k0~#`}`zwHH3H*Nm60f?|fgZ;atIp z3)E)*>`ee2%uJ$k@!;5?-(eIpvGrJ_b4c{=jd892P`vgv5A$dVbZCmiq(4RMweRLHZ-W2)9> zp1hH5?4(A)P%KodVuV&_JJSL}!p9F-z{J$ZA%8%R!pyDXR@W=SL9ajnSIHwMB5e0E z4hQH;VIh8g&#Px67TfrE2eGaxkWZzLag~IQyJbZGj>pBt+56ngGgi7X;{mk=q*K(( z7dBD9sA1jdGPZ@M{=PsT(r3Z9@Q=58!H><(oRpMQPA0|i>E_Pcy#0|i$c}_cQaPw& zbj;fR5OPv9oo`LjJWVj-CPVPUFA}&z97CD)(orsQYuZd%}kv zqh08t`%Vq&W=K-`gV)C7ZA<9cq3`3%A?oQV5YwM~=RMc$5kn3nE=>zXq6prmBUR&; zlF<9RyQ|p9k3_d9RhAm64OT2;!EQ9XW+bkgQ1N5zHo8bQx@Zz^B0bmwtRe*lkWv8M zwd5rUfCcqeK{hnld<4tUGt)%uTVJVgJWzH`rS)t$L2AZG79}bVWckUEhKsS0f(8Z$ z$GgK${RmSTbD8rxjbIXl1}$ws4v$x+}K zc(DOm<{M$M1GNe7AmZh%1B$I?33p!CR^ZLyrxj#F_tj9kNqZ`tr39uP4+n?uDV$dA z`>suy!c+OOs^(nl#`8T13dKwp*IwI^E30`wmRT7UC@|>ff=eH(A_iN)nuXNdnid$_ zrj+RezbM^Z@;fg_nX7wIc)-+}t6G9u*2TeEHZDdF6lv0VJG;9BW9Md6)g49%!Ch-h zZ>!DUknI>3F&42A5ILVr^)w_ydDqUJloVl@T?ng@#7HWWkJSlgDt2p`+fjcoGmKD`tYlbEtTOfMQO{!TuW! z1;vOW8NOfctinsb;AQ8V3nuhd9L<;C{z4YQ;=AC@O;LdCDUv;E%kx4~r^T}tK*$TA zIy&sVVfo|FKtaZaFiz<^-|~8cy`x{QK<|-4e@6$!b~}a^A@Z)yFo8NxK^bMpik7aWXou6ixge=Qv?R@dtn!;x-j@NeSt3?~NNH3!2@emC z4vWMzjOac!P0gg*)RU`ne?v6%>}dWpy8VIWuv7(Fq;M%IYAiA57!kZLAKFPRjO`xZ zDuxTrg(E;alLhY&5~Wwt%%nLsLH6KD7@qYo^~0-IDg3Q4s!qffL)c9>| zxFNxL^^aOdYAkjF6j)n@^x@th^)+H5@)TTjDwgCns@Qa$ zmI9reI9`*0w3)VbBp{rWHxm*pR%PV#MaQJBdAEt?E%`S_Qqc?TsaTRtB<8SG=HOCW zb|M&o5_#9l!=nLWDn49j|K{;2xmY0Z6bq4qyBM46+=c8wvv&bMW%ap5eN9aQi({o& zS!xmKYffIMwU~(=h2)@cQ~SnLqgq{1T}b!ccg|BQuk&bTxk=OY+tkka>yv8@QD};Z zGIJ&$<9{9c;Qtt}l;3E`qF;yuW9};8&n_&KjazaELl_3zg<1OfHK>6)7wQRG3+k!% zT(5Ggv#yc8l$W#Ux)YiBNM{G;Nh0;?YnCL6p9P=T+K{hQ!5(q5TIDzOSRfFJ|2SXa|*SJ$%a45P_DsU zDs0oz?%G97*iZPr>;F@Mv1wA=EA4>a!%w5eq zB25iIe*q*HvO&iaj;B?{sEF}{@()~WY-2MsGqbbTb2b$Rpt`-eIQXGrUEuH4z2mZq1Z1VYX!1U84Gt05 zfR5C?d)~$>kQA1}c8R`P&NFCi3cMNGl!O{0U7DhXGD}>2TSm4*E8n`eFgc5KFEC$Iku!epza)o$YN)JG=7oa=Z_} z1O^J;q#Jl0_kh$mW9W0&9g4j*l1WTJP%rWp$Wk9aevBp++`PPT90n|T`R@S!iu~~b z9~lD7-@kvWgtT*a&5b+r6br-q)~>ZxR&sGa({Z5|acq&skx2YFm$=+My*{Z~zS;JvAQmOF<*sqN-1q8p|)!f-lp< z(sKK3X95)!HLRc+@J`{67odPBt*AKkEbp)f0QBQ zt$g6fkb+JePhn~{R)3#9N5j_G^vY>!B3?+QHta>dl~2dWC0ka>;CJ2xgB|c_B)X_QKO@|A3KXSnuHXc^KxX!bp#y;?vDVBm?VlpQ_lvUZR#k>`9}`4%T~l z1PCtZ>^WdgrFJwJ(ek~pTRn^N2aS4&PEEyQk5}-rAl;>g>E%n*An}P-aT600507gu zRbdoVR8mpz-#advnwnu%5p2(%x1ZlqVueynCScU$=H}+)tbn&pjmZN2fVm0Yt%d0> zkYYf5d^-R_Lk^mot81s>?^>JWxO5toI9Vz^`mMFKva+&zMJ=tF6lRtxX3(_5bLO2| zT4F6ggMs?4p{5r9>wU!E_}pS)veCeTEW{3@F{To^Z=V%fp|D z>TSrL&}UPuZMRM`GVmlli;Ig^g3qp)%YFBjt+x|QUnZPLU8$n{mWd+CK@ny+N*l=* zJ-obe`}3Q>;Cp`a#h(Ra!OOF=_MJ3?cW+xfaW_7ktjpe>5H3$uY#mC7z0;Ek3 zg_jvqTo!K`W-G$~*!Xj?Sm<9s_p0827VC}+PkJQdX+DKQnw+#zL=@Y(dUBC|qf7DE zuQWLa0uhG8k^D2Ihh+h&X)Dqn=)q2SCs|E)@IIaCn|tt65;gWh&w^) z?!~^4+1=gEpLlgRJ~nM zdAb?Vf?vGV$?95hu(Glunv%{NPr-*G>=d1x+V{d|+`YfMk=m1_-ggl&^w_|4XS}<+ z<1bZAW_c^%aYF5XdN5zNR_beB=1MtS?T!u9nZeCtMPJcZNBr-K{ zpBJkY8qEXL=r3)Yo6}|I_LToksf!9nq%LdsM@ANn-{)S4h(W(Kl9;!%33T~5XMa%I z_|tlx6co^^aPrzOdad`z0wLL-wbW*&{2hr_7R>%)3vu4Jzoh&TH^J!SpGB2*bVAcU z`>#1eiObHVUSO>-Q($MDs#gXrm5*C$cOVe}6eI={7qcG4zI1nAKdGm?F6z1bR-2Qm z%gf6HaR&UU4okKC)fq72JHHy+<6t5KUEQ>D?l<*dB`+@~8?%;d|% zrEGlmqp1=trA&cZi&3)JETA}fe*CCmkWggLR$++>#EqkyJCDjzF@-z(hYNd9C*Q50 z`&ib^PuW|GBgMtW#^%XH+s)M!1HlKJ`E@G`(kEn+eBjJiCg7Bqg-B0x`N@+bK(X$;Rt^Oki;#Nv zcO*flgQ|sdzS5@|i44MFp=7x==ID5c%c+4_$c`>~Q3JKua>M2y!hDJmM48q;f-vL6Y%NS6rjnK8?@-UllkYGtlGDZx_nmiTWn>^f>-DV3d{1~ z```7Br<=n=hYARC$RUR)a9!$ZYUYtfY}&y1(byTBII>vWAd#AeJuwCR3y`BA8?H}?)AthbO<#%`^(UlK_lPFk<#82q>y zOFfjHbQdm>Ggf0!Z$ZTM{tDj8CoF1Uc5DprAf*gGl^7-NTW?YCxAOAxcCg4^f}Rlr z0|R$Am-zWS)WZ#pjRIQ*wE4bbGB0++f5h zE)rx#08OCl@x2&J+&pSx2aJL2HrEMdE|UN~Fu%$gml~uyX-@$cLV-*cALqnPBp9{{ z>@+hUUmObwfST&+>IwoXXD1tjAPvh;ra8i>Os7n+=+`@dS3K_cm4c6C-+bH)#A)IC zCWlPo1;i2ZY;hvW?yEywGLQ9GAQE;9cAsx>dn0?RoRCKm>|bwXXM12-;K=CqDss`_ z3ZQ~|g>$yvNnBc5+NcKTD?o;hKjNtDjwc_YEczL8ot~b~sUi?B;$UrQ`3pcu=V9s~ z3j&dW5TW%T&pS z%ufSNI&vg}@tC#0TaM>WI_E40+t1Y?N*h(v1PpJDx z)0ASIIcQ3Oj(a12n(;RZ(=-Dp_*8>5%IoU9Y6>kFCySSGS|vl>!<)YNdb$m0QeW(eA9OAqF6Ugw=k*ndtc>~ z7wPYizkOBhh$B}h&&@q)25qGYH7eDNZ0r1jsReH-%t%AvYrLNaL{@L=;#P(Ihf0U#Rk<3Y*e`SawzJ#yQtWYW@QE>Ry!a5I{&a0gVYNnNDns zLa4)$bY50S*P0wTOBDa}2gP%S8Av=GyKQm4R;){|=)?7BpQugu(ck^*QK0V8KJb6% z%;4fvVUx14DRC*YkB9@p6KvEMjB$H9k(uncX(4k#L$ADCZjHuiVKRxFjY%L7V6-m>yru}7LC}?SNz#eD zk;W{xgT&Dw2put?i05*zrBz#u_R5&Kr=hUIqu z7&~r}q0YSlt9+hk+e7kruw17-n!0708dKZ{=tIGuKR?o${3;khm8=wA`z#W#4>(e^ z7&?Tws!{#T?ou|rHVmKCtq{Lq7p^j@?Z2VL-i=WIz#kQz$HHKdi?4@O?G?s+Tuj_`btefnI>uen7@qR{_6h%|RTkTuZ zanc0WA z#Hl|y>z>ev9>NOzlM4eWXiN;u7qIxGTxfH*q%J#b7p8s9 z0Za)ux;Z~z5{HH+7!C>rCbHUmIL;kfX8A6enxe8J1)n2PI~C`J3Q5%37g@#Es>uBG z??UyJTg|#Yqh6_YzXW<0qJ3{gW_M3w@j$3jO?0~WZL=TfDYcWoW?#W}PDH3)I== zWd(?W?6}52WjwKpqEv)$w!rw}X2K*;PNta0$;zTU8GHTn-_l@$ z!-e%qb!XUtNF;rgYiq{f;{oWhGcr_Ia{awK^m*7!xBtB6@^E+gvBkjUhQaPHlF4f{ zYyx;5d~AjuE^`CU0oWg%{Khm1%)KHW1K}%5XkqEWOh)wjRi>c|{=G(w(H~Vp2wp4G zZ!cmyTlP=9AuKhEMjbC@HE0eQr41XuqEe}&%M^~`n$i3S$Hki2FIDh!m`9mVfU-X$+i+%g?3 zGkRT4eryGW#xv1Od!jNl7g8|E=Ri03MT;#_WLKTyGj^K+~^?E8%X=-LhUIcFvTaKFX z9HxWQIx}z}6p>09+7V48iU>A+IY^e#lESG|UClLrucMa$qYEIxf+Z&T?K1qk^2r0{ z_vEN}ZD_|r`w{XGn0A1|uiGoMpYcJ0#EeE%=kEajnmRPdjJU@;LW7nGR_>Buf+UofPF3j@ib*o+4PH@+h z>H#Vx%FOV|Y_1IO4)}6>Mbnr5>NIuKjjiOh{(?N#;^Oe*(#`!b`2)MuI7u(gCqe@} zX>Im%Fps|}|hwmWVB()LoM4wE1JRkoDM|WRX8ZcT*%i zbPUW=7Ep4@@V*??wA*O=>YN4H%W%*x27;&{9$BfN}ofW2gn z*8syZ@9P#mm%K?c#mIB=tcw*B%bP3^4p|*>&cYwEs{=hm1$_@t)PMT)i9z~2*KZ&o zxcfUE>-rb05I{OAs;kvD1;c+*;=+B6t~)!VN~JQ*Dh;gKp4}Wu4PeEZ#o6jl@S<6i zUN801-)%TSF(J}DJzncmk>{io5IUb!bNlTGuM0!O;Z5P~O^qe@)w>M{_u%G=0s|M<;p>5jA0&RmlT05^!4qpa#&>M(l*fPxK|Du>_G93EeB01wT8-!K2JKl9mf} zw@#Au?=S*GZv(t2K%etSFiFdYsx{|$0|Ddj#XK*(4Sd~=Jex|c@4U-21>-~4f%Zw? zu@1RW%oGTUQ99Efk6!*#p7sb0x^A*TMjcwcZ(bfqQ}y~% zdVWCeZ_mKMYi){ypeWja5F1aY>iyH0E~4<2r4Ra4KgZ052{}ugt(%J~18f za#^xaNB7-y{2ZEGZ}U|-5$lu3(?$QZEn#@KtL1Z+M}F-k;v)Du>~zxElKzdt00NIn z+%NiE==}&wLxr#aQ2%vdrVLtgF{TSbj4fuz1B#{ryt}$g}d9+(ZWkYEJ`UXS)T_m*|!WY>OS#?_ioDYZi?0Cdhn4}{oEca8lTNA z&SiR4lI*BIcU4l+8Wx4~!pXSRydIm6um#oNi-}}kI8($-8uqzz2E{~%*~OlFna3?6 zU(}0jJqLUDNJT_9s8N`#2wU-##%ZsEIqq{)KN)nNQQ^zwI?$QL4lD2#R4|jVq|uxF zrcq+#f%486>1$!)fgXE#D#DEjI zZrF=>G~K&ylXR?=g}SCz|0Q2QMX{Z9RnrmLgbbG&j1n3wW4uCuNM1I1p6{OhNy{>z zju{%u$Z=88)a-3kmjww;4Je?w_$ku6aB)e`AuA3;UU~dLg1;Q%9L?urW$=;9*w3H> z!xp0=H@2H(Z}P?pU-G^f8<^sB&K^zPVb%pR@Sr-%aQWDNEI0?Kj5maSK*aks1*27h z)U(6@Fi0m|KmYqTb9e#f-l}2hvMUHi#2latC8l8LPhYRDp$i>7gL<3l5WKA=5*6U? z);t{%5HdvP<;6k!gEv)yLxZj5%QvrGwQTV-G-nz`Q$FWSl>Lm?u7m8loTbzpFy8f5 zMmm_Jrc7ns0aYwy*}8vOsIX294+J+nbcjTEs*%{w z0Rr$p!{jIq2Ny-|yxV~0Gky^ih1EqQ!e%N!xRiDV`>Pgz%k8_*b3$e1XnI2w~QJ?V)tkQW@(Lm1nvMJnP zsm;FYBW3=`Pf=>_%ojZX1g*(sC+_v@gX2DOA8FliI z60b^0NIVTx zSpYS!A2t!&f%D2*XOxTK>Y6QTpzs`1`~?53WkRna;|)+>Gc2YyMLskwfQkB2d023N zD~_@1N_<19>%`xZD=f$ITkZuM`jOPuW+{)`_>mb#zO0s?ZIqX2D25t&)IIi^qo1`Z116)YZv5l{C+4)KB zzxnvy_KVFu;rNB#9qSs3-fNE&sr%t*o#5In6BE<;Z9KSgpyErG?aD7VRH5K7qPX|D zIGTjNb37Oax>CEeq@<*!g;XRRVv2RZr}74ml<)w`(VUM&@wh4&jkNLL$9(Hi5Nq?< zPx;V3c1tkpOwQ76Q_+%SxYoMQClHC=3Y?U+^~(6ehjY+6I4$>tfqMSCVQ{09Km}!y zRGN2EDZ*uFTmb<>MBvO>8SUvQww}I&TQboFdNN*id~#rbz!Ynt&z5J)VZ(a`)^7qM z4HFf#)XW8T7t&78-ZP7RcRbd{Dy5I-wmmz>;jQ9Bp|)-_4~*BdC+nEVYiTWDknD)lWyjy>1v0*6hua$HLnjYS;BOUiay+qWC~)k z-ad3tFTpZ4aBY#3=p z5k#?Y!j>l*V)u@V2(;i955V|{?pB7Uao_#@J!l}RgF6fnQ68XO6(I&j?SKuo4Unw# z8UQGyZld^9eEkYLRcw?6zbtdG)Moe|3W+kmsNE>iQGbIsG>bf^Xl{}W+$}hQrq@*wo}sr0<-gnQP3|raTh`m$1nr!$rbYxMNd4(hT>wx%Vdd?>(DpoOL;e#13I|MFdaEp$gH#lt!46?RGJOfh=PN0Gap?e22 zrP&NFJ!Fs8nGNFoJ^&U3SCmz7HRc67;tc=(Ox_$$2lCzJN)K<_^)M(rUMsZN%&;WZ zdG<_NuCbjnRWx@-WJun9$wP*LVo65M`tY1f_U> z8wPrdKYs8)s-HiNUGn-vT3baD14$5)1Ox=q($c6ods{9Sn}Dhss8lb(trh*}j~%$G z{`Wehw2JN78dFtjDYWotAl7N1KEQ1-_-9EmkyUW>Mzd|q+g#V(uAuyu= zjpzY3Gdxg2VK~FJ3yew>_r}8oJV&b;$m^4(_V>*Po<}Ci7;QNQyb(A&FqY>=q85e% z&{qvWZT<3{w4ot66_Wlb80f1Pk+w^PARHak!;|dq@2e-6b<3j#ugT{vn{u=E`n}+w zY2cp_glSx`OJNaYf7yy~9|$o`yMSWp&IYXsIP0JVyJSYnIeKw3bwu@)csiwAvJnS= zp>hXsai=R7eJySN$NQ4f(gYczqK{XIMF$~%r@F@|Z~>3#ci6aB4u<+Z{%P0()yk}U zGl2h7OZ^of)7KNd&iVRv16+ua zR8l=bf7X{J*}v_a=Mqy(4>utb}A`laNnFviIJbjEtzr3dzb|*$Rd1y@ibD+}~fGe<0o0 z^}f#goYy+4q-H+7@pPI#OO;EH;ZA7-Yl%A!6Kg_XM8VC^;r&=0e?Z)GwwQPDnD$6{ z9<+il3` zLhXkB=DXL`xw~1dWpZSpb28hNbRL2EF9bvJw`E;caM|$h#Pf0$NEyQiJ7? zFefK{q=MvPyP|($RCrM}HN$oxq~thZjf^gu?PgTdZGXS+gY#o!@5{bFj3jcP5`cFZ zdjvx%O>P8`$#W#-S+PKuD?cF#a7Q;QD=t<-vvo?{RPpsMX@Sdv-R=?2eXb-{Rtg~u zPcDJ8TZE!nAlb1+L>g1Qa;m}#_1MK#S6LXde$5&aAy1~ZewEEk%E+9TJQ~a23M!}< z1;S_pid8cU0k_wnzXD8?+f!LTS39?f&sXoSu(TtMUBq_a%OvxEYQmsPjT|MtE> zDfpY7n#ya|c+e|%<1WOj^TwPP9?@x$lem&4EfQ+%npJfIaKa*)a! zQP!r`HPCs4wE6d6z-gt$YiP*wp&85b`ptEH2FS+rdlRL92nnPN(ds*H2|E&S*U=pL zgGlb4`;b?;80CMWVUhzb;v!B1M804BHG@q>X+T0D_G*eZ(1VMQ?@6N@(}4QJi3>Uc zOur;D=SQ;~4ui$65gT4Jz#yN!Fj|h)u>me0Mk(Whh=6da2Sozuf3HA9 zXCqv=6j?JrIVt+;%!SOh)!QQrH66rdATT5oZP971;auzQ#;dnrRt zXuFylC`1_&51+ooO-8^4LSil8h!A{+eIR@*;WtQ&g)gZ3;FUyPUArjF1ws8<5epGk z!LqIrb3Te{=gj1HwSvkq2deG0XmCq>`So#!IrI1lF{mI7G`<$iY)_n*7!3bS4)vBH zP{X+i`sp$2#Bw2U2DJI^g#=|hmyb3dY@rhAG zgv!e{yGKu7j$tVs{Gq=l!?kkYbS@Pq+}k?!t(9A)T|kieW|}?PrHvVu9;{jWS|5pG zy4}#>lzKD?+f>5S{O%H~D1>4BzS_R05ViNa1Wnw)(XFLm-zm}Ca`~`FskS}?!IEgV ze;DV2FBJ$uD<$4TiI7u3>I-~B^o!rtljiXRcpeR^PJD^ZumK}m7-5Q?4SvR8SkhBX zy1%I-98FI5{w@Txy-gchd&ENX#rT3fBt}r*BKu>Xj)U ziw1m-QnV(KVLUqKew^MRWNYN5Z&=V-Jj;{wc!12Gd+@?IUjOCOc#!A1u7cI$?T^6w zDQe#siY%4=etLZ+axAS$AlBoU%*Lf=AMW#@lqsPe@TrqR>ga=~g0QiK;Zhc9+w%Qq z2=HM(Stp#Cfo0J>oHtVrq7#|8v3J0%a3CctarJG@_46G$2EG#S$th6xTYMNYD{a(@ zCQ>m=Hwp|Q|Mh%HR)d>cP~Y;s6%#^5kAwB%i1YdhDAxJ-hL5;?`l*L2lFM|R`HeG0 zSqAg=Q`sZd#u|`ViGQBDUL38$^#NG_NN@lV9!8w%(?3aFs&QUvqBOS%6d9k=zT(y2 zsGAs^+@@BQ8oTAkH8M#u|6=Cr!HMBNsK-zL@4(8Krt8-IJxy&Rhr&dJT^g2itg z9*GO3xFEUczQy{Y`*|)d{(gQ<0TZ~(vP;^5DR)zAvgZP+rZ5v0QyDAE3T>7{?(l^? zXzM=-R%+f;{LnNSECH{`KjLl)W-``?V+S52VXnxcVY_3vTO0i@Jn%xPefOfP5*6s4 zU7<3Z%kxtF>mc-J)M#am>jB|lX=-Qp?n{oX84d30mG#cFPW9ttp)2U%RsnAa(76uI z&OFjvVAU(UcFo3;G6$;#C|M+n0L^A$VG(6y5{Y6U@!PZLKT8eK-|i3T~+y? zRx(^~s2MOEK`;f#Y|;X32TO(47jNhY)ZixN&yl)*^wU)Eh2qQUKx!E5VoO=O07>8! z7@1~O!EGk+G#Y5|fB8jraGPI42c9~(i+3)u^!VU^3nQfCvuD5R91Tu6K`-*N-uaQ5 zS}$m4s?3@^UJDaFKRY?0z2`^uMiDKVXHg%_lOV&~*xfA&!_FdEHejz{P>ysvs5yS3 zRh)!4$7rCW2N_exy7)sT_-0Re(a5r6IEMIncpk&0cvD)_<`(@u!Up5|f&Wnoq2D6v z9dQ?Ld(WCmb~_=&NUiZt&_outo(Rm&ZiX-? zK$i#LGYC*$$bJAP8M%3)ANpkw3{x*|u@&{ZmJe5c&3Xc?m>2htC`A}9d&Lh@`@ejZ zAtR$Hks^N`7fed0=7il{c(W?#*>7jIulKy#zPK$xDodh`IK%uQYppL!QXddeXC(r! z9Z$EWy5x!YRyeWAOL5=7|3NjLH3!@G8kav2M|^>sKUfo}sHr!%x9`HWYj3{}^UurO zSs1%(9l00%CRc!=fQb*x)Rd3zKbnAu12wgX>A1GYjB)`orrZ&&NNH*s8o;B&7W6GF z5{OrP8#ea#em6XOtfGQYl0iI4q6Pp82L(sl`L*m42^JyuCkgAZbYz3CS4cUO!PqlrUs^BRWt&6c2%xv;-?oMlpL7ggg2fHUX* zpBhO7ie%_&H{=gFImdSwE=Hbs{bFn4b$dl^TEH5Q)q-}q9|CqXOMKhTnn04!UzvrG zHrkYM*k13}&zSpemVo?DBi;mNqbE;bZvF^j;Fq4BCnqP$%t?-Dw~fL*EM`kEK)O0P zb&9PHoKyHw#xL@j`RG4k)U!~%!zJ_Dq$VR@(jDd3%-*jr?WF3LGX4__nehKgwnzVzy;M z#%c|A6g`5NDIX193MJ3p60|03t>!saJVHWeQ5u|Kj?iGqeP1f4nb% z)^Q%mmFnl{|MLsMZoc_9zitPTDNyghV9EX8j=`JDNq`eiHJ*cC;m<2l*^q$inE*a6 zt|sVtiIHrqpF!l0P?i=T5qW7iGv-iFlhRJH+m*p)U3sG+P7SAIa}#u<@7}+kuXCIL z+~M)##|aE_{+r_^ygVpSsbC_4#Hu2N;=#_mT-jGfo6kn2Q?YN*iv1j>_(GQm?6&Xb4nTq=$w0^3JP*T;nPzNM%>Iv0s2Ex^o*rrKn?s@Hq@ETV zA8X~}=OY0rl?5OD)|(gd>aGg&p-9~Ob;Mn|)N!Yosw@nJ)42g4l<4v{E6C<48r#V9 z{H#$hDnpO=26!frk&9t-Zht}VTF06^b}i5*?pnbJS-SbRe+wTR&ljvB{a>CF+HcOg zIM|2#1B1?z)aXs>9LAOt@;m!!fBXIRLN2Oulk^!6DLEm%%sGr-Y(~rbulHYl zp7*#9GO>tzCxul3*V~R}bz)%seVkUo`Uu1KzPqkXg0O9auq#Ot)v;xw+1Sj?x~KG* zdSyigs0T|W9!O2V!)mCnC--XfAUlx?TkNk8N>)Z~9HE8_@wMwQSjlwQbU`)v^#;HaK0N*${g0`Vt>^8f#>oQ^ zL(lE@Ad)MB?6jWO{rLSmU$f0dIIBjgwB_n(5SU3`Mn%`qA;ZDD7WdBx2g~Pk^K9r4 zkq9FkAmbVh&pMNc=xcT2I=g{{6-5!4S4}}59_$k(K@`FGL+9T2qN*ywQ?s>c4V&@l z>2S`k?Ytoi-xb zkj*Ym6=XC5L}y5eyja^#3jw(SH*U&6PtwUs{JBD&<@Fd;x@@Ck!& z0$c^PXxL4}ZUn>+R)0OSH+5Cj>g5|a!gU(H2-2cg@a)1!e_Tb7^f0=XkxMiLAaVe) zrl+PlR`ZtpJ^_T{y3k6;q<#PXAV_U+-kUF}T@No@4ZpeSe{;3@=4P|^-kH$5r{`G^ zyO1h&>Ne2pvYxDLrsMuC9q`V@fyR5CO<6XhDNl&l>?;@czsGljBg~rIWQ8fX=Bk?* z4A>VT<)n4iIm2gvVgv{X2+Y6RgSrsd*Ux~{3T!f39%Mk71SRPL{Cx<`nB9pwJUm$X zc5ry4*cE}y79;!E^DvMC5Ppn^!lEK;r~!xpf7W01PB%yr%>%AaA!tmJ`+R(DZSD7O za|&hVWL;u{ADPQg8Wq(t-u?}5tFs%X$uu0x_S*k_{o`rElE6)O?;F1(jVs*!Cpr$# zo^@ZGPeS*6un(7$uBbN@lINnLqJ2XSE$vd0@j?UwZb>VvF|F|;Ke06w1*wz=2foaW zI0)m1`Y*qdDY7dUTStcAwiLBVq~J=j)u%Ya|NidZ!T`@Q;xJ3;3G4$XeVYaCzQA>D zarK8X;ATC*AIQ_Rmca->ok4v>Aa@K>7n4y*lpuMyDj=)H@GdppMYA3&sX9AZ9GIRy z&wbdL^jsokJadj zO~~^}ab?X^a(gcD^<*5dU17es61^@jN!p5E3b=H_GWvFP0wjVs5)u+Ituj+19J?{x zMEDwKFW9dh2L2U;PU~T%QHSsVKjQ&?iWZ**=&Jf{wsv;FCiAGyuJIwl7(&*}*b+8# z{so-6N)ZGd+ve4l$n$!WXzx%Dx-QkW zpKw%q&U)vek&#Y?36Hl#p<6;Z{F@V3#ct1MU>Ree$t7ATnjX zsa7bTzbke?29(0zGL`Lqdf$BAiu%AQ8L0w7I@aWSp3#CU?SJJBy-21C(^E+^7hB1$k@~M_)tGBFHM3lL}C21L*t&_40aczvtbR_!_Jl_Q{ynX)fv>MNFaQ z%G3G#r3&`;99KbbRzMJC@GJ%ikg&j)_@8rqKK-Un%X!|knhq2!gqj$ZO@w`00%VI7 z0|8D0;RWFiX-pdZg+W#*zvz4wy)CFD-DqF4Tz&^NH=RIg1U^^~qcS>G+}^FMN{Whh z8SaO^E#h8To)ANGh0Z!FGa}SHzMeUuVEVoJqKfTCAyF20kUV3zEiaZrjERG)Wt-zf z>HE#M2v%F>SS!CFNtZK~voJn3Rx%F=6|Xg!=-Rnm=mn@>d_MFx(?}J;;~ivGQd=t`)TzdraDZBsW+n}yE=lWp zQx(Fr%6?`f(3F;~Fe8;MK{P|wY3%)_?NNGLsjwn325C=+aqN-vI0VVAlYiB1{pr8$ z>FX5^IlZ+LwsRE2 z+*7+x>{59OX3N!Fdk)@CIdSchqatp*Uvq5%ZI_hD?Mr@8h7G@9S+2FW;V1n0`)^L| zQ$p|_+gO4xBoH8icK}-c+xqwGMrrF&S{3WzH#k7C=FXt8#iiiQ)OGgX`P3_zUBF?e zN{ff=Eem-n{h2{CjX?k`++Hu-#+io=$0e?)qkQ+H^&4}yRiu2`WajjW`Cs_87Ku#)q4*hmH^=A5I?uL9k%(Q|IYw}sq@og~g@vt! zv;6;lSD>^EPHHmwg$Ky2;93KxJ=P*f|2R2vA?2qd7#-doMu-*Qd`Bj^ENZNs zY68*$H-5SBdS^jqAgyJ#4kgW@?7R<^P^KDYOCUpz4o+bzb`V3NulZ%>IQ~?`lk>-0X zF^A}XLnsj(;9uQrD&f)(VqeVoQ|TVlGNqtMFc#n0vyGoz-_q`<*@!XbIRamNg+cL< zok%v@`rmhD%HR{x$39ymqo^H~5f(n$wz&0ek!W)HDQx?bj&>fL5Lz@+k+r~Hu#%36(H;8=kMDaZ-j|%SR5A-Sfn~)qrgIIjqft~zGt)I16W>3@e zY(-(_ZJ&M!D|8%oIXQ1{x?b0cgqpr~39k1HzN4Q;(0 zMYzMHDY&IkuZSrOp!|XuyBHQ$6{5$hj``LZgK1}Zp-UE@G*@sZvmYu$HU^+3pIdav z57HMYON-daYDd9wV3wJmpMOYD(l~o$D%_>9cmKRfI0w%?GL%8H=03Libd|+zA4|fb z7Ofgm2&IOH>z^8*F*jWeXnEtG`z_yz`qIegs}Sf_{Dxh%Jq8X{BxwMcf#9KL*%kE- zM7>kAlKr9CDMv-k&})$kVhqNNPI8;@yj;KHw?&e-lx^o>!m`wbF%z3)vXM^0OkBZ6 zBJVb&-c83gBp3;B^eG}swZe(esFH#v2%LI#&KHs6&sm*@!G%`UdRd{xCrT3st$NoN z;s3m@L`7*qdyLJW^C#RAD^!1eT;7D7K(K|~Y4{9npsWuP%@Br^jMUVt+nv|1jGwHg z-7{F8FgA$OAQzkdA-aNp>rzzrC z^2g4Q?-WW5MFX6dHE~5=rx808Ng=ZDLqV6BJUjLE*Y73?3$?FYcU~;~tNtzLE&gxk zdiQJFpy|Hp!sWDt^YnYTQm`ZnaU{T>{6>PRdq;9}eLW(k zf7hBTBK$xsCdCjG%Ey~ck^=Vh%z&V>TsORX7e&1p+X;vj)BE=VEJ_R%T1v{O@)f#x zygkJ6hZ!~m+TSB@5>VZw`h-Zhy0#rE@RaI*APLz;aguC*OKWXyJ)h}&_$+i~WhE*K zyY|h?)d6x6$&K%-;p7k_#1K2t#{4%Y9?lMA3Bf8tGBcA#IBo3hA2SGFTwHWUxzt7C z{Gg8xjX2TUY?$TueHCB)^r9DH^a<+Unduiz=1tazo-m~@k64K9S1wX z9VE2(z|t(|CUk%gGM);*@f?=1hv26t9p9x+(M*1iL7A zzWWvs{e6b7tyAy3@LeY`Cwy}}w_76WvOWgxT0!F|00+v9+d+6&Y=c3E= zcOD!Zc(oqqA;vE67fUjoy^3OwtK8J}42ka%vB^_`sZvvnm|KL0=YHe)F#FE}ORYLe z9dN-V?#Bv?!2>8(P`K06(=+;Vq9=A)ljCE3MhM)@kabZ1Z;@)m)}6Tn1sikgcU^b+ z#t&=rT(j@0CSz|gsVG_XHz;(8iAer%K>x=G$=>MvA{?1z6v*B<%gf6XI#`9_OmFyX z9ba$&sD|)Pr}++0;e|0uOV4tG;0;Lw# zGj&eLek}+j6iCPNMszE3K*lqaOM(fZpYd?NLh5>H+Vjrc8=m_%Ce6fb2y^?j&f6VL% zLE_I{ukeT^Uisj`q;SE0`6PSO;kt%~wbj)qo0sK5fH3ApXgu$aLwSklgdmwvc!X;Q zT83D^VZpK)py+=;V6hO{on?LRPG;RNEa(0w6mqM=ia?6=3Spm)VDNAJ`W50p?)gCw z&VwAKkb*IXa#P*P(pQnin%%)(njD($FFTb}r#bv_u&}C0^q-iSf$X6NC8)z~`rvzi zfB(Qha@*W*XrRcqZNu9iXlnXGQ|-3%)3pA``Qbxy!>B8qM_4_*y&@tazt$YWG0M8? zb0Y)Ti{aJQ)Qn$t4F#j)I-trsUez3kO$g(fwy+ta3CX^zqNW^;l^na1L>6gh%~?vBlJVO zo?c$PU0vme!(b<5W?{+GCwn$Akf(5AX;F)b#AChO6DM>1(O5qCL5?973W3?r?Mf7O z$dvBQh`!dx!Nnbh&J)a=Fm3S)=@=8NFtNQty#-HCEJiUKudmPhl}b|TcibI40x({W8b?J%!81pI<$H#-IBH5RfbdEG z0r{0>gV_>Z_yqD(vy!_iu#%zdt!b;rD$bDc9`*p{zwBT5k>LOi)|@@8KmYjQ1MtSb zO;OoU&^0u zDy9W|m7R?Z@Q6GaAANEKCv9!*s+J>!U=iS3f~IY7q9`K!0m4O5|VYI{}-5CuOUi$gj|| zfcgYIm!T^yZxAm$M*&-IDzi58_xxe%1d#&wX~TC;crMzDZgvl;N+wF@Fsn`p)I{#F z-o2YM&fnY9)4BE1sHg`-S`0GYqxeRbplo!Bg(0ZC4jaUoke@NS3Xybrdc-%~lx!Rv z`yiL~53GHGJSPlYA`ef@Fb2jqd@356ai@AnqivfA1R8JV`}h4hjCoLe^BBE%aCH2X z`lOef>dqZ!7nirR1i&nDadCkj{V@};k&(eN`5__UyF}|@93uV#E}!S{bnBfd zTSd9JqC6(PlvQA2VnU8XQdSl<14BX?Okqj~&9&k{7+bAPO-~;o*%%XR0|*J(y;asC z-vhg>SHRe<7Wc{qGOfawH}>}*y)!8K{CNf*%ei0K+hxl}vK{A_Qj)nQe39|-4f(t% zZPK>PBP{LCkP`wqGnd;{%l9G5=x5#FOZlo9HEN_N3lkIUv4E|~ca4pbGrO`L7e}_4 z^6+b1#mDmEq2MFLjR+e#Fq8j*P*)ZVaiGCqB!J8Y;_b&Ljr_+B%Sk zegFRQ3fOhFIEFS3BwXMbfW-~|CmUnXaO%sOWFrG1D+x@6fx$%6i}jtH)ZiaoUlZp5 zPy=@D{y!XVWq<#hPfvRhn;VLa3YQ(e5|CL~TmONc*|mAI^pVBusS`~@b(rv8zI+MA zDH^#v8ljT`y)PuT+Sqi(`>N&u8_N&jyou_=+{ZzsAhjr_eeZgoWWZ8z=+7^&1sIiDAyx_kpm|kD z2?+@D@4aq@rvXt5gMprp;Tmar+DkBBIkVj#v-NuF$K<54DdCa9N~HHe2d3U9xH~;G z5nm^wEcBUAl0+hJC{&|0;voVzxl>w;i-3BuqK@1cW6rh07msjHN?!khG z{Os)6FJAl54+;_O;Np`$p6a*>Izp#dvrsAu8VFehZWa$UK0wEkvp>oX84(OrDS>?e<2PJ_9+=Ppbl6U!Ts%0s3y9 z*w8r~_z5`+qZ{-0Lt|qH!=OYDiC>-|=bsvSpF2H04NaU*c1NOIw!9PwH{JveYOs-D zVXH_hnOkXXp8C#|L4fNHqZ;YzUKdkV1a&B_4^@0vj5NTd&P(n&7D*$4@^!Vs%Zue<3ai!R740&fjd@1L&FDT+rVA*v#7-*R$!PYCsgchYy?JOEhlCp zo&KDi1>4%gx+g9!yaMm+1Z7av18499LqqcrRRQu>+pN@TwP!JL!pw#eE7Mng)YuN{ zeiNzoFVN5v0S2CTiP}Rxh%!-~NE@z_eY@}Z&m6aKpWw~}-hW$G7Lp$LsQmz$5BWu{ zST)kjGXFdeb4Jk6&=5d7X96Nrcs+GgbaaqLZwRC32-rgAUf;FFSSBd2fxF;h=pHwB zG#n{3EH0k8%udCSbECx?1GpZqgd_by_3Q;1vhPi0veU-=dXJRI;W{|2?7FEsWD zMvDH`*1Iy$BUw;CTxPgAz^u@q1>^*XVyICjM^=T$Zj*OHmc%Vt6&*sj<->9Hh!_}d zQ{G&K(hUpqB$hs6(kml3qr}g2d>HDVmXy>XHBTk1XKqdqm716+AA*jyAAZNR+A*#h z(tRDUGaoA`1nF(%*R^53eIr`=9aJ0clzS@J^B{){vBHGJ;aFv{Rv#Ca_bgdS^5{*c zX?SO1cS%7DJ2o~pv@@krWmRKJX|?CIY>Kkl%ZPf1rkiCm%hG#gbyZLBeUj@B_^iRG z+;hEvRVPROzOl1YvGzhMKj6k^dyWN0k=CAL!)im!OyB>COrqE9RPy0L5D;^N=iSqoB? zX6EL0RTs(I)spH+_M81A0gl;9L193O>Pnb2@UqZH`y)^0b0Ux)hL%Rt#6GVK7Kswi_zB6(bu%l z48{}MdS?@(&$8g_C$U4(pjE!h`5D`3sEJyUD{m0q&e>uJ;h%*Fdf&d@-gSWPoBy*A zv3#xAP3HTR9_2%QecI!c4mYz<{Tl;%-IqV;bpy)b?iUfM<(osx%rJbEo1JAv2aUJ# z7H<}x);a{DE0t&=QRLDr$lSd<*J>8OD5IZ~Q78&u6_b{ZPG@W?gLt1V0SO7o`z|a> zn#Hw8AedsCpvkL%&5kbTId>P(svsV$u-$BGAoR!Kca=};Q11c!hlq;>klMf<^?L5v zXApJlfypNhS|YeL>^whB{&VSmTUXR%ps(-!ge1gD0#5I$-0Bp)IPy_SC*OxEEGzYH zh^1Yc9Et^F2{9cVU$QWi0gP{h5Fd}rRMjJaY2WZb;!~ALKU^wG6ne_ap=r-nsWi_} zjETD-xX6`s0*(n}xULk#x-$AYa;{A2p1`6aWghlF~!alP7@UjL^52Dnc{qc9;XG#j{e1iX}Y#?$} zM_~T&!$Q?Sr<}bK_JWDcofJ>;uSh=sSv?B5eD!j_1J3r&j?2J><-%54Runj>Haw`F zyB@?wdh#dAfHwX4rVTjlha=ycH64L%RpLK+b)WDw0y)0XN1$Q!(U0rMq)<^&k&%5$ znnp6H;2k_+ByXW4{EB;mQi;z}Km@i;42gP>Q&5!lIKKMV!rT~UT}_39_Ak4wu2?B# z;nlQUpBoxX2l!}KFKZ8NZ;V8GizwhNohmqg;TNLA)y0B$|f;-qxKE^qc6S2jjc;m;tW)u)< zrmfWtCx_2K-v+hpz)p}VHVga52Pd;&LVt%|L+O9n z$?_ao{&uc6jb`NG;#&IXtoAu7CPvAih(@;N25S8DKx?zdk-(kdLnl$1`|qB*bf2F~ z;(UJIrhuWe8z`?1t&-c~j?%OWrwsv`3bX=`QdwZ($&RgE-wrpFwH60h=OsvGL1RX$ zgZK8uot+=7iLgO~V#hfjgX)bS7i3K}avS0#{Vjvw_#IP{0eqX!&Qub1Ha0GxI8m*) zuN7P#s}^F+J7lL{@X-CboM#FQwYQ)r>BYSv6SuJCObY10!(gUJAxmB zGJLusikMQ)9?m^Qu$4==0nWkKA-ruW28J?D%#S!wjxDiH&dw@?+-vFl@pOs{wV=My zcuGG}Rz|C$cq9O8e-HzPzz6o6gs7-b-}vs|xgOj5oqu|FaT6xH)OF-iuIDIEF-K)J zH8n@GH}L5HG8alH?ijoC_p#!aYR;HAioQKntz4FJ%U}8he>Nd5?qRT>E<2oXU8zw8 zz)ZBVXfrBP(OPP1lAS|@_(mTKo=A!zzC=MSJs2G_GRmZxZMe4I`PF6=qQU>pnli$w zKc;Ic{^;l^=Xoo&of`ljKX<4lpHKKI;n0HEDtz*+AOK%A%&0Q#8DU4X#1fgxOSotX zX~qh0OkPHp*6lg;yrLi{|5@hAG-^id80n>o9z5XYW$n$-HyAtCWj&qBu2;eE+hsZ` zPrG=`jl?ZnYjmitR|4G%s#kb2F*$ijvo5xvR*u<9ZjDJ66fbH^(eSV^_w!^*Mt1f! z&@!2|`Co(G37!gA62qV?9;->z^r$J;Wwtv~hrjK^?M9Uj;m=at(@VorD&Z_3UyX~2 z3E4We49P~3_5e(7I^+Iwp6$mn@l&yc_;_|!*2axhA=S4bF&(;hQ`c;7U_60!U_cLh z!JG=u^Ut3@0F2dDCFbVlI#HiLG;0FS=zI)`E`g>}7N^OLv%IC^b47gxChN)Xb!noc zq@*xkQU@e}5MZf=r5mCK$Iqf%xHN>s#Q|=52y-_$KA7%+{90I}Z z7Wn6iTZ9O}#;+KG?hgadsjz+$$X8AoZxucXRXA3J81rPmzQ50LnxQWARl5sfrbBt?O07%SlF~|L*gLRXTe)b!*4}r>KTcp zmf=r2#&`&#AgSPImSRhmGi$O!bk{;CRm&NmR)sT&1al_ZdDg z7lTMV@d{Wg&HMLR?A@c0Vf+FBstRUdSJ%Dm?QgIAUGKV4?mcsHQI_Jww=G&>MNP)< z8y=SRJ9mTqP+;=s{=EfY5|qk1k&dBxKX9b;+`C7gHaa^iZHqL;L7&C!L$XDo_tN;^MwBGVJ| zZn<%m)|U^J`H7j4zCJUb=H(L zDeU)5OJkcK0K^hdB(MJ#K2}vx5;(-xL(zKoj*EQiP9Gi`8D>{Gx-Q$s4`}x5n!<<~ z(cq4B{AQ2Cd{&xXa=s1i&XJf>;o{T6wT(H%BWz0yT4{=pj4TM~FCl2=KQ$;OBJ2J) zEKC)TgsSQL{Dx(S!>?^5k z)BXfn4;VE;Ks?Ou;=dXZlg9zLKMB*?W6wcEM-#O*h?$d&~-sV^HsQs()KaG-I>6?udW_6v-sGY+DiZPcWsfFLuC z{~TU&FTj2qrJ$^tII|k$ksP@*C7lBA`+)MFs&A1N%H83N-H=q%7 z1!?#QOp&nY4)YeL1}gD2lr(dw8`Wo4hV2KhK({nMT~jU2BotMs?~nI<*O2NhkPI+m zB0s+ijN5Vp+m5{96McOWnmt%rRW@tVkOLgyyk- z*urt&@?9@4=afo0slFE4Ym6dCPrJxgxJG13r>3HbEh^iAr9TtE3ZtNRG3&7O3UNYr zJ(KP0L_&03i~tpt+%@VPjhQ;KtZS=oP8NryG>~(Ej?ZDQ$^=)<0qZ#2i?6f$v~QL#o!FQdAg0&eOgXYi@)NZ ztdNBxr9rI3A!^4C0_Nb3s{QN!6>uYNS zgoMir5Iq3SDMuzaTq2JpqdNt=79cd?u?oL=|K*d>TF{LM@bR6N>I8pRIF&A{&|S(A zf2O$Wvs#Kf;ZNp?-}Yt-_Q_R+R-^HPKnp@s=^+!sG^1jw$MvK(L^?5 z9NLM2YE-J)bQiy3d@2MX6s|kk6Rd^xQg180?onD6t|I#AP@W zo5N1L0RgJy%ph+V?8|Z8LZP9fr-wcO!E4=r!dfR2aVA}W{UCdn?A2+f5m~P_p~dWN zhdMKsE(%dC(%?=#CCu$ce#5F2BMwQ#CM~KWb$>XL!iP3qaLQ5ys!iN&EaHG5|Blew zeqRN#djOOY$=|bBa<=$Kb7Kw+!4chXu*9fD_TCsTT-D&Mx_p5e91;Sbn>I4>xQXkw zj+I`}%Wv;-=RBJgTWN|}9iR!aF6#8;b^uZrXa~^X>|x(iBvk%o?e>np4L^*lzmA?M zU}tWxef$aiPZ=w?2&AP=E2nCH+YS*49A|{P*&X0WF}p)dvo3}1GjCa-#dE3Y>BA?x zJHVTB_wHSHBw4^Nf}KIGmN4j63V2^ZfxPJm)cN7`gk!So_4V~fdU{qV)!n##P3WxL zVqy=2E--hHCVv9fTw)Q?z&O*Uy%`8y1 z(44B((msduO(>9 zJv?e&a~U9@Y8gPfARBsH?&_OdfxG>1HiFo>UKI!c!ny0;M4d>~8Wk$SSdl zY$&$kf0a1Koa%pP7$w-52$FP*(~S>A#mD=vW!aA+&(rz=>DUM=lmC1qTs%Yr9Di)L z-)qZcd*cC|$<>qBdAO0;5sfJdRl#K55Grd(b~O(o-IVr50k7|y#(d0SKtaxmT}&7v|gS0H-RXE?b$-L9>v zaSLqgz=+&%oDbdx_Jq?2u`(1P`$GqTcJgL^c(Bp0S*==;cVlbo?}7Q)Nq+c(Pa?l$(G7n@^5)&B?2B4bkVYVwuB9DyJYsJb{%2A%sX==W zq^LSMcB@UeI4BIud2Hsk3kfWaA%(SlMw^TAJ(sS&RlXED=WY-teIxK@PzQaX9zt~Q zDwtQ+sYzzs?_~#vbSqZw#3AM5H{f3|^JY07b9CyOKp?jY(-`+tV!C5+pA6?nJO~xX zL_=$j^#NQuUBCivFoXnFM!hwG>d~M2O<61UB_6w-_o$|5yNdMq29}APJ2L)PjoacC zzECBmlKIH!=qsMIs>9b?Gw1cRem`h8QN;e^syE}n_0`&c)I`LhyO7vLiV+6DAn?j$qkmzRHJ9NB0`Ps$>l zp_p30;?#?p?d|PCW_aaSS63VEAZUUpQiUvFh$U-5ki22r0+2)Gm99hNCG;@$f2paS zs-~cI&a{B-W|ELbaZ&>&og$T(QR8#xI;H;t0_2*5C<*yb%AZ4?G*Fd`;6YQb0@?tw zTc6JQqwvh6k|WZuWr@UMU1Kkm8A?BLqHib{AUhBfd&IX!Ga;!)gw9qR z;SGSJ=rzVeV-u5i#@l!(ezRV+sq)E7T;=UEejpM7N_9@(xC_AN(zyKU|4caXVu3Hl zA36ev6rVQ&aS;NnXYW<3CMYe9!(?n|s4RL23tXb2qicS@w|QgWt2uF+0~7{FY#bP* zU#!LQ&UI9$Wn(x(+;3bH}w$xh83zEPxJVb zH9D{C#kYx4M&UX`n1H!Ynm=T{rPX-h!uANGC&|7NsAUOZVUpbN2*Pjw9i(PtAr-P3 z1Sgpm;;{5oUQf0z65_0jO|z!A~%ZdnlBs{Rr?-CYnBq}?^s4eeQ2kP{R85Bf@Ir6jYw~j${u5hVx~?nK(RQ6_BZa2GFqPv2|Gn3 z<4E9RqL~(0t7GfKVlUcgr>TjfIs$a8si|rEJxWNRx8PzZB8Fzmyy|v5@lIi5Nlj>HR#-=D02gWjS=oa(BmMobne7y=4Lk#AN!RZz zoU20d8B?addFJFa3!FGW40JZ_KxQH0wN7vddPEVybFkZEC|)-=;*d+`Ml@0AkLCW@ znUVDb_f_aIRTEXGt*xz1-8Wa(H&`FLbi-8ZY9f)B$+W9hqPe-aK8Y#9>LN~JtknIB&mf7-BDEqs1%0c-U1Mr>mUgo5bQlFa%=YF5j1A^>bFi%^DO#ITdS1DX`r z8zL=Dqew1ZtjH@SRXE%tTTle=wYH>>G0_nEhs(S0`^U$FL*Udx_#81QdK>1y&?a&+ zGPG}aEiXWE4J*{iB;X#xo8af?AKB?)M93fe`%@X-B8Kq)`EZxyaM5B`v9$Os9(p77B%K9j_?l!r+mi|#E= zT#sl6GdHa`{oc{>u~LjBmVjv;Rsa}e<8agrl93Y-Ee&A^5sS2_C>biXc$u+?GY(b| zEa~KGNFS}*i9CJ5T239t`LEHQ)HZ*tkOL&)29j~@xS5oDO^ zGJ@2jFzEO1f)~Cq$H(ON>EAZ4k;xB4h;2b1o*M0XHe*3W*xb;d(|4Mnz%x6(sx=6c!SUJ!^&Y ztUwhM4OT5K85Hh%O|GIKWC8V|Wtkp>{=5C2vD)(g*B7jPh}`biG>Bdi)K)eWN`e=6Ac{5q*!OuinbYu49LKB?B`Td*&8(AKV~V4%&R=a z@-3#m!B3yDrqn^0G(0nSYQd#G;%s5_Lg&s2tZSgw+)};fP10&M1gL8+p;P2V3` z6gmm|uGXiEbUfNa}1cRR*zBG{&)h^NftpZ;i6&nrr~2BH|(SqC_) zL|a7PL_M(n2^0Q|xs6GmMdwlbH<&-bH3mSojYjFe0UB6bx#pq~{mcRaByZ6#j}VE~ zf|gk>t}(NHK6CVwecSFXE_lSmL)hB{P4EebWmiO>cfUU6<6@Men{Q{jBwbVrT;Xyq zOMh?=zV7??%{M5uzO}U6?yTM?RPF*JHo-tFS?2`C{tyW2NH0g>i-YkMD(zIC>0UrH zXdlf4K#1xoHzxJmY@$&q_NO47r6ttbg9cd?VK5^q?zq!u9q<-jFYc4l6v|%S5b3|E&l17KhU3B{KbC#x zSF2t>3INw;(NSim7Gu)p5)d(-5VU@SYh`S0P!RXH73QfPqBDHAF;}Kn8uywa zDTpQi3B#Q!NeBZ=`wWNCr6VUs5O{EP$NpyiS z-9p|$IKVGfA%|iK&7kgsrn}ynrs-6{Ae)zZ7Rf+^$83Smy(Tn|{@>}{e=$E&>{vid z_arIFMV;I1>3wr^_f@o>29bd;$qms`*+oTsJasKCr!dnwrHE38G_Ki>*ru0@)kZ$o zHijT8)m#V#u{H^F5gtp5cKff<7L$0I6nR;cp3b~Eq7x}D{orf%?6oyqE9a{3Z!^wc zSKd4y){;5f-hPgerPLSkeBOo+jYe4AG%!%yp+Wd*o&tsi7|Owj5DeNYl$}^{HKHIS z>nY7gz%rB2U)K9L8Nzn`2ZRuvAhbZK=-YM+;HX&u2qDuHpZO->rIz4PAWn8tfPGZ6 zILipf(B(DU-BGj>vhdr^ZO3o&bi1?p)DpuKtxZstqsV^mKB^jsY^e~@#R zK1t8X!EQ3Ju+Tv_4v6TkBF6`>?*z)+23H`SdR};XCP*FMymz^=`RacsX*p5&Oz*1$ zQm&$@{j4?Gz)0_F$W;-7luO7{s0JNjj|MRI5Bc)l?5F_?Wo`IIv`@2eqTT6fT0?2-+<>Bu z%3pl=9S+MQ?3?iefyxFIuF8dV2loejL_+VKbkE+Tz_?*|TAWg`m`*9a5QiP8W zq4Em?A#rCW#>YVrH*~zkw{_I=$L6JiS#P!~ZzsqAQKt;z42};W@PN!!-4P5pbYFtP z!LcH|o2s`Lr*C~NZH9hDVTP?Tz;s;#T3VMhMH;PE2r~#2aWvz<0a>Mk&HEm#NC)lV z4-!L;p(f<<-tGSsJ63=KgAAMxCk=IziXBiTGyLOSv_zq{uZ@j@R1Rjvjj)eLs&o7L zQ)9SxVKg^XAO=u&WlK|~*^X4m(kAb)9iY*%6Jf#+!oSpkCLhE>gVzVKy$yO8oFtZd zCVKjnj)&fUetv-9IXYJU_%j833sihZ%wh>FgGvyJnv4$Zsub+U=GmOE0A}(Am1QmZ zPuPeywSK!H*de6A{G>|%6IDaUIb{Rs4L^bzub);rY=pxu}db2CKdzOUjr?k?*wra9)hlfkdV+;`Mno$qtQMyJ3ID5dLda) zN*B&?F$G9jYCv6vHUvU9;d^<;tid6+<)G_b!N&ZH${byQTqVe?fVDc@)nq^E^P!9B z;+TmzHXaXq8pV z<>#Hi#hh&d>Fh9T0a?dyb~e^>En$ zA=+P~3jZ#D$hk;FnwLND2?I+--JAF-nXs#tiT5h*Wz(^pPX6~?D3hmA@oa6N_HwaA zZA?i|o+ze6inE!XUc_2ujbvDIEAYyjt1w{;oz6Rce#tQV2HPsjHV(Fic|1~&;Xf1r ziPoP>Zn4|L4-X?qya*`Dp&w?>}oWUk0)?MN;JMr~I+LmM4h+bX) z16lxAjNm2y)WXM)FepkLC926*&}YX9>kE(Fy&?$m^76VB;0X0YFQT7f!$?{>GaY=K zpS!XHz=pTCx5RI9X-+e1U7aKNAD%pUGGi5(=f7d?wePp#3Yr_;A6z3M zmhG*rpCA5Rf0%V+qNBSFxwmfkvPAYw_my%!cUesmLp33KG}QoEG~su&ExTn|DGMwg zk$cM%^HeQw(JE#GHset;7Dn_%Z3lEn5mr{*3DF?SD3m3leQG^o+KO3ygHqkH!poSe$fT^`3e8S7QT@qi-s z)OokoAe)DrQ@6CGsEB^UbZ9?LZ06&~9n-%Nw9T)B8{S26Jf40xGj?DH>Mca2V)dL9 zwHQ0Li_g7#$ocxYQ5|pZhMYTziwmeHdXxey9K)P>j>}#SqD(CE@4#>(%iGOyb~O|lFpYFI9J8@A?OqiH|s}V z*mF3ZN8kCo;{O4}*5R*_MY>K>Zhrya(7h0@ue%#n_Mqdf4GVTEJ#ct&(~# zw>s@q&j^wc);Kqqy4JJUv@%EsB(U*7(#3noBXV}N{T3nU4POd3_s#n^9LCqWLcl0o zB!*d1^e*j>0EzOvAM5JaGYoDiYU_eDx6?>8n7&RWwK{r?$!LM3U zRD>WZE-4YPcIlXEo;c>4CnNNb7>Oh{^<*bXcrq``cxUv@1df2YTPj4bE9(E|;(F0g zF6^w4>XcxtdM6iNF&yR8;wam10k0JqouT(h#m&KWl(ksQ-tZnbf!vG7zah$5TvXJ- z!GVo~<7oMfcJ&;9(}0BLztQ!53{F8P_6B$fRFtSr-uGSIH0SvSpdQOMuc)ky4eb5o zBAUt>kQ)vEK|(^pUP<_0XviTvl&HDY-AtdHk^)ZCayt;43If+Jf3;u1jmh^b^LP&8 z03fnW(9HM#qeoXDBgmHG#2RM`Y&Eo?t3NK;JgYjZfcT;pQ%9<*Gb|RlHuZY1_DQH8 zQaA6*lQ0`sov3WY8!dtVATe zF%pVQ@khk7_u*r%eN!cU#IaKweYsQI1Lx_B{^{xTCxNGtiLf_qylQpT&gXPBd-{21 z>-eNV0KL!^-fAwc(tsE{5tgPi(y8yC-+hPT-Xh*;TgnzH@k71;W@jPZ4@bkVD z_SCXjO3^r1%&t9`2u_2{1MHstzP`Q{^5ON`NKJRFt=yDd=h&WU7)Xg}kK;Z5fCJGJ*tN|qAgTTQ6ePHO3asTSsM=wz| z6&1-QZTO6^b~a>Zf~&eFw1#+NF&pY;Tm)@`!|GY{3JOq?DgZpeKqh}*3gq-KoB2Uo zxtFm(KUle8h~!=j9BR*-BnU3Bh-AyI$c*u)5!3wpX#R!P!!*4c5d5kCagFwoH5^*w z>K0uW_$V3T3eGhD!Y`&C6Rz1QMUiQPYq8%2IcVo%BGi;ODPMw?PjP-WQz3u1X!Wh= z;WIlooy`C8f8Yf9S|sx*6tYUqxbSgv`x=L~)Dq{CH(R(yJTk{p7Utn`Q}cYYt)kG0 zs%C(ha z-^H27;--(uT=csk|z zSn^#K1`#}jcPzN2sMo5y;fY!BtijLIyT@Q!?8tq>J%4L&{7iCjVZug-q^Uuc*k(#! zcMohLR7+hgu4R>M51B8JZYlTsa_FbN=$5|K|2h3+%4j?H^&Kf}zugCQI)pFrsEKED z&=FD*q@Zjm`1FpBo*ohD59idzhAn-%eS32=c{ulX(qG}QyFbYSCpolv1Z+XpmM@M( zQn?S`^|Djgq}sw0+{Di(-&@{0*@T8(!(bPvOvV<+8xa@%Orh8?Q0Q|Ew6Z(}0U?Zo zQgMfHHR?rz(o2R^27^?b`m5FMlDc(yEurr41nMtMfv@5|E?#u~oSR>Vw*;Lr_T>2Q zt04LVcPGK^O~AspvEx*t|DeTL-n$oLPwl5`{oyu%$P^TgvU6N(>eX{II486zY7Gni zbZsbI3Vf@&);ck7{cCR${NdjdKC7BZw}S+ats6#TLdJgZ&14o7NY_=Mx<~{Cr%$he zT?eQjz8n5l7~H7-T3d7j%uEl_q-F3yWlT5h#p@a#EjH!kUkag>#fx}knLEUfeI3V=ugw!xNO#RGXVgsnZub~&N z*4u{AMx#I{*U;2lx}@+y$ob5m5#wJl+dse7wW>%yz6n2Bz17;VO{0bq|53q0;`l3)Zb0TrcWLko+c3gp#3Ko$9ZViXO^>p z)6>Y3#{bLbX2)xypj9gc4JYl=k8YM5?s4c`jJE%UfGm8a5L{@pf}iv-i-a@ENEQBe z*e1;!Mch0diiyE$ZkY7kGi_|h@Ab(J*Y^L|+f%AwpCD5$84Aujk5#N(aSAqNB+@f9 zw8(r+u|kNCZ{ksM+iF5mlHVEGz5Mr10X71Kf3dBH7q|a7RaN!%t6QV+a?ZT8jY7t7ZfI-k!#FHL!)vivOJ%(Z z94^Olb{m^bS`9yoG&<9GVGHSW%a+70Zb;Ds-qQ1#i%=nfFb79maH=zig>m}vBMPd; zx|QaXRSe9W6WZX-QfIRSNA}XFv=oRI1n-P0>|p&0q&CCHY1Pm#b6h3W;tQu!{%$y$ zje)Qzy4`Hrb4*7=lmF@dZ9&0x(E30@Q0?c1qy`$3&Y%-esJNcs{^jT8C4cXfWLT9v zk*&-MSO*su9?Is;Rc~rxv+WMinN?wUJHHD)6iI=_anQ4lt0%Wg(=>0)gOM;oJVHC& zKhiE8VyuIM+jx~eGk+}$8#o&7Jc%}p7{Z`9#i*vnHdr@zxK(FAp%biHHVmJcjVar# zYf~(8U*nQO3Fp4jkLI3-kH~w5R94F~`G1|1IqUyJa!uw8HPRt<_lljt#i9Rq*=r+7 zXqAOgwuC$(7z_hWf<VZVP$ZhBD~(8ZD-M)2((T2w*5 zwmW!#zR{mT`pMB!DoK|vM>m%3Spg^)BWyvc{KMi2H-r~}a`o1*ePKxnSU0<(}zrc1EUznMu#vR>)~?ZevzKqkB0ak!bX!^F?3VWHr681 z8=(rM>R>63r>T?1qJxm%NKceC&V9K<3A5PQEa#TNN66pzT2>I45H8qc5PkJv`)s>ET{M z$`kTBI@J%TbMgrYP`xbEr$|@T+n*jxBH*Ircf9DlL|~bbCKD6A__}xuSIe{#u|u(| zpJu~?VLeWBTQqlr(C-XqB?;1E7gh!Lev6%!8AR>b*Qvh|Qvk_wXGtq%=MPbwoJSO6 zqt5XA=-0_gxjKK^)Ox3cE5-SY_Kv<{Ug7a*hGKm0f9cXKs#C6%*1kNU=6TzF*TxLI zLnC*8dAf31HMIE$ge%AbGEbP8`4}CpD=Ctoc5$w&4@oaYM*dv8P583!)?|?g80#`Vsi5+7DGf{;yUbHF)!%XT8 zMt}RQblq%%6dc~Tj>!qEeG32`ZkI^P$=&jAu%vFRDt0^<3;EwC0Wp7N&uzWUGc%C~ zI{D9_L9Q<3$|wH`LOxyp2jRpbR>As;Udf}bH6qKtfc!LVCQkWY%J#^G4!bUn$|`bS zP@lls51BNzt6QNEAqSBQe?E8r`3wnYwwCsi{tCH;=rl^^AA-XuZJNCtYeF=r8%zb+ z#J#hd2?!{J{lz!XE27U{uDvouj(E5$>BI>O$;quPFB6avVt8lYj66^6U*B;dizBbZ zMRwuESKq=7j$*878I(p))yfwdm`h>@l^3l(oTf_&!t*BC|Nn~umwDGF!_2ybE9x2d z(DRCl{sS>vTiaU{1&#c+Mzbvc(PVDs{`l2C>4L@S-z@Q8m8Ru|L&iCuVCr<2&{$r$ z2I{W@o6Nw#0F3geq=%6~gf^WwvB+%^5kthS1U(bE7TXLH!mc|@OElQBTd5A6x zE-?{mFKiVn2Z!yJNVe%EmJU@=$7Rd)P5FL!M5^I0^QZ!Sn#)QPS(*ht<>UOL(DK_% z>W#JiK@Vw(xS>@{kb3n)ZZ>$665;QB{``4MOAGALi|@ux1^OG8n(Wo>>{y1NBJL@@ zIUeTphEJpU{U1IW(enPjV4I`C^%ITuy*b zHr#0QT5a#?QSg4i8M@7uwSff#yWa;CY zOGul`soIG)&2d!HsPX|H%x}6w$x2m0AqpSBgNBH6rVfX>04>}b++ir<$!d2}B|Je)A%!7YxD7UzlYtk)!}?Hw5tkW& zPki|N>x!lxj`Gb-JX&M6kX~zg|8|iaaYwkGewPpiqAxqCK64eNtr$hr}{SGZ_TD`3p|^cR!$dVOPgJgj|w?Z{L(1mk;ki$D%TRqqH9Fn93-S zSKyZjB4CUc0Zhp2_zZ8$x*eJAcVjHsBewMX>}>U&cL{^o%G_M^hyQ?<@S*2qXYZvR zA01UBQosPv7U-_B@`E+W8>p&*(ju6WvH_z{{BeTZC`L*8J*mN&!2X7piyV0`B8if% zZ@cGRUcGcRo}wt%aFBGp(M$$c=d<~j-~$F_fu|jwb?C_;Dy23IV(P(Z#m~=AiUI7N zf@>|A0`j>T_L(iWo(9CLXu&P7JPN_NeTK(;g;ykUL}6AbkwGm8;`KlH$Uf2JOoT?Y zc<|#VLL%s+I$x$-R1_BNRPyeyj_T3MWVV`8&+m)pw!EDYR~5M__1q5hmm=PJPUsQ*XOEWW80XmIQyF55K1)+xhJ_^lNk+2SCKmS@%^raxm}>1O)E3mX$yz1>pTGlfp2osxuNfvmz_G?@$^3 zB}$5-DsxW1pR4piK^s=0e|>}kCQMo|P(tPmJWxfWh@OZ_dYPbfx&NYnX);Fw36JUx zo0!n~aRLda!hC!O;6_L~jNdklOCdOUbHaQ4!e0XO4k;3O`lcal669r2K#`j9`v9=& zOHjJN_zZOBPiU~f#}&HsVA>A5pfySmUDGENS;`3>xzZLGgR^xo`A5-ceS3;!LqK;w zv$`7gWtP2`&TL!ExPqMY0W}2$_EbM*3NAZYUEU4y+->@e$vJ8SZ-grT60i7bB||cE zPq46B{;|fU(}|0=CO1GVRdhJQD>$l`1-9;rXU0ZG5SM>i2_L%8a@AWZ|CJBGqjC_o#_u8r^npyP=#NB zY5?eA2Ap*70_sN5#rR$y(*4IsQiqr6s%d{_*Hy7ADjiIYE^ZT6|7_8$5ppADkd9f< zy?Yma$_t^?flG=lq%$N2Yin!!61`FkeOmXe;|_SWH%_J*@A8YWD6}jiS<#B`gXcj+ z$_tc$ab%zOQWv&Cp|`iSMGmQZtL2}${^76*vPs3!xvk&tzM^njMVf1R~ z=z!UH2)%U}bQ0O!zwKbk0`i?*5Ksq`0&25u~M4GPj12z;Sn|xtGno# zKY?jgD}f{NOk^FDqqst)$Dw{dcDJ{uJqWJSl&;R#*GuzEZ^-Ra@ETuVg#VK;Nop@Z z!;GP1ny67R(VBjkot?|k9;1RGyUPYBR&)<@6yuDGsAz0*#-Mo@Hv#;S#by_nwNL)q zJYuBPqcu@;S8uJ9!FYF7VEc0Vhxv4?B<7ls4a~E)rx+jJkBHk_tJjxm)4~Ng2=o%bn_AGJK@HN)mO(AU6&j_9vMzo->xvDHUnsu^-Y~((1 z6>aN}_1_)q(9lo_;E9WgiOD}dv}tK+b~iCu1m&9^3FP=dIb0AVuvd1iL3Fosf9|u) z+jQHUQc_YPBIE|EUp_8={!CaK>-PM?8Nkfxh|qd2oD!$ccbMi%=KH*y9a2`Rq@e@j>oV3IYblQg^k#n@CJRVFnGx z0C}i>RfTlt(MMSjO^or;RY=7A48RCee#hL*3_Q8391V%hW1Wl-Tpaz48m&T^+2i`H z={s(&Kk0J=mY$r93?hv{;XvT-2^)NB@*|TM5Wq&tx{v9%h8~@p$0=!RIt^lvCT`L?ws0-`ij(dN|c@7Jr} zA78XBp!c;w8O`#~=`v;U$v6FE>C)NO|3V_DZP3aEgc1$pZdtUVRe|0I!SDw(MA405 zM=1*4Se644o7(PfZqq+04E{08w3I8Q&{P_2sFl@CaIvIS;EoO&dncVjTQZ>%5{>6(cc>m-} zGV=2B_P>5D$8*UufFco@N2fJ9ck?CC<2FH(;9AJq)Ig}(Q3P>S;)$6H#9KQv34(DT zapskoY0>`($0{uyo#l2i=95^RY*WdYT6)ar>#3GHCNFLt9=`{9o*;8X5ykLT!#g@; z>Z?{0oXo0ycYsP?Z5L7kc2u4Q8KZx$bL6(9Z8kAu>Ir`DQ2ze?UtB0+lD$~@2|Whf z%*^ZN|6S!yOrCb)@AG#sq z4?NEoAg{f?vU2c2vE;}e1Y)xCqnY8QsBsIZ5IeHQ3p;n|u|mh>bQH5Hd?YRdG=s;A z|F~W|z%jvS(S&6{1qO4jzAfz8!q>JMb1aHcZFb~0K;#n8Pagdg4+pUZv3bSyfpn#b zGSn7PRV0LjS(%#CWM6W>AGn_*>CeO}^a1EcGBI_-J_D0~d%N_`a~ngmgP*{6z#$Dh z2y_v58eKyfxbBeBjiNe+{k$E57e-(+(i~uZC2Bgz(MU*-^ z@StINejYM-NbMEW)Z)VE{+eEN!YsBlVZ%;% zTK8^Z8&C%uYCA#Q!qg)4TI?69NW-E1RqF_SpoZn~>2GH+U;P3~Y>eIr)OChR4 z=g5p>_<+8{DGo*HZcoDm#ci_7In(`rfzjF0(o&>OQ3wk@-03Rd=xVU$haf_beq}y2 zlW26bOYh#j?GcMj*t4_}#L&!4|El0g8BF4w0rlm%*14n_hYI5CQQXLW#md2<*3^{6 zxFXn#7kF7P!z8(;2d?`^;$PnOp$D@Yd{QWeMW+JLKlyN+Pnh@$BeS5g9>3wjtPg?6 z-w>t8dvJWi54LH&@nULn((;WPMI2j>=KEbZ(JV|M*ol@#6NO=;{-P_yonVot&oIJc(aM86Y=DskC556sjTU@gLUVQJd z7i3Y8rBs{xOhs-Hz>Qz9``V{DCM_w6?8Kk+d!Kwy$`SYCE|~bebb%z&(c$Cg-??;j z-T*^=3vp9@y)OSBoH)@namZPfk_razoXB*W48NcW2%z-jT`WYKRtwdl$j6r|5U)RS zTjbNL(WZdSJkBHtf|)7aL|TK?>=P{hG|$xk6C`i~{XtAA)#EIHlGR^;H=hsC=#BB8 zitaLnRi*^DodSXduvwGS(#SP;UNoixttuS^=dY6!Q3UJg2eT)P6r`kj78aeh{c)fX z*wBGUU=RsyJ7{R&{hb^eGkfbnGo`>>a{FOw=%l0x)HdrHII-!|vhP>hq5KhczUW>| zjEq%iOxLLNUYYW)E(Uf{>h9T(bka~&w?U%J7+|~&f1SrAR_O6))#jUs$<}txNY*wla-Z}_WxU7UkCX| z1wAcbpH*3{_bX-+N=o@^L?J8|^ttJzRU+w&+rg1KRXSs>;~vB*@XJFd!^Wa?A4F~YllVxuq~Ae8c8lblJ{t|`fPKguA*?HEj>TO3$6ON1ahw7cSViy)(*qJlH)zCIm3EVw({+mKoNOgWDM5eS*gv9jV&XYw*1{iTN)Rocs}ic3#jF}I7DPq7n~@Q1Q9M*`zC0ajt`t2Blt85g`MTHD;=^!QYM6T^hk-F!rX07Bw+ z=p=kF04esR>HK{SJ7|UMA0L`b#_F2 zIo3D#W)RzbeRUO|+l#j|Kas0o{;Mp1;A>Eq)rUfMVQPdqyC-DBXp*@eVaG8y_gG+SnxI=NF(PW<|zQ{!)!N(d{w;4*vqF-26nEx zhmjt>V|dzViRkQS2M1lV%tUU*8*18icIBbgKY>F)c@n6o-odSo(y^5?Uz>yY`LFQt z7O3xvdhfDPd^e`}R^OnqwB>drR zh{*x8;Q0#>)sft!CnaSr>GD{5tvdQdm-_8jVlIqtDG;`-m9zt7n4$!$JRh-(v`P%M zVQ3ecWc0C^;S^24y|4KJgeK^Y8>PuYk_z{$c}ETTQrw65VPD&Cw?PIG@kDN(=yOz7 zlp(veg{v}CZkfQry^l-8gf^i<%X^3221c4Bh9OUX|K_b65`S4Bef{M$pqWLB+_fdg z+RBR2`xofTi||Z*K(8VihMoC=P|ITw?%~olnQwi4bFNPrnhwm{jhOpA1;4xFSdLFj zTyJOHUF6^Qt#*LGVX&^rifN&8*g)jug+~PsPFhOJ^zj(d4B@hakrp$zySLYW9X%rn z)nOnUItFkeY&%1J;;O)xhELOvt6v4=^Omk?9vXR7`-iP)94PaOZ!aL*z$JrON+57p z_*;d3>AjC`ZwOZ2;SNz-O{CIQl$VUkELd_oMO`SnUteqsl8RK>q}gc_o@hwO?<5LdE~EOqq6!syE=q%^ zPG_KG0Q+pXFDr$H{04)Mql=3RY>&YR)E8T4MnO&~V0A}(YaB4P3WyP0D9wpk%J5m=VA&uPfj>#r{x2m}c3(zP-KYe_{J@>s96Np5nit*O-FHUG@lgT~ z^U)RcH6%Zd--Gj}b{7WmYa4D#;p1T244EZMR2h!S{Hu zX{Owg`xA{#t(`uf2fTf+lMZnXC~w?hRrvk6rzP&tA&@yp{0&ph+cP|>hfX{3Lt!wL zfQyIm@#O~exW%2DD3mlI7j%|HY}x?$Avx30S5oVG(n;5stkNyKDyA_Y#yh=$U=j9w zOP+=*B*}3dPJwV=-PIu)!TyCqKfUG~%!nD@s8?o4m`Mmqd`nUY_?!YkP`qd{L zD`|=9T?FN(C%hT&ShBGG6`Y9`T9J~HD&SzBO4j$j(G!2>meF9PAfB!M*+`!EZ?QQv(tUrxjKWyzMZ7$qCkdhrbsl`@-glIZ2rkK8V zNMvvDGB&2v>bK6nDdqIvid@ALnYtszF86no^?;>cCIGBRfi17jIN~ZJ@AilE`S{rp zn&E!kgO*ugqt%v-ahTu)KUl14!mWS80eymGzn)ggn?kD2tu&ZLY$m{WXa^w=a4Lg( zp81_zy<(w35d)t>UhuR*U#4guoCoW*>EYV@`}=x+;#|MiQs!JnR6sHeLc5xY zH}NOnwpC1x{9=~*Z`w}yp^`tA-t_cBs`r?ixGRn)?Lqc)bVQ{s5Gf)ebB~x5x}&Oa z+?DRfmzSwb^erTpO#dmJ2D|{?Fo5O0(DwdEdCMX}M3MwU?FQqvB#ta5(-W}>vc3rF z(iV_Gu;64XaNN3;S~PAD7$4rtdyKR|u(*9%NG7D@H)HEU`$RMqVY}JZiX))>?d4zj zknc?7_aCkPtC-hX`J~C;mXT$W!D@yUfPdVwE!Uhg(9XciSHS(T!^kEz9VLxp z_jjN6cMox?cZa(k9!(T2FuAn;obX5W?aFi$f=lamtw zMm|ijF^}o}^KGd=DostDawM<%UN<=29PrMDIE4%-nS@|+=T<|4JauX&IeT|TdiqX~ zsAy#xf?fvSgtTvj23?qmVTNBxiF)9+h7;-E5eY?)DRPfV((fQ+(>E9qSAOdx(*mLQ zNW`#Y!lRgMhIFw}bo4$ZT7{E!y+mdhtFYu1ca(JcVZxsap6NS14G?AA5mHn@8+<3J znVZo&%@qpHtI=*LPUNbdwCTaIwZbEMjz1tbYX{|E_l9 z{e4zY(1%;JoHj!b4tcIDejgBBl$G^%Q}e&2h0m|N0*lJtLSTu;H~rMP*QMiCT^qFA zUSPyR8S5>!lp7wCt!b^Sr^U(%Xk5uPP=2l-yDxiXtg#m*H!L}@I&8^&o5M@=XbNh~ zj(J~)&8@2lUB_0TJK{SY=escvJNM?(ZjoA-J$7S@BbA#w(%m@NUb(|4gz|=fY1CDH zo^ecrH7M}+vGu<*YbNlWMsV;W=>DN1e0I(gPVB!Ap>gr>{Ag1+EfnlpPhEds(OHHz#bmqEAQONuHCgu{?b60L&P&VOR72f_h%0oJ7PH zQ=S6vlsiog{qm*=sMqQ8EAb;Kb4*TFH%|{O1Pw_a@ z-Iq`LB)MIgwl9??nT2Mn(Gs6sUI2WtZ4~{YG`cjI^rl(*y{FjE0)dzIx%Qcf7y36v zh5=Eh4Wka_leOtJzN4KT`L=occHq5immhd6F5M7A8&D23hu^$?m~k+?dk{+clT|*W zj^@V-*gL~?;-ef%|9LGo_PU5N%03E!!8+Sbtr3xVk|Ew(SzWEn$lg!?#|MrUutwZ? zyO5zRJO*pVJ=GihBYRDN4y0Z#7Mw_d7e{^o*NvL}ts43@0sjCu#NVm;@x*8(q)95x zZiB-J-s2Mr)7;UINTMM`lz4g=5Dm}L+$iMfkk}4Jcq_I--)WmocL|K|slVqFFUl22m{KGy} z(JsBO;96!q!yp44qO0z+IwMLc%@yyksRWZ*ko}r7I0Q$Etd!y0FUgj&vH#JEBBD1y z3eKe*>@QXXB0hCZGL5AqYo_RCga%c8CHCCN&Oo= z3PvAvq(wyhK`Wlqu@U3pKBQoGgQuofVT#z7;#11A0!(_kypECm1HZQNnfKSHUko7~ zb)yg40^92<{NF{meO;nQpRbx+v<>WhM?X+G`OQn$sCx~t)a;N5#g@-N3`nxXXDY}I zEP*DOq{+gAh$I~vZoY%4eq&LmX?gkZJda*?pV9*2J(H3n%Lb)LXyOuy0Etdfvxlqg z?+bpZ&;ei_3^jj6?0}vNr!Tocf@zqiq)F`eU9`+&ZXnsCN`4rS^ZdG&3%yKFeyHs^ zna+CBs~!g@7V!PYnC#s)Nz0029&4TX7LfiW%d_}&@U7DoLTIL1R?e12a2?(TU$tJ- z-(bguFIwa7T`C>R&0NBB#}nr=G*h0iw^d1Z-@U3cby-ApWLI83wW#~E5(S7Y_7GOU zNU6u<_Qa8M53Dm8?mUlUL)5<*`!ww*!JggAN&7JO+%oAlf!Nl2yztn+oO*HXVW#HI zckhEcV3iZ+bhcMhR}?22-O~!r5t`cC3~-OKNCeMs`Q!SkiGGJCOWi~L>ynCTCQH>DDQ?-YeVu?U%n+9(fu5`(3!XwY9*1 zHqi(iSFKbVfyjuTYmnH}(Q$hb2aJ9sB*Kq4it2AcS4Yz{4Y0=4GNMw{DQeYoqZvZf zaf!Cf0{VR1BT7Ys*$VQn+Haa0b2(;wK79Q5*WRx{E*+o8lK}gWI@|xWcYl1mjy|Sr zLAdfs$8-TzqV%{FcKFZl!$Rh&)2T!lEj8M?SViqk&40e;uxvVc2J@2=K7L*1@(!q`*!`$zUDc~tcca>wx1X-TLhoZEzO?9dUocL#SIU?^!{=EnpEg zHa%`{lyF$TiBz=$>v{p1Gf&^n1*Gco1pR; z0jX9$;%lrk8;$|1O%rQV)|!m%cHQq|^$-Jy(KNH<^$ub%RU6T_XOd&N zUmJgy+!lEYh;A_ivKeiO5gx$z4^NIG%N5MDQI_6NO#_WKz}=!k$f1fnS8UI7u@QYo z-{V8EtXvzqFa3YzGE;B7R;91&Uc4X^pUa5<0vATC=%?*uo!!nJPZTOF8~lS!R64Y@ zq?F78j|Z}DW!uCno}rop69&5N%zr}O(#evG=q9HUf+%S!GIRS>YX%MYd*DX&nEClr zqzS@ax7gOeHhJTzDO4O`QJ9K{6$u+sWb62DemC-*Y#j%vy!Cslg3M^Z?}2k``L|9< zrjdVpyLt{$X@Vanp#l1G2-=rKoZNg7L?tngCBFccc;es0)O7d$R=H0h0teGecDe0U z9ZiW4nu`Y;Cnw<+dG*k$%A_PV&8x6kn@tNP0+nR7B0P1y;>~DWJ9lV1`31xo)hila z(gsbJOVDp*Xyut(TBZcnBmJegQiv@Bz+DNA5Jr<_)cP}<9ZAF%Vy9zT$5o9!19wIW z^xEvtFqUdf%_u1;L01WcxR8@zFeP7RNr|@w^`Gt>s`i`Jq%*c2vWuTQ4b==LyN09oVcw_oYKzi)vTc$?on5VSq~w=zj=CL>-sjoQy# zu{LIAw12Q3WcDJfDP^+ti>GdFVzdQk4v)FFB%@1`KTA5QR#e?CowpzFoLH~o)Lwe9LtPFBX_ zb_k6adenPLLigBPb+>M9S$R`*wJP zB7>5GyR5R4=LzC(q$a8sO>izAeg=FER*4%H<;ECSM#xy>7$xc-=8j1!L)uP~Rahx% z^^E(FHfxp&@gWk$QMdyYm;1FP8XNsw_S7m&Wk5EyXdb(pbn?gup@ zyc&>5wdT}p!|9&JB%iAJTezOK9qkJJK7p^7gM-S8-Viul(_yr+SD|R#l(G!BXLT9qI{?I{iJInzq!h0(4M9 z;$3^Yndke7nEs7~dWHrQyMBEasbsawKWWaSEKYpCLYoZz`8EQi-^31Bf6 zPJ*X#VC_wiTWMK_Q1;~XV@lK0yO3a-YnHUOg{fNl_4{`c@s6Gb=qHi?Gbg_az{|gP zj__*(?MUj{7^s}XB_Qzq=qS}Hks%8ARyF7Z7ovDkJxMqKq;$4C1d%>H$+N5eahs*S z>AoyHO*DIa5^m>nd+IoR&n5^z8nQ@Im8w@M`0~Z|)x!+w+s|mfQBkfyYfB!9cMTa? zuB;j0rbb3*FzLO~e9V!BPpe@;!vdTR1Q6CGAX1?p3FMjsg^t!6G1|~3v<$vx>M75@ z=QOPYBzH6`W>f+{3*UPKk~Ub$b_FsoO!wD6zPzum=2xk!R2raaKT_=@e5}N_N%VbV z>m-PIb6^7JR-jv|5ST&*n^nbMt-Y?JrKK%rCb1I{ZQC)>a9MU#I(Ip9b|VUHXZ|Tv zKkoKslh(IV?x{dTu_F2ezsWxPsYtBxIcU2CW4NENJgiu9YR)%4hxr#qMMzzI0=eNQWoQ%0A^E4*~orQc*!CGroe@@6(BV5$O7|i?(^*(}_8`0pD>3h3HNH zr%#_Y51RT7LbU;@+fBLn@U$pD$x2JMvF-e1qf+0ErR1U9IWjt0h%R>!K3RPl0}g^Z zW4gn~wg>a{FD0Mp!e^%XdlOU}(`HY{RnJ|<7@PPUaySHBHB22Qaz00i%gWy2ET^=? z=C*Qh{TVtjeD76dC3bg|K@x5DJMHolgD>{`d+?k9=>gplLF5RO8vXq7BPl5fjAvlX zhYa;tVNjxxNqd%xpEA06xw-Y3mhNvpcQCAS0-_eaY6vA5cQdtGrZd5wcj_8E92!V% z!tKqB77#)7j}RG~bgb$cddVD6McyONsL69cQ{4 z+Q<>4O$lK6(HSWH%;Aw!2`xH-x}2osB5?m;PEF+jr=k!2uM(C^^@f32jMyioZ&9rx zGBPqc=wts!(|0&x*}i|nE*_0h6WmS~% z9{2b8z5M~Xuj@L`V}8aQ;u_X_2JE(&J)LS+A~_BE0t9`Ecr^>rG}IN8!V`;>#4I<| zH7e)i83G8DuK`V2OP;#QhM{HW;P4G-EP9nUw3t@#cF^Sy0T6_IUXc5{7ixt$BQdZ7 z`fowzqkp&;yZxca@!N_O1E4DvCFOR8RPe939zokWgS^|%`U|=PZ{w%(_^dFNRMVhy za5StaB|shp52Rr!O^mxDLr4ck2;SLe(H3lqgkiSz{7?9Mf7?Lh`-M^*@Y#B(;t@4v zPXx6$aP9Bjxzle-0Ry<6cl!czi6marpaB9kl4iHa@29B=a6({>2-nW^oyS)&NYc8_ z%g54oBJ{gl&xLCv$-l=vZc{(_?w3zTe(1e`&Ok=X!CmL1O0t76TO*r30XmBe@Xcbt zbze;{d%54IKH=8e@MIDsPp0jxZ<&N8DjI#X6DAc9#{azoGTuBp>ZQqy4)8;tqYY$h z;mBXcbQqk&(~RD>$ktcH9gG;nF|eWB257x-xTf!voymSX9m}&&>2D`YPb3AQ9t8 z$;GXI)h(ZaH5@TG9bD-uPTy!>*U*rBFKE3t<~5S#l+)&UkY%}XohQF|@O#Sdfn0QL zQQc-8nZ~3g({prZI^xnW99xn&Z*+{ojAi%w^GxT(a*4MAdalp{x2#M&?m;jM-MJIB ztD;(oy7MRat=tmpQs+2=fc&wSB*T4XYO5eI9o!uuiH|M}N2FDeu&1|mzh4;}g7Aka zoFRA<0B$)weF0dnTu~2WxdlK05sD8;Jjo;0qOX|`xiUi(^&rVWRR!L`?vwyA=$RXc z|4Q=+)z*JhGIIm2b?A? zgtvi5#|nV?OG+sSp_7?F=#~$#Fuu_j5-_$C6j9v06|8N}HNF3fbw8U)z((IaQcusIT)k-wvmBBtN*p1mDLu28mpoko0?QJ zRPNBy04(_yFxO;fU&8sF5(4LQ&+pDb26%5tS)RjEFf#`bJX}35oUAi^FV2nt8UrF9 zi><2*3#DOV*bsy=xchW&BkZ96SlZ;_IncEDhwqR|c=9zYr4L|myigmRuU^-0bwEQFUAfzV4{UVx>Gxz749M5<{S2S4L=_cq8*oL$~MEKtrl zfs`qjI+hy08`{GCn87(dK(C9g@CVYw?GXz88~FpjC>u^g5v)VORdWt=nYBT0vbN}X z@Hmo3%n`K>Y<*RutE=>Bk25)*l`&BKU^J+nrzY2j$ID1%tAk&Rv&}p-se?oy-S_dx zU-LT*X5^uJM3z)NwzHYf&WjuM#@^QU3v?H-=zz)%ka`q9K!^A}JQp-ZpqT?g0G}>raDTt4Gi9uXQm(=zcrsV5vRyLeXu~k9(6v)4O$KCrk^yKU_9$xqm1{Z~F2d zX-3JQc&8Q`LD22z-KGy~V)D`b1$I;8uWHTzv$itD}6k8l0RSU#f-t5GE86%+); zyn=^*+Ie0wU|F~1WF3R_h5YvI9mqX_CXKI4Z35;rSvF2-pDIv@A=6yLlB^T(9#Gc! zPlF6w5TM~3Jhc6CfKusCK3hI5S zJ?4zo;tIm7aS#JO^?7yCIxbF6WalPeZ$Z2^AERnq`tgXqc#$mfv)-cw6Hf=*esh6= zvzWg0M1n0w_v>`mZ;+ZOf@u8DZxZ(*2w2ylhSk>{x=mv%m~W1`km`{Mm6_hNB6hjU zhan|WAZ)p|b`8i$2xgGIK{-xPwF`LJ);ZwG+wp!FF6gm7mf+fT3l4+QouEmm-mMkE zT2tYYWZlQd2OytrGZ`bFhWeRBUlXF6_ToVu`c=Y<+R9jF_N#|prHCFs1dXuk9MBj! zW-X~DDaT^ef?u5`Z!GI&j)+0&XH)IXijR+{0wS7?jofMP=@@ec#E}fB5zEGeLUy$3 zY6BCDkhUB%Eqv(@jQ*)+CwD*YM$|=tLc}9VR$?O_N;~Ok21bYCVm`R~%`b{J2SXX- z@D!r^>^O-Bc4F4kX#G|ut3u`+V!y9jQ;VR`aE-s=EX#+YCRGDNh$yiKLC_bHSHVx0 zYS3ifp*_y^541*4PJmx;&8~lYaef?87t^;9Fvv3W<0X$dtk9f9hr$X8DQ$y$@^Vx# zk2gHq`~EB|zkqb**O~If$A@;)%Fr5L~va z$wlnACMI<^+lEEHLRi7xXS9V8<1g7fR+V+sfKigGuEHb$+Xm;n0*vVV*!LQNqv+Sl zG5|?BMwwNS-DY(S`2*f@AIt}Bwqz*}{5^6*Gee#S+p7X9??gaTJo**S$jC?>PY5n3Iqw4lMQ9Q?Zc!Sgc3uDLGMl48 zyZIc7g*5ZNK;)yp80`YrcG>gXoE%YV0)r7d{&Dbr)Qii`&W6n+KuKU3pVvJ!hO7ks z{dT5M9)T|aHTXsZ+e7#EPbrI1F4f~0Kcd-=+HVqJhfixvKC52Xk5w+DpA@+(BD68J zvJ%Z))Lo(yripSNWp8Z(w-<|J8{Foqnl;}{1i=A~)Ex*Uo2fwP2Ixdp_|I`9eEQs& zbz+B0gM3vNx3A&n{UE;tmj^KM#wKQ{DlZ4+_zQ6_n6QH;2qb2ZfrE-f-Vv*~GAe4F zVYF;C={v5^@9&vx_EaZ_ir*>&Zao`TDyW6WY6mD>} zik3-c>v3L`;}s9WA%n8wPzg#d+oI6kh5ChCFokuhuhC$BcykGyg)Isxptfhb5#LE*Kyy88W@ z>2l9~d)%exA7r$Ou@!Tlg~`qZl|rZqA-|Ol`7=}T0zQAar#>QP+uXjvsQN+mI1~va zX|>-Bc_{soC*aTbQ$uZ-vdXzh`6Pa5%T;{4lJSA>y1K+3iC+ypnv8~Ep_7A+^*i?J;NIM978DGAq zRh;C1S2!2IyADmufGk%LLE*0PeG<+`Kl|Avu88!1FT(bGEZ!N0M~ZVbGNa zO(tC%`gVegO20?=8W9muL5}VtF=^>Ik;L8zxr#cY>Qc(Ddwc6Ik$JEmIlGrPswLvq zLbYMbzMS_12_vNaK!5{jPoi)TG8*@tp=%>NYOAWMiaRT5W53i~|E&p?0GDYOFR#V; zY8qgpuEJ!gvC#u6Ls+bIcfm#s0#$Dpl*gd$*I>Y-<9B^^3E26O44Jk zfS#aAJQKyl_xS4Cd-gYAr6@^~EXLpUHK0wV?M&wG#l!Jr?+FloJu%aXZdDKj#SD)! zQFviq9*Pwcn6-nF0Y85Y5E@`HYOn@WeG?Rc|I6fwOVC>#YF~t!6AC6OZAfothxi-%Y1+CysJyTl>NCMTUW_(Yk_?T_!D*r~ z7bc*9Jj2$q?_)`z;EkrhAik^x3z7;b66GhRo}n!{4JEv}B000_$|} zN*{U$eerqSoo*HAJMHEGb~0Uie(v3A2+vB;z_Vd}lbD9H+Wq^>UYxV@j=P=omNKvFM_ zn`fOf?Hb(KT7fJJ>2qPBfAM~&g))B&W$vq}oL&9t>Vn9U`aV9Cnl|XG;UZadE@ZUv zU%klP5Dd{dr;rlU`p25@TsP3x;z$xihXv;!f4*RNZjL!VI(ob$J*YmR)*p!02TzF} z@dvgT2?fygBB`74a}!|PfnY3Xg4v?)PvkMRH3YHld^v+^Jsb7iUp_m-W7v z9n)ws^5QN5xf@`7fOLE|@zhVqA`#dp;Kg~glWs=TKkrm$01)0R04r>XJ^h@Wm31G) zb-Mgz+C-zBC*WPlfDGY}PwjQoJjN%`)=Ip5WQWmiKP&?oBnp>4rqTQ|Xq>J8ClpA^ z?B;5g!j``7`ifleq`;uPNlkqwz8uha{dd0x>`Rc(C^L^@M=}~Ri+DYe^wTStFJ>@2 zuN%gxaSSv#^($F0<3cteGCY(IOifMw{H{Pb%4MxnN?Q8Lt?Cfu%;j&t0>{OX(->~J z(>G~oHZ}(O+2FUpmi{st@Fx(gfJmM#=?(5Yw$RdedQuwg)K3o2yifs(OlT?fr1P5f9S;H}Xn6Rf37&FkB9gRjSGrDjw@CgCw9R8tjbf^*Qg)%LsUE0QJz zg60ubte!1nv`|qNY-l_43CPjCC~0VE9mq9#(1ND8NMYC(t|+_X4V&mt|6D4!_3l80 z2higlm!rz+NH+DLK6?)!xEZKn2JRi!XlRw`)hysIsJvXjX<0cqr(j@E z8>S8EG1p*f5mIMs`xaHoy6te}bsYCuH*sKI67XxQs|3FSSj^XjN`A#}g~3DuNm^ZneMq zBQBV_S}_tb0vZ7zeh^|IGxi6>Wdv4=N=g9yb!+ivERsqAY!z5vsjK^)9p+bAV(E>n zuA0O#d_W{(ZWa%1xwU_?W*cyqP1Ei$^}lVtcMGP8&bb3S?%ru6-FN1~=_pmU2IQ>=#VL@r($o-LzWzW0$AALmZBdcpV(B5lZxoc@>)9p#Uz2ybGY^I%9!Zyn00$pHrOc0yRKZySob>_`Z9#8&`Yx8*Fi> zq=!#qg3s`Bp+fG*v|FI~Mj@)X!BjzZ^>`$B8>w?AlweU53Qxt1-^ebZllor%@<6d6ZiH{9{UZA6JYP!kTQVaOV99XvHitQcw3s?)`HWQ zy%R>Fgd*fG6R?;aKTF!9U;g_2TmBF3(m%WtvdRZnxC`?HOJf_ZFoHvBp=z0*jr_Hw z8yBT{#PZ8@d zC0>daY7nSELnrG?5=yMdgi$0=(qM-U(`iWfyCBQ~d<->?kAU%piYIdGEJpC`byCtX z#9P?yJcWt~Y6pOgpSc1(+s#=#1L93D{1;^v<>mH}I60AlXM}<2CDNGB2k(QW=xYE- zz<`NUTi^qL0Dg2ef$8JUx;(*FI0SO2Q9bUA(5u$PU;LwLX>80xgm_;hI49Pj{$TA; zf-!F|cL-4DHTL4uDVLfYsm||%l5&ci>T!~7VDe6*Z1-N$)Jq>*TdaozIE^a@%op?v z!>DYRFMYk zzNA%6SQU0cP#ai8XbqPe`dZuBsT5AvhK6d=8Q?IjhL=zy+>>*28HXJJiqZqHM!O;? zBVuD?&k_<7ryFtN5^hir9q~uOL{4r2gw04xsgzOc@5^`}W8{8qfwu<5N^dw)1hW#{ zLpj*lH~PQ=0A#RTwX$*6vL*0&yV{0_i-(q#0^-5p>8 zeM_eZDJjAo5nxcPkx?|jPaLQ z-1r2#I5_4|%`PhQ@SdEU0Iz*Oc=U6Y+IP90Rj|BfB9X<1jwEa4;CHUb9t2J}t)cI5 zlv4U}{AgIQlXg#vZ=~N9{bulOmIu;O7KQo`PGw!$RxzI5mrv*V0NpIR!G#u+FDENX zf@X-+l79*olbQLslHT$H!o%~vKR-)Z$k+gj0ysNI7I0(a4W2~hGcRUwb)LYV8)*la zO4KA-UNwz7PS>t&fs0R(9hT_pShVkdWl0IXd*0RaPuYIltR@UAcJ-@i>XFJXQT@RI zf^0{d(|HMNk}cd!r54SJ^R(O+TGBJ2eMgR+4;~1~!nQg>V__pa_N$>%~s@5mKtF%kL&R=98_&8^9-1 zNPfb&SjL*5LkG>wfX~a9ZSB;$s9cP!$-y0E*!KnARn+oQ<}e#EN_x4%d4Q1)T$?`9 zVO+S$fa8CluFf$K7`N8;42jbj&@ezeT9}>9qsH4Z2OrH@LP0+5iL&s`y9(naOdrl9 z6n*G>c6E1Pe(IpEI9^6_e4m4SWhRf3dV_+Trc(4DtI+tZ=rDWc5$3iN^xz)X+Xzm% zV)JUsg4mO*3Rw>BYCUd?DqI{tEle$;OtmRvH{-seuKBMX^j~ZY(V9dQzOb$Z7Rzd^ zfLb|Vhv#9#>P;#*uxX~^NAeGx3_1S^bsB-`Hl!1Pt7#h<-GBWhM9OV*^1;zHuX>#Y zsc`Uz8-jL4i*rFqdJ1oq8m3WZa}yJpU5LNDkyX^K;|^bUu1kSX3o#moS`1mRf_<35 zy)o6D5W=V}1u=gO%rV7*Au^C3{uYOzQ zQ|9QYa9QWX85gpJN+&zuW6s-@8|`@9aWiubmVavv3b26d%S|lCuyzDTVQ@+rt>Dn< zp}YWPTmXOP0@3yg46WJ1g8+TC<=qz!G4uX>T~+ltFzUTHjwD!F6;zg(`3#MWveMF& zX^Jt8g=iuGwcQCmc)kGqX^fnFkCWLI4+hr$*H<9_jt5I|#-LoByH`^x^m3P+YJB6f zMh+uju2v4*QB-FO;Q|rq0n8Mp`S z5I6uXeED~wt0Z3ul_h^Q3O$UL0BbyiFFpEFIdkgJrvp%q+m^U16)@&7IApnE9B&WpwdhSS$AY%nNv_1kJTwK%_3E}UEQJ1pX z-@OA^7J7?FOLH>_t>Od<_Ve`xReQtLu&(>m>c-mkcjmX)vO#zfEH-R7A2lvEzdS$Q zfwL(0zVA_pxTB@9kaN9)#hvu^doliS2$LaM3wj`xD(NMl8-UL+BL6TJq)hrrvqNKM z0V-)k+o@nj{NcewtJ@Zq$anaXfQrrQkF+y@DCU54Nn%H+nqtUMZBFnOLzxDx=e=8f z2zUN-tqw}c;5&x=Q7kJOc0Jfknl`q!_kU1LA}lsN?g$9x&${VzN+$ErjckKxDsmD2 z)})P0-Orr8r``Y%ZMxqfWmKB}0))7~f7d6M@DD7_w4gjvITw{bENT~K%^O1=-p9O{ zfq|HD5~T}`+i5)^Aa9X<+AFD{r&sdvYri%|8re95fT)D|=j47~nD?+rk^2qXvKXwr z@nT{!eg-;aO!>?h#?L@52iOi0nEw{DdH~creE2S@ng)~e#SlbfB(U@sPV-|yfvuk) z>flOQzqqLY{_Q0XUjr}g(T5LX%UR_xyulMjVMG+U&ZJt};fUnbKGKP`ah`zIMG4*Y zE%3GTrM8!2h$*^_%I5tE2m=8w%3dX$#|O{TX>?IPp=*=G ztJy%DH5M@ywf+UuW8e}4ao@N}?+bXXz`_3kVwzCM;xs%$9Im>w^ld<{TgsJRTFf(t z^=1F|{vwoMz^aCsB2Xj8N@d^ltf7&nO=^^nkFS?Nk(D54*!nd{ zZt1JXv7=X*MNmOk7h^;CIyPa?pi9e;>>|BdDokoE@a(6=`fz=jW%X=5o@S&usvW;? z`Vby~L{>9YS^-QJ$~oZg7t{O}h5H6~R^>*}*h#&Butp4h)QGK=fB^FqrAUGqLT;@9 zv?+YR2Q0yJGQK*qqL}r80xy4)2uN1l1gO8RvCxO0B>6rJRxg}pTO4Ehdf=~MCa_Aa z-#X5yr5V8m2qS^wXE++4#Rtm>N0qjogfviDoZUg>yo$;o#epRs=mG?XQi5ub#sdv(xurTBwuP1ftzpp(e99f1WfkL84Af+>LS?6@yEi82>cFQpvu)2cCy zN=m>&4;yw|8U7(uMj4)nUB$1CzrZ^V5ItY6R8&n~t5TIz5m@K}HDjQ@I0IfGlK2dD z2wICsFbvm#5xr(&4U@N^j?}7_G207r<79|~$XOipMIeBl`;<8W%-WA2mn7IiFY$$3 zK>j-sszpACv{wJWV2WvC0$*8!+>L-Be&Njgfgrj z4?IsI2xFmOkLbzRRhTb_vKbcXBee#mrbNyl!k~t_bqsm~AX@>c8W^VP&Mhn8*v|Sn z*OIRBQU7Pyvfw&TG5?#}{2?m_XEopWi>r7Z`N&Nw8wUqGJX)GOd^|kYg*>T=$w}^K z+Wp4M17ZW#f)GheMNtj<;1r#Ql zw+2PO?QYz>0iZT>QOYlztNnZL+zkGeEio@JMLG&es91a$dPZuiYcT5VSd$TgG6uu! zcP4x?XgyGOacKx1L5~B2ky~tRNGdnbn?S$Y0dRX=y(%FhD07W*Zzf18;ZX^Jk*x;G^~w z4xVyh9moj0d*=hhT7Y{R`K)XmnHMPMMiWk1?-4U6Qp_IbUTojm3zxlEpL*cgE_Le` zcGfdp-8r~;)^Da5W&C28-GDLD*i}{K1hCB{2IX9s2UO1C5aI^w;^)5Cq)g(-n0ij`W~M- zvy`?l#&t4A^X4tcz+$^KetO3J^+Xs}xa7yMpUW{f(&&rW+`8qjPbz5xL%O3uGj?Do zhnrhoI3~fnQN^RUBh0$6n?o8#Sq06_^E>V%njrE_`JyH(kt-B4jNBp3UPBAc__69CPiP(@VhtEKocAuMHeb#-Xl0z_+ICI!XYu%!HV{QBkBY8=;6g9yPufu)Zh zVTHpi$_bXmCLKOE$nyk^rR2S0UqJCZI5-Fc>^hovVAUlgN|&dLW-HYGiAae+o1Q~T zB0H)GxXw6^9(GF}N0o>|Hie3w+lP^gq)gKco-Jf5I2ES=N#(AZGFX?fwa#b<8bEbe zwJ&TVh^K1UMk;G5crMDaUmCno`7!$)eIRLz>R-%q_b|o3ZICsUx!RKHe7;ZlXS_m| zJeZavdGs$3qxDU_ZNRV!kol@mv&-0S)@M*g9;~n_`USk@ZkEGOWOT*O$Njljw}m7- z!il|U=V>`c<(KjL^}heD$_nsf98`e4-~b*4AITdgPps1J5*RfpJh-%_;?V1HEtcJ- zuJf7#D}lPd=6izyH?5qUs-RFoB4$G?xp{a%)a%ZzJ{|Oo$>(=&vN5hwiL8;1kAu~y z@Qd%Rs|BhQY)dHnC2aT@-@-kT?NCqxP*fG=bZ{qJ7+$hr{0oM}!1FmnZuY#HmzG)L zD|o(|7#OUR!u3otcTVGqXVi17x?Ju1rpQrh%Q#I~P_6b!eR6`_^R6cSuTJ0q;Yco-+Zl=3c8U8EDkrjp#CRf2yux0A>ImaS z4fMJ*0bJ&CRnjQ9yDbkmn!@O?0ZFO;R&$B%j z#-b;KvCsw}bs{@E8T8*ICqoU?=eZl9a1>Fu3_y*!PIrYB`2ThE>cm4t6Y-uS8P=ETb!t>F%pZGOq+OLSu75w3_hGxG)z08X{NU>5==v@otOD(bHn1dun3u0T&Fjy*rlBzAkT zX!Dm303J_Gk1eHvO94`R;jHdvn%@UL;%wx&K>Ihr0`oiAO?iXL3c}^GXj_7_*GUxn z?N`X#OsuTvr7+}PyC3Pmc3S28Yfis7YHJ)YeIg=YcP)E0Mid_WB4lf+s-~tiViKm> z?^~GaWjSs=dP1OnW3aI1G25b9C_H;&7AE%Yp`29JKVP!?>P!Oz1Auw@K)DJk!s8$9 zG{}(yk-xlA1MDOE?b^)o_JTCW`gi2b(HrC~aawO|e^NZE49Hh$Iiv z`Odw)$#>raOD{teXa?a*X+vt(_KuE)O$N>a#B~l;DVpZ&y&le#^=S8#7!o`f)lE)S zGn#Et@ETaB_;l28NIW%2+0QEHw^uV+mtzC{U;1W z$;ipw@F=>&K{76CA9y36M1(wSurq3JZ!d2~x*BamyHG~Z377`RsmiLew!*Y-B&mf> zUbgzb;zcvn-dm(-lJQVN87V}U@~YVj1IIQD#w4)X`M^ni^gNKo(Bg~EWDs>w8%;V% zy<@{VC2wl=dGbKN(##jFIAt<6#wwUKW;g(%o2jp^;bePz8}RkhbbHC*`tM*TwTA2}Q_~Kk8{oo9dLB9ctYeeDbw0GYg9kQIE#4bBD zS#Dch!1^j5TfP>#RW$S^fdzxQni_1Fk&8d*Ew`m&(Ez3gUFCAeOR=oLEphkFeq8$g zaQM*cyE=4Bg^=a%ydQ@53-}M#j2sYOI~2Qn7sn;Id`*q;{jw`u%= zbb7CdD2o_ac4og@^#w6S|I!SV+sqK(hIE;mm{rudK zuI;_ zmz$kmKcd0QtAptRa09p2pb$mg-yNXN`hz}^o2oE%WpIyqH=0GAK~i!um%Imz5Ml7) zYA;T0?&uE?(QG`d>~~%gPNK#u?y|K&ej)GMv1E+qDTW+4vj^j6PNB zCrcZyiY5n9Jh-FTSoIt(%r3|il$j&oYsHjA>JbJf3C=#KJ(*C2G{eUNH2H5cTWSuY z08_RDV-rTqj6S|gKALDzr5PWUK0CpuCbnm0h=Ldka(JU7|{&(4e+o+k`#l#v?IBau4l*Akqj`WSB`zP_G zt@bw8pfAu0p`p*8So5+**6zX32vKkk?uPe15!l3j7;{DeBGk-P5AAL-2p^Hg?1GPx zWK8cBdS-Wu7Rb;d5Zwyu?C+T8DXR6N%USEWS(VM#zt}cPG*Yb?pmB-__%YN!YaA7+ ziAW$xY}oV!fh=4aqZ2Bak=ld98rTfYe!Yre-+)V#a*SDBoMxpSB8)BJAs9T$7H4i235NAYLL@RclzoF+PJw=h(-qk|P0$U}0`6JCLg|AM_Y9NO}dB{W?9JBAtyq z?(6Hbqx)7wI~4}v3fBxvfO)VwSJZ7a;ag@WmovPX?7wcQI?SM6gs)(gI)Cqe=xBNp zTUjZW0WQb^33$WOpUU?>TppUjHQ$p7q_>|gNi*V2er@B^8I4_#PX4&G6xm?@wkVl0 zqWiut#6h*J?+xP!wHW5g>NXqFAKMXyAN2P%VweY%|6zG@ygS<~j3>bAtIr`!z{0@-Q_{&I7Ql~l@Sa6C-mZG*gW&YT5 zN7mK2L?DbWwDb1HplKkO)W85AYjfEjR(%#_3Qv2tTu;6{yn}NX7>7@HI6|bvFbZcH z{DLmhkDk%r+O>0gE3;=PuNZXeQI4>vs61C;Y;BpvoH=GIiHUj@)_NQ_#6rC&EwZX< z6W42E>{#U!P;C=|0ukTrtXHh_h_H$jBvtX3<_W;lL$;0!qw)v_Z?H6hyfKEX{?2YN z7%b9(b0b_;QyZko4Zp&pDv$%HfLijqJM3rI^%XG9SY2_ z%P81owY3h$eLeFr1336;=BX~u&Po;+7&3}G8LDYbBH9rII<2q%dCmqLj}1=cp`H3X zhj~J)!|g|HcYu#Hkcqct{8z%EPcZ7KKxk4=R#v#D7TpEiUJt!fGiB8=BS-xEaZKBd8|D1q4U?Hk%q^Plg z`Q1@j>1fDHg@@(se%@+$Q^t>e`6r;x@^4#-oR)m0?of)v7j!7@gtXS>FuEAxO>e{DF^!=B8s< z#}J1GhlUdw_wR<@;^1%%(Q$Ogxa)V}1t6!~7^Xx*)@SS8sH0KjJa8Xqbuy0L%;7fL znPhE0wWwRhvq+!b1;8@<(}g@MnBsPw&OBHHHSXtkJ^`Zc@56CWH8A*uhlh8#SI$O4 zNNxpFKKeTzAnRxQ{OAZutLy2$Up`VLukhj$v$K7X5sRy*AfU;XJ^6>0@d?yyBYM#^ z!QYC^qyY3$NyaO17X7?`=y{fJ!qE-dcw$fv*`(#1t$&2-%dY4mLKHx~C!K3?7dn;EzIBB17f7#Z2nq`INlzZvuVcEUn8CyD$In~M-QEONENL)9!C zyhx~Rn8h~X(#6PTyWNj%71HN5ADNRay32%AsmKpB4tG)|r#WdkM%RVDPJ)a?If~9H z+^%KRhvyT}SKPanm-v%Q!WCp8JoTMKUKt*D&*NRj+V_|o+!K**K3?*OhSN77rXat_?$Ria_a{Z0DAb_2cqS$T$*E>+j8aC5V;`Ry(OG@%kTVp1_CF#kQ2JkD2 z3=}p?u!6POCHI?KT#QfxU3HrM>HdCW$~F#!FX>u7VP+-|A?NjJ$=790ksts;Pyy>mSxY{JeQr;dF)i>uJ% z2#R>PSZC>I@fh{FSr*otu-xLieH)LhiKF2g%Nf$v7zt=tcnNo@jv|HY3t+EDIelOt zRr#YI$@=z;E?U^XQIV>^1+9OYh-vX13*;3fU~R9a*>@c7k@~2+l zNbSLcG3X7_bzd+_`80y=!Tl!~)m$Kg=ybotd}2H2eN}a)pop9B!-K<7N` z3Hj6F*0EL|DGV7n*KWYHcJUlFi;eI0XO3s_L!bhbsQZxtX5p)^>iO?2RAJt1Z*ESL ztPwaCU;-<{9e&uRubeC`Zpl{E~Rc`VHoQ2J?h7esXzhgdEkN z7N_^?x)=a?d(qwa@5V`Mu0Qvn=c^;VC5jfJ>Gd(9sKeGW3Dixj#Ca=Er2$i3S4V2( z0=uC$HW-8hd?7qY9KSr_@Wv|=syt*YhMJ~VeFNE~>X$t$UJU>PZwo*V9lt?|y#zTF zxwie8_S`c9m*8KdMyE4hL9Z*DgLAJ;^fhl(30KQXY+__I3#&TtHxbmeuFw?w9XOi3 z+)35f>nMO612SyD58j201U=6=3mmKy^upTODVG-b2Q)O`qhao2#U(~o!Uo(S?on_5 zZD^5TGC_R+XUIvM=o{fjX#C69(7rwaj9Dj&M{iz4UG8Zrh;mnbid(+s|G_LeH$kbf83{`}vQa_TqV}_7LpN$W`xZ+{~9Ie_wJ(he=NX@j}#W361 z?L`xcpt}vzb}3sEZuIX&8-QOz9d_Okt(`%WpofXZxPq6;_Pd?|cB5cL?H-`c;S19y za7t;=LJ->6J$*VkHm3b~ih%GNs4&WPoEPTxy}zHOR)SP5nFP6gpd%Ep*rERraaje> z=&(OcbddigO%`HM8OJbHM+wGOZ>jWq0!63?y3O~2r^R#$W4R|#Xnpwtt0@@M)Y%xC z15g{ThSW1S{Qxm-`#F4eCLW@^cQXhzi)MueMs(f9k3E3lQV4|!YF>R;AgN{qS0yCR zn9TFEQV>-??HbgyvG1_?VWIrrDJ%@ArZHl~e>O_;66S(~DKJ3xY_#ru;^)VJcS!g2 z{q)QX%b&qr*gdv?x&r($fFbxEdXx~{c|(-tzwRKx&?qiE2Q{}v6U(huoA&5grC;N9 zMbuAt0eZOg`%`y)GuG<;2(gM+V%>_EE-iGHHy+}LOxX4XQ$}DqdwMp5iaD{Zi_6;q z%bxcFkjnag+o;&VJ{c%d0Q-RepCO;R)=5rbu*LKUvS$xEZLV90nYOCZ)2IB_xS4ut z*NK1K#L&f_DG*W6a^-5p?6UYBn<6PsfHZkwc%yrh_Tcri!q5y4hu=LeEsjmgXX849 z!}<7$yz3wzK&?Y|`!lqY5DljIK>42?_YutpR`S;PNl5uH<=Xmoz?7LGPzhvaS-$t+ zcpJn`yOcg67=-oAm01S9$_6SR)Hm0w)tC~F5>3oPoe2$Cd)G8XfOUaDKv8O_p^=cA z3+huq3gkG5DwH(XGKH9qoH9kZJ~sGSJEQdNRRx>*)z7`XJhl+|LqeWB$-t1{3EO1W zj@s)_MifgNuDmy*%UACoot`#cPchbE{Qpm_#gu@7yg%903`2yjlcJ)>eNd zzLbJ;F%WjlgT3y&QRi`p3OxlZa>`YlCwoJUOYJ_Uadu`ga1plT29uRss?Q$C-Pn#6 z;zr!PyRxvL56xFC&WC8-LLftTbi9JQ;VgkQ%?!hl&#)c`*rDC?LR(mK5)%*r+t;zl zXuMdU&DGpKfGxmKpPCIi$-=_mEotnP*gYv3O@8@cmgiNc&KgH_p{D`8*b=h0I1wFX zsQ=X;T|+J{*qtqRteLXwSSwchgS8u|TULVje4Jk3A%UmSBDVp|fx-9rG$+c#9JY+SR44Ji`|x$Sx)@i|`@(rX>^=I- z#Fz^LOED%lLj!O#uyt-AP{~CyU10peNu7rY*YQaA#fv}Sh|cf)qX#0jE9~<`3dMk^ zJ#dS?!5!Qy0lo(nbS^IWr--Y5>*4@;Qp5MAPa%f!rC}w3mBY75H#GG8>gtD;bN5&D zA;$zgs3$fMLtp#DnvoHV*GbA_FjPk{(AV+5-hklbWeTn<>Jp3k{DKOpjQYfbV%6aY zw@t2Ygq+*nR6dG`zo77tt85r-D&MGMD~YL*H&ELZW%#mXdre;(aE^pnG#M@3zAa(E zbsAl3Y&k9@EX)>SG>9HLvzX2MZTtycty1Iv0{TfI%NVMhIne1d+*Ot6aGnt z&X!syWz4ySpm#>*H*#ym5=w4y+shhUqJQ_6BOROqpjzs$X&lJ}kJH}&h4{f2k*PPL z2YPG%+OW91$r|{d7EE7eJ@uF5f!Jc?Q7PJnU;wxe4e2yKGgR`1$!+qK1~QK=0K_(u zbO{1K$Wh5*WO#ghn^SEXC#MOtLtalPQ%YS7Jll2^7f%VSKw2fZvL9XG5k?Uc>hwA^ zxyu$klKw?nw{nm)i$!Q>h|Xsli9$G(Av^q=Fp#-B{gj!U_^tl`e`)9SKcY0vFXN0i zm&%v!T?=QbfojL&%nYwVpjrKVxrX2Woy;oC7A`n#RW581%_2sQ9~4buIrM{8uZVbjkkE{33EUd^$nZ0aQ{2 zfC5QvuhsSdp*C9w#fPjgOxi40}Vrq z*As)H4{yL0^6L**{j%N25?Ks+2ASlM5Q$jE+_KKn*2oN8wB_y+&^%;G^Q=EH_a{l0sdVP{%F8( zPhzlG3aar~h`#>i^NNWb$y7b~EwUG0RJ;{@Kg(K}7Wp0=QCEpR3*5W`>q5{?AnGL{ z#b~kdaR5n=5G~K(SSe^w!7ULaCJdiv1VBu3N~k?Ox+tD+b=ev_%Vilcj%iG2xTLM(;YzO5N$5q8GbD}%BF*Xpc|AI5wiyY4aB0+EXajyEqcuK|q1|>f(1!iaI zN1C38xG}xx0lXisj=UtH)@L9YuFFWVy!skY#o#w1se<`HDF|gt4DZMIo@?6<-fWH9 z*{Dj-fA!9_1_uDYqDh-tTi8S3R}CC^7N%QDi_`YW2Cg+Z>NCC6jEz>@5&_JXyaE6} zZXcb?=UTbs^Z3J(B}ktqE8ITZ`N?#|oWlU&jy@)tpp?`n$b4r`T8%d9kt6t&15}pL z4gR%p>qq%inH2jndfG{l8pARdo`92V`2%t+115Eepd+dW0cZ{6%QSr}c1YSTLEi;q z)KV5~Z;UV5D8@jnM3xhk;%B_Aq1u>gw;+0RXZ6wz-d*kOgkB3RjTxO?Qq*^z2mL)C1}t&qP@yr_Q+Bgq zD=jQU-^Y9!afEsk@NV+2|8kWOS`TLkJQqkr)9zSu3XAJDd=rcreYZNJagJlTPt1bN zoI0c`O}_V!;WGi7>MUlB_nq8Z6qxMlsMy~kkOB(G@_MY+auh+S|N8`w(bIwGUetgc zkTU5XrbZGr8XZ)GG2ng8yK)TlQH?WVh`$vy(Y+1y;|CRYr9)_1AzjLdsT`4~PRCuVY^(Vb8fTjC{7_P1nMn}R?$1u-aQO1!(LP_L#T?yC<_ zdtn7L>z%A~1)Rl#q(t2J{go-4rPUaVtwQ?(ZWF%r+*|@eLR`7u6dxlVa%c;GPS^b} z!fv$}aC`GnGWJ23DDK^G1=o%YieDLC0oi=|yjaC!U1>MuLR8+6Ix%}3gMdw0I*9Lf zI{As?m$(qA&=yav1ZAlGj<81>2HOeap{B#;PNJH(qPvmF5t}BT)qpr!~Q!$YhFc$jqSys?l@#g=v_`ykj6EH%7zUH5#@FM72+VyeF zI_cSF0JmT&ZK_o-R)@O$UcA-;X3~>KC0OQnl+g3ObA7~`v6YC@Ng)#&VdyZe`Q#!- zO#r7I+l1ooC!uc`$qjmyHq~-udjq%sYS-!V`vP^*&Mo%Ug}dv>)nzt@5;bk0C9{d; z%)clk*BTL1BPBob;#1(+ra&OhqZl@LbN0en308dqF~i6KA>#GD8)*f6OIv$;b^tq<@}PIkjGXyJH1o7E zxkuhT^Y0zH32_aZbf`SeH5LF!z8FA;-js%K2Hc z&ksn8q4Iz!uPu%8@RxgoHpwH~?rq|pG~{y{-NithiQr)r;CV1LrXN6D@i zQKY010g;jx>6Vr*=}?eHDe;}H=li_Q|Fc=^S@X=?bH@vryljjLYf?2P4){7KmfyyM z7I6%7O!iOj79t-Id2EiCsubH$k?1~HndqVoYbVmG+>HbgSC`-5u4!K4{{B94^T;|O zMXuEIAvy>5G_vxvlMDt<@UR2oDzs5IqChifB)_`0M*JS9iI|j!ojpgj)Vw)X9OBd= z-aS`A`FV{Mg3QN9trQ)yr?eG^!E}$fDGh8LTUn00>P@YDY1+HuL@-M;(1|B(6ZN(~ z0{?%E@tq3FzxrycZ^W#*@scsch}g?fA1Ay3e80MarC991o~85T$eaa?UzjNc!a_q4 zvvO*BQ>Bq+fC#~=|GVC6DI>wO4#$u6K2O_3lx(!SiugXU=P;8eTMrrIKkOeI1jRp6 z9djsb6a##}%k@C4b-u86$Y%WwCfTtGp5{Ufq$o0=?hy%7&h) zDHm6_s$+*k=AsTY<-Y-SUtuYK(1yPxZ9EbmtlY3T4~MIvzmTBecce^(mT7O78pqb@ zu5}fPmIkY&l4{!H98SJ6Gy8_q+6|Rz-8{dqIu!9!3PAx1*Nk~w(W;)%! z|IDKQp^?qKj*3h`5tep}ZEl4ekm&{K_rF}mI1i}VgExsO#JTNHZ2b}a-_bWuRR46| zyS%k_m(YX{1-t_BL4Zwfp6&iC zXS!|gX?pn=`S1Ha*UId{u|f3FSbq93>VJO&Y~q6+8&KWmtGTbN5B)_@{BHDPSr2|U zY|l6M8oW*oKAAuMmX9&>28KH@7cFlvZ6ABaPUWHZq*jaymsytu@j@yE&S!t3Em;c? z0Lgk`Alj~{`T?-h1c<#Lwh^mUTU$G4m4Eg4@&4Ezr9}O+ zr!s1vMjWD@LKWv+xPD(HQPc%1K!o1Kwmklr4*cq@4t)!i|Gsk=OW3v@KzeTY3hNqp z(TPI88LA*keS=U2S#->s;cLJRV`Om7W7~)v(DPve*vVJ3Sb)l-9LemiX(=>g)E}6t zKZ?cXOTJ2(oR#JX$>%%BGg4|!HZ3&u-Cf=UVsrgh5VwHNUiqV!LhWKtHNCdQjO^kOk3Doh;zx+lqL zKae33>U&Gz(C;!u$YVVn0?5y|lQ*7Z9&X3t^7x9B>sDgO2(%{Z87c%@qTJ|bB9n6Q zf>{{n;1F;1dZX@5DuIx@5e(}$bbqzDcO4%vcDaJKx3H$>Cn>OA@B;Qw^%$c160pt~ zUa8)_ch4Vqt|SQ?l+&r1-C#e!pZ#cTZVomn14BQ8FmFuIImnibJ01_Kf^iCg>Faxq zx||LJTE5@JN*E0eNpLo>OO?JtV2s*Bj+%X&K`9 zwQ3d&$qw6r7)H#+iD?836~7LB%MAo-o!0^^yT>b`HNp(Uqy%l-UL|mdolyhC-@d800m|?*NmdrPNWq<$1jkAX!4}2Y%01?@5R_GYqq3t}gKVuXu=2i#lSU8Py10nHY9PzVw!*chO<`V$m@KVEqg%Envy*nXmfRAO<+ zNq#cDU)P@p(89~<&=!IwG$E(SL;t6JRy#ST)D=^8iQw$Ei|<$xIx21QwMzG zIH^m~;c+ES=W-Ki<&Rn^0%ScX6t7T5nKWrMuuJJRNSDDis*R(Y-lz!gkW=Ka(e+t1 zati7aYn@Ev!?v8XD=63X@EL)^o4!}AuD4{Ssu)Kdyh%=U!tYvf3@w$#q6*WC#j-BO z05FsfqK%gLEF%KO|Ll8g>#RWSHakyS`nsN7f!_k`0|+4r<0#1%5)l*}P6C2Wy{QJJ zN>WK#8SLGN#%yGYsi~-7pQ)y-9Iu-1CC-~KEGCAGZrxU#RcRy9L8dX^qP~?lJ39+a zpW7F>tYEwV2~>sD2m9BDz?^-h8p7Kn=jh1sqU{?ffJnKGgR`a_o)E)^8W8nF6TcUp zO~7kW9Tr9t$^QjJ-)k~xUF=ibbX6~H5~aG%uH3rSiQ_kT{mEu8yD0kOM@r6VBx>2a z^do7_5F1VL{_moB5PVcyYwt7K{kSL9rZKRDfp-0xpOip=Oz}7r@P@Nm2%#Is`~F`4 zfpm;V6%kp0C>n3hI+7P=IP%^AHhBs7(e-Z&Mw$cR-k)Jc;55e2Q<`F0!K$pp6ZG(D$=2U3(o2%&0R>cbi2@8qX z&bzQT5_`LdRTY~ZQqVnS%#fgEXvT7aysJ98>vn(n^501Gz?v47_~}+{s?}2sUWzw& zo}>LM6CPk(g&0ITeFON}3HD_q6%5Sg4)>g5!FmeAi9V&H^fIKP%5nT%%dPS3r=ibG z?%s#xXj{ZV@s&(z-YXSm-*{PASfFsOx{Im4l8v{fAs9Af77Z~g+jxPe3ye|8xZ6vG zLMu_(Lfu_mkR-;y%?(?Ee(eWlpL{BAzD1I|VvRiv3`lXk$I{rRVLy35ciUqfN2ldm zJh>m~s>ST+(oK3iWP)V5>yoVM)ozBN6Zy2DL@tK`QQ_OSGfUg_AH1c8$2qv15_GOL zf`&^+J;3E4aVNRLtZPe4P4FW-5f-i{5eH)DdRsTScV{}@A`rCLv_f_9mg64`;O~9l z{jX#quHU#+nOEk}hWf5_1rdWtSX0i3o@^oTBCJ6P)mnUvnW3=}AR}uootK^er|yxD zn_9WqHzAK@w`@lOBaTwG(WO6t3LIN68(1$Ws&Ddu7a!p%;44PJr z#uv`jc5u$~sH*MW#Cc?hd4$%CTKRibWZuuqURrJeoTinMqF0A3#zwwy#> zCzyW9g(?I*NUL6f{W5QIe`bJ)x#w{uke= zvl)~Tmp=3{!%=;jk;aHR_XWXg$@gIwN5C9f@OjB+&qI>nehWWr!woy7ru#Du!G$kQ zeV(zDSvG$0fIVbL4_V#5r}(`d^Yn*~j?3S%m4Mm=VJ7!P9Kjxpf2RsGt>8!t<%GZn z{AXY}4}}NxyS_JviiD6eUKrEHnp_yJnBxFZJ&F|EF+3+<%`h=G zcBSk7j3)?sZ2dS|g9j-d)Yu;hdm86=cx9}*?hw4|UV_1hzM|vze_xcEEPtC3S5o|m zZq!X^pCu`UV3YL{?E|@@G{>utSUh|J0;q?gH{DA#3fg^9_Z@=GQs7c}&wsAr;UU0V zxRnUk+))))NKl6@T)h9^i14^{5$_R=EPAx= zViNGGL&}>h2fh&M%VczD;uxlc0mx4#zp3a%osTBss3%yjmiMxiep_de5mXy5uLU;V zVNOt<ij8T}kgwK_p=)Ad%%!_$5hnJ8dpCbnISpywM;T`uIIZwHBIIz@HQHVOYF#h{w zuDxtt!UlgBP#v_d*`QXF$UbSkv#x;quM$dJ>v`}L8#2Eai%%9+@0i)8A^ybPOm7z-4>0n<(6`Sl6fJ& zHT%x48ZH9A1;4xnRiYq_J(=eojeS*Ef6I}S|#0Vw?rrq7x3ScaCj;A5Y zqd;}ATSmClby&8QH0`8_*QMDfi=w`a!R9+PzN)P}*yn&fvL^@zf=m(;5-4+3c}d_H z08k_dBY-8i2;$85?6Z7=f=DmMgK6-<{LC8ds9!LO*4^rBX2J4w1gy>aZ1`u1v3tWr z4l;Wm{bkoYF8P>yHaDf8;*xW{=FpskX?@snpr>As<3=}!_1}&=RZa+_mxBa()R8~j zx$)fXn={LtQMKc%;*(bd5gokR)X2_K=5&9JIK`1jIJuZNnC;bPt;YD(zVJA0O`hbJ zO|a$46L4V<`D#}$HrFcJWZjJmhjzpP3^{Towa~Z2L9_M{j4=RoT4Ls#9lsB1Lp8Oi zlS;=5LvsL86R;4IvCT_krsvnH9cD_{H-#3$~x;ccd?zX zY^FIH!7X+_pKLleTUQ%{!nBCK&I2)O5px`6R8Rhr)*(mv#exMzC0L?LUGB%(Rr-PhCqIWCtmgB-xcUvC+{5DbVwLnDYT2Ua*)kI$*u2Q2JaR!m`c1=tg{Z`)+tK-f>%EgJtDB$G;Y@N?UWK37GeDJL%+jN?cO3UbUqGj69!?hrd za(--?`jCKEx&$b&6?0Sx7H@08lM8;mtB`1g7(BQ<-yKy^(N)xl z&w}CPLIQzUv{uJi&HDPVg$^Wd?ME!N#wFlU|5d>qgV6y^HbzlSoJ)FMNJJ#+%><&( z!Yp`uV2iEMZ1;#unDI$=1(p({}sS;L$0PLUwp6I3Bag1qB{ou zx}wf#b$qhp=&5w5d4sQXE9DvXJ4vIz67AnwrTs!*a9)mmK$ZbIS>#lIl(7lz64@$$ zYP9JR!qMa6df+&sCA#? z-3G-{*kclcpl6E?rr#-+%p0uX1OL)-1t9yF%4-{?a`ezbDCg^7&BVGeZOhVIe~PWK zFRjD7!}8LUhg6?hzB6P(oBGg3J$_w?Rc7*giv8T5Kf8Z^OUZl*`K|Vq#%egNec#sn z-yd6#nX^cF%M#XGscr(D9Zob!hN7j)?fuwOY8nrw2hP4_BKY{0I*Z?GaDQ~zTa85Y z$W1g47015?R^%WX&7B? zEIyOwfxkhj_LxyNQVc*9{qL?Y{9>Ov5!LaKhh>*vj zA&Fj)84#~d00HMD-o?L4>F3+-?dTY}s^DdM!y6!7!;DFKM7d=nClOY?DeeiX@RpJ*59rM-C379y}Q5QiThBoQTl;DMx#Dw@R7*)ag`7XTYJ-u?2%;DvwhD~*B`d&-1sXE9>5G(aU@)YmK0!wLa=izHN! zsH=}9o}FLp1-02)5NsWhYbq+DOSQZvC5b}&O~9=aR>5Ay7nBjSPciMWZLK|Wk-Zbu zN3)fZl&yV@M^@xZ2laBV$FdfMD@XI_P>HX-}<4pGGKcK_|RaYQ5kE?&a zM_(LH?S2pplCU)djuKB~Ps^)ceCpV{LBzmhF*m~kbL+a+^)2+iaM}|6trI=eUu4|) zZ{bd(slYD506n41LpTO?IKwqd{8W6e2ez+lVQ+ruF(FxV5~NTVw@sjIxR;b`e@c#* zqhK4NMHvt`{KHc6hF;QqmE7TetGiW372m9SC3mrKkV(^wS1SVV@#%y*6Woy00f)$_Oa zlgbNa{z39_EeKj!a%{OL^2Yk`$)Dh>2fk8eHpb!=Au`MUoL)+CH0LoiP|GpySnbV1 z?m{zVKp*|8;{>KHd_88g?iRL{^`)z!k0RvTMpD~jlai7Uk6()GTsIZu5zG>6w?$ZO z5_T#h#7^Dwto1=scY~qV;BDkEZ17 zI58>dFOYg30|fhNJ?+6)pOqLBmwL3UUvnODWI--rea{vDy(7)mRjy!rFg(X!N9hO4 zZRuHT9HxMLg9|nyETvWyk}+_x+OSp13H+(y(De)sFDiR5V|mQDqmT=IzD@+oZZ(}O zp5&)+oWWp{Mzf)Wv*#*61(1<>rpK|?MZia_8h1mhr1ayk)Ws4Wr~doB9V4!f4mfKf z@QX4)mH|xR%f99dHFb5IfSTG`kEL^zh{39)#dPg@=i*1OGGj=eR65;%w>+3hq^GZCC^ z%V;1bIm|b0_Gvss*B@@fg}SLQYrj6bqt)X;$L5Tij9+v&I!BA+)t48ZWPu@(UCD6Z zRt%cYUh#haIy@ZTYs10C1%gkXgI-p!AwK={d*P45=fLyXh1k0W}E;-#^5lpm6;AaFd;hmex(a zNp;_|rq~l|tX6nvW14-bx!-hv0)hAK{?EmnTwY7z87Ex9AgKCj;x? z1qrCem9yR%0nx*2_p391Dr7v3?Bn*kLzaEu8M;pPn^;I4P5kv^Hmq{d)KiBZk4cB| zA(<{brBOKlw3hcCAaNy~5xxEUzc7BXN}WcmypTeFewC6B8>$nyrL^z;0%Xu1(g#>< zPhoiY^!;72)g^DSK^e(VB0Cpc;(y07A60K}k+Vcu{Jk~!NZW2QGbT}J{AdK|X()4PO&&~wzA4h~+9^q-vg zfCdDNxPd4_K}ZPV`vXY6635NR^8ZP$co!KbSjX|o5fr_^1K8T$mh?Y6lIr{n0{jFy z8=6XanFw_F0%-XEd@IO;bU^k`@A|DOvZdr#h^Zcb866GTxCS%D3HYC!Y?=RgJpS(P zuZ2LVcgG`2wE4IGPE4f@J8emf8C80co4}H+$f(R#txtvE#Tq>@+YFQ!RAAaXdhv?FQQ!-;V7wcfuI-thX}3sEx`#cMTSN}UvFTjQ)}QpC@7$Hg&^FGT6|RFq5wL5*myhv0;|!w zP_N%0H<3E%VXU3^dVP~tF1&dk-X;?h6PF3JlKzLU7cP*R-Y;sr^X`4zz*mC%G&c<) zD*hnq#=j=s7m!Tt+qksY9ml=eVMUJ`T}-4+e}sr_;y;xUQ><~gakUk{)2 z>`TkY5@Vq?zQ3Vn$aFxmLzwiseaGzc;NVXeGy(MNl}?BqYC35|OUf>{H60uG;D zr-3cepRd1~pqLId!lePPw;jP@_i#-bar<___EZI=owe?tf*-*0ug8iFNbgOp=c`FB zvvQD^fHc`Ls&}__a@ro%l#1a784+Y@ztJ!DhcW?v$Yz1Rk7pk?`vbHB%f*vOVop^m zHcn0fG922#3pY?0?X^EpW+F%+z5QQ#!#I`G>nD(Hkk8qLUX{@OP^C!kvkiY>2}hTY z{U6b${HrFN?PPx7A$hC!(_nZ9Ojq}~Guy8brqnrBr!8BjsI$10%00~yuF|d~<30Nc zPYSo~HWX507~O5^_z{;@;GW9JxRPq0Df1e_X=~vtj^X}e<3yDub+*ZfV*}73v;$zn zy1Y#QI5@az4)Gd&2-d$ihxtxjcL8jU=!ZZs1XfZ;m39Mokd6VvF1Q4fIe?ZEA^eRW z;sKPh0ER7{_+Eu#9{y=`?BCU?9SxE^JjcjC*N$w? z83`n??%Z#B%)G)2Vr4C~Sjt;&jxH`PnY&h-Rq{+y_b})Sji$09jd0NA497yeWsFm9 z2Ay*N4r!&YjmyTyET|IwyslTw6rIr(T#b+tFR-V9R|-Fki*u+KB4mIK#;$tYO&dsc zK=Fn&^o`CpM|?AI;%(eq>1@6G!=yqsY(zLY~Fy|)U|Zd-&<5r$%u$q zZ@3h7Bo8Z3A@FmEkV;7du*S|_^zj|XYGXL7*hfsj-!aAADfoa^=_<NLC_Y$uVFn78;eNZ%SN7|lyO?%mB$K*wBHkc~w~%Z(im0G z`5)FvYlX1rXr>9$g$W3s8|F(1iPr|G*tlQCkfAF%vFmG`@NrGE3yDIO5O~@D;7TAR zqI_=9V}9Ri9gT(ZBDkgIu;WJb?FkEn>wQEGTsVK?`_`y98Ktv3q3hsgQo{hA@$WU> zK)7iLO;V4JkC7jJfc6sK{>@5(tN%X33#}r(OnIUkRr6cFNE2ik5PZ>vz^E?o^7Vi7 z6xh?tWGu6U1$Lfvhu>jZ#yVM&$-ZNxmv2_4)DBZl_;yrhBhf)^T8eK@7V~H9R>)p% z0%y+MZ{LvkM=aV>N|2^t#}6wocq>_&X46F6D<&*mU); z1C?V8U|9`=T93zx-ixN7to59`jX>}tK?$b z1lg09@C#Or0i7aGGnf$h$*~8nI?{n{ofq`&NrjP;?d~2^Ia+MFHMG(a3eE3yibPG( zSBUaP>fm!J5MO-3tfv3oP-X!LesHIWn^&#FsX#Y+&{dB}XitW{nJGp9Y+Jy<*4HP| z8*-+=pSdp5=mLPS^GOv4NQp)oZNdPxbut-NS@)UsvkmNadmNpdxNa%zrNiAc@7jJN zB~I)zb;>LR`Jk4jZ_>a0Z`~qwo9U+7v;%IGs-R>fKCbz|(ITZ8CirA)W?mH1^ z$)Gjd)VsASkjfUEc-w#h`8R?!7X&|xNJ^%^coCE}1zPtmkZFUFiJywHvLSMdZ2bf( zudnYZc$|Vr1-|6q=4~Q%@${BKK+`2a^V-qb$;`q6qAe?l!4QGvDPm6jctiGAs{4eP zFT#YpvJb7oKm+Gg1gwvg{CDpn3A*V;g*5OfDWhI4mjRyu+^R>Kqe!@AL-%=cJEjvb zcy63yd}ePN)voJ@t{|Na(slQi6wu?zZR%iGkqChE5%f7s3Tums4_I8sFa7sGLgsn? zqm~g5TokiH-0I89@Qfb4ypf}hRQv)B;3J71*5|9q(&yP6+9=>-ACx7rbB)73N7#)- z?}oS`Q+Ss0GaG+DrD>}M)%>*4WGZjm4@+wFa1)I@=Kl{ur^G3wA40{sMDR1gmyIa_ z3j~CA*Q$wLRD_cB#(mO$Z>T<=o|z4)?Q_euoxc^7l)`|g{mpZ;MXWsf>9i9`B_r|5 z)XO1}3yqYZ(rSyO9_*CC6KZ<-P|lM2=4S9rBi9AHRq+?3gaibjn*t&w1bjrpPn%0G zgCnS(wC4d^Y*D1)KC~JT{i;!Iw~gF!2dZc(27z4+YnD|yF6OctxR`#)`2hr&H(b_F zR8>DuO&LPM3HWz6b#!&T_}K`{@9j8$XpL*_2GZat=j*Va2)!(g6kvFgNNzfoBNrAQ zU}7>022~JFapz7$g5i31RgR&?h6dA0>NMjA}?Wv`O$5a#) zAHmhQ6lCKtAHl6%JpK_(V1D&o!Lkj?Wh^0Qj#E>lr^7d;E2U6~nTI_x!ah&7odj4^ zCa;e^T@4B4F2n$akg@tYXRW4}`#wxzn)R=HsidY!7v~`3mJa*Iii9^WkQ3 zO*a5p&G+}&F_%af_9i(D8jMr43l4%hbF zk(lKufvLErbfCt#a_?S_785fwrp9QEHZO9<5Ec$a@@nC1tx`UqTto>J5*Ef1w}Urv zO0gn+P*Hs+W?A9Ni^&ii4D;ZO5MI%;MT+Ql_PX*#+B?upI{EmJnQNqr%8=eJn20{g z3OM_Q68L=38L(QuO1fH*(C;)xXtTf^#U|*NI|{_8Hc~A2pw9~I@ME=aSp5tcD|{a; z2uzWWgoRURn3PHhvNuQ|L9gI}2avGhL@FKRge(6I9o8`trOw2DZJjGGpsct8)pKoi zHG9cJ`vm3eY6EdQ{JoYe^)rF+Wgm9yfx;z|3(+GQWDK_lg3Hn?H`cK9;M(7-9)}=; z>A<*Dr>NtRW$-eGo#``|&->4IkoH0`JJsv()xU6Yu3iWGYInh!S>zc90!|HRR=;6c4A^xGlC#KmNSD9MxBlR@{?~nK|T3$K`6uw%&u9(eRLdF0)T5O?3Y5 z>LjtyG35H-_t4)T=uv^$+F2ZV?(?flN@D!7HpbE*>v#9pqj^j8+xs1ae0+S!4TtMb z=rBN(QlN%11Di?2?OyK2ii(7wn444K9E#e*nx+}W1!$#JcC)NErl$R)ccB|;`g3`H znoKYZ=j4e)Z6_nZzpRlPZgt-ydEP4|084agZ04bmN8$A39RE-g6 zTb*9!MrOb?>!t_3D*9^+-^VpEKH`(!x!)Xs39ph*6PK_Awl5t@KAn<8g(g4;K+gvP=I8q}s{XnvM_Fk$}oXPn_}4s7Yi#;Jn^-JWyp z{LeOQ-r?s-VAo$cy{&h(gKX)9(3|?SP#=6UHa4(1n=vKuz$x_{IEBv7g=X_v{FE2~ zy#(q@RX!Xko8_-xzrsGtxCB=PljcL!ChZqe$+uw5imc7fGx9lEDpoAVgyf75ZB+;E z+qq(;szb`2!hSNQDUrsrW{2O>+jPNCrFDqXjOxT!gLD0cHL-+$sOkw(#DMPYr*(+c zU?q@q5}#TdK!(A@^SXa@im0qL@n&fqr$*uh%98tyc=+scKd zrCm27)X%ma!)Bnv;?->HKTZ;J+v^ni+BA6+dAOS7h3zWIMd}wwpF~Kqc|QL^a^d-X zZ2NY3C^vj^+apd&9v+qIERdC`wC^4sO_wYQ&l}|(yMVwUfJ(jKL&7+tOw?oJ>|7$x zu;fY}%~;3$UY~QFhUKM7-Uu5}B#OO-#HF*NV_W7Ftr9Q;*WuYV1M0QBvI2LqOwk=p zP0(2tmzVEB!~VzSq7`gP!J-_d`U^@C>n0o=91GQ_ujM6~JuXi6ksi`ehXR@n@k2-c zQKk0@5*!A=8T+Pn&EHv``9p|tNvL*rX`Tz%E>>{U5~bbSwtEKXwdSfdK^iR8>zuTS z9yew#D}zx+Qobx&?||uLE}B68-D3UD?ryN@Y#xM|_?VbRF!F${N@tQLR&qjevQowE z6bEbI?B>LlLE&Pj$x6*&_b;StMJ$U`0}Yq(o6qNu)w6Ah!7W#ykDxEDHU$Rd zpcAwg?Do|O1YGq#1`ChrNwfadjg7$LV)K~#{>q`-oSC0;e&yAPTo7?H$P8Ij8;_`g zBOiTkNM0iRDSYz6LPB69dBW$4HF#N>_4|Ecp~K*XESBec-zxTs zfslW5(xD{r#SEH`Z%et$u@Cg6nW|%*yo# zn+kkN$$iryM(O2qR3zE>+{RUGEG+1+hz}yDLi$?d!NcD@4_6m@cUX`1k{jjgh(-3C z#0Hq;fejFtsKRbfW{3F`nP5UM^19Ats5YLTnE?K>JP+r z6Ua(x0?V?|(Q2d}DddoLn7e{eoF)ycx`xJJu?-S<1+w>>W+)}#c#E#&r$i|~N_hA5 zzm6tOnS=o`!0_&cCH#Tnt^H=VvDMH~yfg;NyFj>%l>=+N=(KAVrLQW3}J4Gu(L>OlO>!b%#OcOOxacc0|`VnFppVah`D%1$}>dJ zR8%)Km`Fq^FAMQy!i-#42Yh@e)nG&e93N1IKo1Hwx$JZ&5V#JKCjp8WzybGx0t90| zK!*~yqDb2asl$oladlv&FZUTN6}<1CdaJ7{rrkD}gy^<{ z;@dD^4F#LXXethS8@?&hx@WY0d#$_!?l96VJOMm4dPCiUk7I=*Dl&37*ZarJG2qVO!-3NS*KkB!fvvQz0ZpK$)NjH0mcj|>Z2+1^ zAy&N{L@tQ$GJJfC>=WR9H^AURylfP45&mc4JTv6)P7{EcbXtIi=UDE-=WG(kIm_I^fEo<>qdkK{g zNAAm}*T>_sDMeD%KN?A5-Wv!fdGY%6cW8@@hA%vxibry#g@q@30OFml5)veI=9x@C z{&VYmyAm*0K(gM*fHByiHRc~^Gl5eEQc=5a6fx+}V@HX90trIDxbya=6Jr;-*iC52 zfZ_2SVuxcRB8=)>>0K;lCA|FnKIP}5-GRvU@G*OiDL^xqr1zEl6mjEV&5=+G!4Rpu znP`(i5*v^eLcc$B{QDBfiFHeE8*#C*R(;6D4lJy-?x^H{38Q(u382lzL~YX}fEu$k zkb7q&0N%D#IHyGGPc#db{(;}eijd@J*oYzJ3%2_aN?#S2BR`Kv{F9on-lH3SK<%Rp z1G4f2GbAX7R%Cp5DZ|NO5M{xTpuF8rAaNIsq=*%FQ8k}GNFoUc<1q0J5@x*@SHMZ3 zY0;0Hsi6(usRG|7UFw5(0F9aeyF@#3J5re*?M zY>u7*0}4(%{nca}2ft-~NKyC&5G+L9zykyr>#6v`lNI3Y$$bWhRumfvf_##tQPxuY zI(&xY_Cd-tMxCZ>?MueWAAa{ifL&2h;iZcW3%76N-=VOs1CWjHhoXf6wUE)?KHA*; zd}ea<92TcrN6{ovog>fag7w9A4EOb}|GT_2!<8;?s-$qhN`XuQN-!Yke3fxE*tJj4 z(XG2mUkBY|dZoIdt|XcuE@KdC8(6j@ zLw129Vy0IH@Day6IU|bVjs9Xtas~8^VoWwi3pg9w&u>*oiSS4T&El=#WBy_boDILb za60G>$hp=*fEd1`vyaaSTzwK?|NQO)aQ1U^gY=6Tf7kllj+YXmeQ1?Hzu)d3b@$XZ-O;1w-o59gy9eS{rAnzhZd_iEwa$M(Zn7Uo(H~TBm z@)#!EesY`a`g-zpT_*CwO{Q;mG=J7ap&PpV3<3@;i>yZV&lq=9FagFm8I~=7sxCEoAS5dt#Q?y&N;tEb17Da>&{c}8LdNdF z@32We?GkCi4;kufxALQp3oy`p56zKNh@BpfBl$pl08)w!r3Z1ReRvDm6GPRy074ya zf^sP&x<_WZt#Lu!0`_4_@dP(bh(V54xYCK;KPFHF6qkf+HUPI^ojy^AE)(JMbYHzJ zPqFuS<}qJhR@D}5qUu`uelny@$gkxu3z0;Hn5I~kR&JApxL@fT$b?|eM%eN|N+Xnl z-$;i_DRRo&P|N?9PgE`dqyD8;I9AC*Q4%Pa|U-B&vk?JTTi^; zx&(# z=NM~WyUA*|^o0<0RgWn_8O%WZIMH76s26U3eM|7xP_{2$c@wy4wR7%$FlvUPUqWSE zB$OiMGNeoHyO+;PW6!uB?DXGTBTkU)`)&1;`S(pML*zT7fntvO{Oa2$*BZQmjyL_W zW$Im5-FGns8$)@B`B~b;!g^vBNFHz_9X~rcqn>IzB{LJ?L?pc&oW|LwJ#PQGID`ug zz8D{a?M!(^JNs3PE7c%Kgyv1rreEC0`KfC#lifR+T^3@8^;mwsog3ZWeLacii_h@@ zT||CjAP~w+mL}b=ZT`*8!!sC@V-L{8%cz{X4uQcBf5D=Y)~7@&8X(z{G;-j)2?JTX zkL3^RWn2lw0gtntUDrhQwMpe&JA#wGMkV5pA7Dz~JIMe3?b}FyP?W89sGE?9Mg26% z5h^n649vUss%Jo`gT^oo@x-2w9@Q_{Lmo_R?Idpj@DF*oxT=0|Xr}-l?T`=Tusek< zXeUu`ou^VW5*Xv4s@I!lLR9+8UadZ=7FP9waM(P_h05ma4P(xa+w`~lzMX$OxJeao z@G>h~F0YV?ta*5;E;S{>MuouBg~9h_^uOE30C5y)A5owcG6E#4(0yF83x^srN`l-* zw%IUOU;v)D@Taav8^-)@m%W7iueP;9Jq}>?WQN5?r`&gR{NRi`qK@P$+OEMuApKn- zka+)m@%C#Sf}9N4%>h3c*u%(}WC%XFgwPyzXL*4tiQ%6O)M`mwZgUP#B0tOD(7WM_12Tem?Tq5|H+(I?t$<$)R#{Zi9u!6?=+##*az^JiNM zayRAf{`Y3D&X&K)>9jyxGe7wIAke0Q!4#uNPciy1;fGuqEXXXs0$z8!V3;MjZ^Kjo zQ3a$SxCcUHuj(R}S6l=Fl*%S6=Ol04x~HSFtZ2bp6w>rk6fnKl@$pZy;E;kpEQE}I zxEnK+E=EX62_zufC)s=8$yfgF-Dmv@P@g$_l zAZhSHyE8yK!da1kMZSaTa>Sn

jhl7U_Y~6V!&=2uVq&Cy@ZK)YJ%HyzwDbPWl41ith!~-~pJQhzKC={^3{H(8vNV zhzqL{26AKR;j|D*WK7+G>v}(V1CgtjQ@7@kq)X%$lsKwL5mngtNFTPge5Oxnr&i|} z=FJglDWKg5NO4>GnX;?*d8CMZ`Uzy)ZxAz4u!mc!*e7(nv-)?z#Emm$_V;gz{hj&S zPw;^?@*>5%=?JrJmbg3;?KPp2q)rjM7K z`w^|El}3p#{L!#xKluPFnCwc}}^ z{F#x!{)xVw;gqIh!N#3vBw9o+7!NW?91R5t66mEbZgZ`t{>U1gW9-6IFD zKfY~hiY%YbwCIV}o4NN4uRw4Z9T&vY3x9kvT$lYGo7z_uuQrE?R~T}^Xn%O@>h0-> z4$?h{*E;ZfWYV7~yTg|a8KQfSss8m?w42|);SaqY1EFh5JBXSDq65jPsXJFQNvtuI zoXksLy*eiHMWJ5ovtxBA$K0n;4z1$xs`3{-sE-j#YJzK%c`F-Bn0)L~YV%SGUw^Ui1YlErM1*0&( z^JdDmBzj14!19@)s$WDXLY`pe`XThWR<5T1VLN!ak9Q>;D(I$*QY}&BK}~4)hr#I1 ztj9Kr1BO3-Q(eW&eFIo>^-xzUTPfkT4(l#ZEnh831~$^2*snL z+^$zCjA7A0xnBijBq#~4mN3$kkEa2J6U+fd?_N?>uY;ZAc3c(_Vf$cN>N1_ChDK~m z%yjQG9XmUw(vq5@BJ9CZb+R4$VkH(il#Slj^#cZ1KAQI9U{UWuX<3rUPf5e%_7TtR2z!2i?WAD-dVh%AcoCLw<`A3OVJMd}h&?3e6= zt~$7s!X6F=>{v}r=V0^Z z6!)&Ith)>9A6z3Z&57ofq*gAnu4Hm9+_~~sL z4;00w)?4||R_TR>NhInxih*}BL;dND@Q z)54&(hO7nbh5JS1hNe3URW0=Nd?g7Yh7PcM2bm7D9ZOY-;xLxw>`SfLkr5dbo*f;X zN3T@ZJ`q_Oo(C~F@u#v0F>yMy(l@)BJ~A?zhU?U{sIa~AVw4t~VRQ{~3IglJ_WDx= zykrnmKrA*saku$gcpc-*Gtk^O`$W6uzI^ zv@mPWQ(jHZd#UbZ?7(+u+MAH^0i%E_?Ge{|^yZGQ|8)aW@eA=j2ZX_VnJ_u9IFR9> zN67Op9Ge9_lvK;tIpgW*YbOzzW+CS4ISodWy;R!9={X^7eMR<*495rZ<#l+u(G|Qi zbnl%sEd1Vqc($j!Q!jDpF_CG^qAFz2ck6p#-xCD zw;KyLgN$UQZyf^?WEs>yHkJtgM~+vy#{v8UvJ31lG@-4altW9>K}d2)og9JJry?^4q?Ou(jBtj zgG^N;nar1<-psB8$y6-OEecP&_x!LML934SINeJxzT z)%^7lF@j*npL?QAhz9r@bGn*V>3%)n|6pYXdiS}~!$!7rg@VzMJQhz}hCsXi#fhL8 zxvRv|gzfIH%d7om_J~w*Kg6Dx@HLh+CkBiyjjn_J18YW$u?W)Zg;S z$QQ4tuLW|!o`oBpSkbf}IQLYp3dY|xkcf+pzGhFXYXhEj>uYN{YBr2g@1(~~U{31% zGByVAv=iz3JWb0}mNVIdikpvvj+S?JT$l)gi9bTitY2nEU0u5gTLbuO_a;mp=JXqB zc@gu;6_1k;6K9A&ip=y~jD=$%^m?Fm-}l$9k!w3GSo(kbm?jzPb`QoBWWpT$2M=;1 z+JwMnF!R>z^fVG5h7NM|C6Q}6#QSRAKJ6H3@PiCp?+<%)pI_y62m3`!! zeDf^i9l0IvY5?pR3#!dQGkK>*Z`)Vh-120I$=p#dWf8Vu{u83xj=TqRTITm`W zdBDr^Bjr;xpP=<0;GbxcyvII812l>Q<6}({Ruw1O{Bm&+QMq!wa&t9_!86Z2!O~O@PKOTm)(klrS&ITp z>UYGjdA_g2Nd*Ay?Trrm|7f}nM=am3pX`x69(!ib5VEpob`i45mR~P-E@%%Ov}nmO=oISHIO2=@g)Go!^p3)Bn22U@fdTkuqsOf0B&+ zB!wxklRBqAW6CZpb;a%n^m4cVa~dxU;2$vi7jrM(+Mz>|A@p|dMpX90(Z~{=iXFB$ z7Oo|L)?R(f1Pu=36J?vOj|gHH}UT+)0BY&0GMGqUF^~tRTtJv zSu<0#b-U6S_2#v65^7q3*x@?Sn`rnJ6eUJi_${#ZaazLOFwF9Erh??X$u(lkMhIm~ z&PGNSaeF~2ED@GuL+?$8s zL1GJ)nS*RhmZ}FYZE$6MF%EW2LNWe6v9f{K%Hr5cdUq(o%6bJ+)LvhudsLvD__IfA zo&UMFehV_F>JqwxqOZ^jg~lcc>$Nyg$-F>SWxh*B^*zyE`j=6&F|W;_P?MQKRP2wW zCa|`;!h}vg(JeF(*LCZTQ7wH~`jl@_;iHJ+4O!~{f8X;$|6;$I7zka=`v$(zu1K7E z7g(KBRpm~J%gs_id4=!?Y+%z7szQSz7cn2lGTn;UdO92lX-ANr+-bpLt)j=oNhL@3 zOVXEd;zes$busz|$GD5AcVZZgPzqSyT*t&*!PpCtEUr}OATNYJ1g0*O!^IHJ@*oeA z!GHby*#cL4`5<7lG*8JNi3nR8Rin=Xa5GA<)QH3@4rffEmgN{U_H)mP0EU#Ga+q(d ztgA~2$rHWv3RX}dAV>= zA6Dvj1ZTQk@YUy@XSPc|b>~mD{yEvKTGQReRus$4CD_UV8%wLoBGeC zJ_=Gl@z|0U7A|@4I*Ii?EBX3|RyTf!g2xb&TJKKx(OomQpM^ao8_`o0cz*=P)wz@e zeDpNwA=ChDLC}r05S1FAu8vME6dOV6&E?cd2 zUD>_~UrAy>bOe$VKU~7w`y{qc!rRh5^JE2~jPPwf>~3__UzJm?Jki zC*_vpPQE37(UU{Hp{H6{oj)xucz%ebni`&6^Rd8RN>3>~BD8pePO_i|pLD@1`Tu?Q z!D2F4=?l-I15#;`SgOEdAu7LzEw(1JUk3P2+KXJVPdfD#@~{Wd1o=lS`4z`BG!`uxK*;2tY1k zvE;J^G^5X-JP9>U2EfG57#3t}ndQV%?v4Ixp1BBKb!$?8uNbjl8KoompG*CneGEYO znu8Bi^-2TTVMF`e2T%Y=)SCbt9rO_wfK)X)ExyeyX=*a?%N%be{7V`ydq=slp@EEp z*-u>BGTJ3n)qO})6rUF)5lE>I40;ff{ueIWVC^zA4 zG~m9#IqboIfJed$0>mfQ)*>Pzn7>GowTU2+e@3k9*!s`vmN1eyEXyhd|6HcJ)F2Hh zFSDMDY%t%?dqGgQMf7@5yEvQfs$b7yx#ToEuQS*x3sz zC&<+d4Mn5*23eXC66%*L);>Nyz>U1W#C`5e`lRO3vBm(-54Z;1pt|B5xp`A-e}SIN zSwL!&GBP6ToZuJgcJ48deADrw^7ZSY?l1|6pac0?V`HONj=~cBZfsVYoQbBz?H)!> zYPzIt3?t_6-y9Ihbbn&FL8jzVCd8-Zh;ly@`$+9Nak;9V&^p+K&y5l`u6=FM!we?m zCHP-4?EZ_mM)$FmSUm+OtBJt9L3>m7PBqu+u^hho-P_=5!xUa2WWpZORFQ$`h!<>b9 z09h~lVgEDeO{CP;;-i!JTH!~d#&2|p@;wJ82d7WARUkhT4-!n20;*1%jCfijy z70wP2P<7iPBOh8Q9igkDPw^$K3XJi9^~@iW#Yf+M?p7o`zs?4q(B#uW)VKJiPy$pF z@|3A@k+!PeW$$k64ANVX|C+c6`{ ziOfU;#9<9noZ0UTY5f9e9ncR9=x1DOFu|g*5%b>2J8rh+GS|3GywmZ431O$gDe)7i>)l2(;s|iH`J2OnPxB3ZgsWgeq0L zq?x4&zGc@-IJ#ml&NQ)1XI+Fv4)<;tBjJT=fcns_!mH^#AV^=`a`A8&S&f7=)D$Yj zSXfxV;js=o|0(!#bA5gVZSroX)yKa`|*-n^`jx1W`iE{EKWpFj7F?E!Kj zgWx@T*0yzENCASA!6L7>8q(LUTf>U&k{rw8xYtqD3>l1_HViJYs6 z+kU?L$@F48PDkCOx6wi%Y_*TDtEw#&H$yO=PM{0hYX6AeAAOx?vcX@VrB{)`H5iwm z*50@LjqBAFeOWYRcV3H@M!yFcP=LazH$lj92Y+rxMquX2EZnScaY&W^gYMH_<8?5X zcK-k}CH{AJu`+}w zMud2e!r^K{Er`T!h)}s{)LXz}gVZWL0&6C)W39y?S|lSOsWa=io}3ML{L@PiC~kNy z&>)AduVB?(i^l2-@07;~*hE+W>tok2e%fFEH;J%Lhci`YHsb z;MM0%U;PBpBB61|t^jC%X@bXTROtny{BV{qOEB)A8s|GQ@)~Mt_6`mZdrj_JBH(}j z!Gk+w-7fEeQ-Y>f2L}hde{5AxP>d?){<;I+3fY^_oz*+Ytm>K@8dAmIW1&u9c)tqG zW<1u#dg=06)JoPg6u%KT;S>?qOaiSm=QOidI|b2Qz5n5ZB;_u8djEoKx1N#OBER5B zlty`|-V+>=*spZ*;{rXDVhdkTwt3|d6u(&0ezhn{- z@t7#RryRW^x*DB$Q^Zj4dAp-Bc^UHIq5NU7ltmWIMNBjLdZ4&b6NEh)3gB;DVx@sX znUVIn;*JC1UIj|L@TK%CgR}Zwc-<`aC2DDBBt7zwP(l>mRg4BX!1m6|op2dwNBZrJ z$`Q;xe*i>uSjFPEZ;nD#=H;*Xbhq#fnE7Yuz1EWGFLon3bAhS_ChdhX3y_}`z7n9D zTZ!R=u&R(XlAPpZ*Mkj6hk~P>Dt#$x5Q7@~cCJYk+rMyhOV;GO^9Q4vJlC=K-kH)f z_B~DF`iv2>3>q7E<_sk8jL~-uoJ+PgHtqegj{Oj^8m~0g25SCo-#Cb-<>cfHjT2S) z%`KZ~d1v%5+sznV5T^IvR>e?ck9A}bn*YVRCUYEo;KDFoEWbhMAcNCS@W;&O&hj{j z*{H0DG|bb3b%C0K6z^MiPkRpdQ!@I{hyQ6Ii-!bOn$={q!X!n*)QPfZ;iodHX;U;f9- z5n%ZRfA1W)cz^i*@Ngxc=c%qmTDpsO!L7Qz(43MC;dRKAu$~_Nj}Q_T0P>ceS?7s+ zB9aHAa>%QhYcUUG5J&-!(!CFLM^{1|H`3?rZybv4WupDmvuC3&s+QjMZG8H$Y@pR92Q8)pw72LLuyE zfOo5O^Ax7L`CTKhU4;A%)*$5VBl_>8&$!E&oH*QhH=a*u8tehc$hefpNNR#f@q?)6 zt{ME`Dk|7R*zVVXQR+*eCulXeRs=v92*1D>gjCh|`S}5Vs!>BS%D+#;x}-Hv?v z(&osx$+^Qu2y&}Hdg+!&-U@cTiF&j;qP;avKE9Ft3ZgqSR9gK-Vx#`UdNy_qcSIGg zB)}xvW<%t1@(M$OCcb+LuDG3(<{&Kw8QEVozK?4IHOOOlS^`JnI*a3 zhc1>Yy8q`Nd>I#V>$VvPBGRCyJ%oJZhZeaMfWT12l|px4TU*}m{oSXzAgJQwBOuS4 zEp#=n)iW~s`R@XJxan{-gxCW$maFt_Hw;j&r4PR0uW>I<1+I|eATZo2v-IjfQzcSU z4|duvx??CZK7u8*qPp7oa}g3x?j#y217$G;CPMz^Hj{pI9zeg4rv>`YFxkB#s8$4B zS}6lH$g5BtT;Cdp*DwnT)`5l2;^ZyV#d~csYj;A2tcu|Z9vg^AG)9EMyXy;*$LXZ6 zfwguvHg_L_QNxyfTA`U0C_1$z!p&& zWaQAR=bm8Q%BVlq6Zkf`Rjwwdx{Cnx~sJIy!V zU>^IsGd~toSIaFSC;5Eaz{^WaRq^#yu7p>z(>i~TMGeG53A~f(2+mG#<3Ax!wg?MD z37IB?D`RQnO9w&G|K6dy@(mJ8$P*AC5OCM6!}gye7)bHo1mwIm$zf0ph#=9X76unG zqy;WNG0)wlyo-Y};F{7+yg9y1<2*))K)E&tLCjj|9& zWze>}h!pmfVrjr02=CumW8xC%7iu2&J>Q-!(Bu3xIA~~OG#4Z08#ERw746NrcT{iV zvEQ(im7U$v($bc3WA98sD_9se|HlYaS#(BS4Zch`2<<}eW??R_pN;d5M%88=FMa+4 zRr8>~akd8Bwa@7zz2LS1ZR4l@ei%&i(i;}0rovD`CLkvb#tQSUP*oRbuWd5$?F$10 zKD45?mp|wl&-Hb0&w+-1AYz5=YI?+OP(Z|+@)@xg3Y_MUBbL(UrmanM>x0uG)Yi9R z`LIUMU4TjtbQQL9MuzoieHGOhJTbXH`@jEje#n0PYcNFz6Dbb5AEV6e{#x#n2!=Oq zG4^;G4mK!P=TSSvmi44iA`0Q+MT)tW{Y8)%(O&&S{eZam_|A*HCkmw?!UgLmND^4U z=m3V1+Yq2OFJ_LNReM)X4i!I1wd6P+72vKWaCw~AdwR|~{^;nCna_JJE?Sy!&c?>} z!*XQR!kkCckEhF`<^xC$`92_DM5R(B#fr) zBhH&ASLm9OK#YnXC}$R6$%UU5w4rZh&+Jbc8XKX96kZX=AI01u=ch;eoB>2~!12D< zt>@O1#gE1mqW`Uka?oo!)O%~(t^vS9I2!uJlp0ab&0tkQ>O%GluYRM~)ynJFVPgY3 zbO4CXVKWuL&>y0+xqSw116W{IZ#w?_Hxi&>3flCr#}EjI({-)F<>@W;L?FzE`}+fl ze$BQ+H-?Xgl~HA8>k~^$2$uu%5{LjSKp+6uS+S_ow+|2wCk9M#8ks*hbIRbq(A&Gh zc464+`wuod2tjOJEr&S|uCSXdEK7A@5I$ua3KpvQ4(6D6@fYdo%)$=;CFekWZb@nB z3aK)sxGs(|{ppAo4>J8DECmfP%=-@?Hrq{c(s&~8KJdqHGYrTJLMPhsC;H(SNJ-07 z50AI}eAi^i7Z)P6?UVMJ;6AlB;;@W6QO45trRMP+45oT(N#p@#S^ z$IDq*h7NyR5UfC=6l$goo&r;xF@MLJW?Pp|%jIfZao7u(L1V$op7Wc>OjUwE94n?xZrk=XiZgTo(*>X6SZ@C{Zk*_zpl{4# zVwsIIlarpFVjD?Pkjy~i3S>?15Hg=2Jw1KDvXdVtO!lQ6^9e67_ZKV+=>nu;&`$+7 z6s-e`q-PO@rPS%Rpt^@Zx7qQ0vs>BM;&gTpiOtKZ*6ozdR;n7nNbi{eAK>VSz~bBJDQ>GUmG77LSJ-vdN!15{eJ(^%(|Zw%DNWjB$$ zFQE+1e$SD8s3oGN!&ZXbb3-U`38OZA@ZnhW+xb!29mVWuy})WqqrhuKTs76`4=l_> z(XkR~QF;aPsa6|kDcUBpvN|yOdRop}iv*jCRBO5Cy_@y#lnR!T+TRT^N}??)uiQ7+nxF0<)5!)es!MY?c4k22x;71Jb^^x%v2k zR^lGY;tCsz_!8IlU42;}3lUde3^=RzrDa3&kGk$7-3svCUrv@u9j4@+b=wHN|LW-f zyN4f+Nuv9Ok=Y_nFfJng)l3s1P)HA1>0c_Qn)jlTU<}cW3fl@%RVXdW(u;pzijZ}; zO14P4AhWho-&+DAxdSP86F$H8HTf9|F7w-x|sAde^7 zy0DjlGXPL<88t+Blh=OfSI0g*nF_te`g)cQTJu+e-#1iXT#34ew~;Wcv>opxLXV^jEdH`| z9;38bffpKOEp%mIL5QKHm zLH4439&#!pAJHouA>R3z|0hz5!c1xt>q~5d6yO|&PT78h z>u3#t$V6rr*5)66THyY=*2HS|&5c8rtZ8vqHXDYo?h68@u`F0)K~n+?Mj;s!Y9HfQ zCB59wFzdk;+6L*ZkUM&jz@?~1n9%upV)MENsWY@haxLl14G2l_Gn#lVhb=-h5aZ2B zNQnWxLERkppCcUz{Qwm!@BtkW93He_my$>C;yF!kZ*RY5N3=y|mkxYmsxD}u!dUL# zJidtr+PUH&Y}F(YW$#{m(f-K?h5WIz5JOSEvnRp)C0?Di&Vbwan2G)YyE=~@R)mOo zGFj|zpnB7aOT(4Xp3fD;@8vA89Cosp0xh_ z5~4cF?(e#zRVDCy$fKZv-?>aHcWns4N>v55U=97RpN1M8Goi31pXV2o7FC5R)IU ze*xz|O)))iFZg^6vaPz!>iNKLSbA6ujnoBNX008Zb?$)8!g|VbhpmQ$J*B%izFS@X z`#E7Ovw1P-Faf&}h%+S;%Q)`Y*hz<0%Xtg@s~KLDXndBMmey~7ScF+G3|JiH%SR1% z_W|>S$K>yS0UsjdyRbLCS}IeIYE-tL-gJj+5#~~K|6tnPD#OaR6%|3+GN%;euxXb-*8k>wD#y9$MCp^g8AT##yZpakp%C0z~xZ@ z+iP^)#A*I9PxJHI{!hiM8}}C+k09!1OdSYdH<-#m(X4;LXL8 z>386@DhSwhflFoRrPw~C(0BvZ16e(0Dy*XdmypK-`S|?$>=(@Km}fC@2O8Q~79=X4 z2Ldzbj(J{7sJqL2^j?W#v)Jn_efKUs{BgWkictQgj7O*xJXR33r+?~^BxbhKxo5#T zdb^CT2Ry0fZPNg2M+n$lCazxnG|?*}facUJ+WBy6&F!-yGX)4y*YycTg> z5QUEo@&@R-!8-|hSD4`8xvts{U(D~JNP`R=X{L1jj`Oq+1v(T!zr}k((boBpT_2$` zfFcftS$#ddB~*=QTIZKwOn!G_0AdeNOvfW#u2@d5pzp9dio{qF!AcGZ;Shv{f1?qw zjN)Rnr~9J?ao)JRy}qO0i+rDF`7XBV5})yRHjP{eNZJU8Gnhws4TlHG^*aqj-N?kQnR6JCI&~l= zh)gU0)3Kb9jF2#PeO?-7Of#2BgpDxRdG3RwI)t{atiAWI=Y`yH>}MLcD9_&X3_^EN zfk6?%ccP3}(22_w^Yz<+XDPk?tc8e!{oxNEfD}Nf@m~YZk9j6*&jZ4A;r0zakbotq zvs0GQw{Dk<#=Iw*tV4XMc+KRVq2L9)E&5spXCu^%fZ`z^NHlDnS?Z;EXKQRWbpiV# z0s91byD$u&8!etZFflO!Nwh{8*M1O2x?y)zl*rBomWn%*}d~z zQz4guxLGcBw6A65FQ-Ns*wH7!VdJiZY=J2768bS+aWY@eG^##8mcC}*!vA;RE}Nr z#?Z+uz;bdyNY;j`p;RM`+)rtNBnM)JL!0qpWhrGm3*@;TYyCuTsqsi~!4(6S13e(B zBfjf`05~F1edHi%*6il)UJvvJTnA;Ed5S)e4UMz}W@BswLvH8|8cd93FslK`?czJD z%=ckemW4}bY{&PPTi$7Q+rR7&A3it*oX$gd*bjgJ-9P<6S5JPp>m$Cmy636v*L#TD zkt4v~tykMo_iJP0t_yTIW)Fu8Zn?j|CTZA2cbPbGVJ;~uE9<&@Frf*pK^&JfQ`hbp z6lhfszFf)Im-%tmsacC&i)%E&g|DOAaYNp+D4k}Rq>@eYU|p0mLYCz3$h+7Tg_Z}P z^nAYvd#b@k=SI`Ygy~hXQFnq_C8gXc00_uUuizF;1HW2N9f_X{Qw_s31BlFCdi^?} zg7ED@nlq#f9NQ1WO5E#sT*+|fG-5IX%n9&h(zzcJ_g2jXK-$w=ZhBEx^tpVlflr^h za*uDjRw6%CC*U|irayBdJn9Yv4Ui_vl;{j+2&{ru^mN$CpF{)~g?4Of>NToFfv0oz?p`poEOwpqUPI)NuN>9hC54b2aU8fetsu`sU7DDCQGDOrlwH zC_dItY^po>df|xe&`)p8LXUe z(na)Jg~2P~xWdtHZ?DB9*w7A3Th;Wf$}mDnJ)&ead;OW>M`;;>UN$Det2N~e_7-fq zZ{FVCfOxWf|H?fIC*aHs1)+6_tQcnBBH}j#+`u63H2+LojT*0M0Ri~o&t#}Snm8SY zpiMx@E2vZsp#rnVEMwy@fDkIY=@19!YJTw};Nl155-u-_nhpS%2!1kWusH|rRMP-< zZ)#$q;poDdI=JkNw(%KoyS#rx)*5iSdLM3m`}S>XYYTWMo+VKzgO{GM5mKqkqV~Y? zA@EqE&!;r%e)Fwx7k$R|^%T|89oi+Kojf9xajC9jkl3JNBm8dbYaOoi*N> zSdcC!mqSF=(qpmbk@qBHwecNRta@z9vl z)*NZ&zM!R|Vrr(0z_GqR+vHb! zz8tj?U6@LLGw{nLY?70W6(J6ID{MBNgp&P&GzO&PqrD z>7cd*Lss$SHB}c*Qk*bRC;E^J_d@9~7AeN;E3w6jJd`_yXy_TSIHS&ft&d1 zrj-xWa=njZ<`RajQVw)n!lRPVWh>sB(J6B!U*kQ7tZ2WThMDWWb7pI#q@DxBa&Lfa3%J5OARe~^tj)mNBA>-p*x#LP$ICiis)+kRAGSsaUDvvwpVO_AZUJB_F8*&1K_#D#dz;mA#(P>o&Mrt=BGuD{- z9o8hZ_n%Fx$*12wIt2}vlg;Og_iWw@4%m6sVV(A9xFmY48(dma7pnB}332>|vhSTs zsmcX6q_z9m2{{E2nKYkl?x-_1DfLfAV(38z&SK!YKa}l~ z`7!c(ktHaRp7<+6E>(nCF1JRRpkn3;|H9+YKZ}5$JN9sucDuJvYQVefa@^%f`_ul4 z9EuWo@zXX7bMyCakCv~HHemvkje0k{*1#Y_M6mjAknbZY7oEbQ6&%0wlV>zraNCKp zzC8o;vKJtl&hKy0i;81x!)O85qQ=GtiE|a=Uxvyq8oeLN)1p_K_4M@e)qz!US?f>Q z8*GE#PEeDL;PyZ&Ur&W=#%_K%;o)6db;_me&s!dO4u^k^KK#ysn!@=$ z^V)ew66%K#fz>~r5*?dD@(>6gRk(PU=KmwBSpv(gC&_lbk((#X+TwmE^;33|&P&(+ z$!JDXnEH-gn$n;|fEHEUZG8ydCV_iikQFcRl_F$a_?yn&vG`A>zxGW(vG$r{D za7iv5Kw#~SB=+*7HNS)2r!^z5E!SqVHAn%$MBzFzZ?N!jHn2w7rjKg6+i@3c-VC#V zFttG!cDh#X%Q!m;Wk1CuUQ(*pBNo@bCn&*GMT3tSyQAExiHkq!nSV^yOF<)JkQ9gd z$~Rxw#obD=FkdP{FR!^Rx@&>@Q8b}FI65A`?NobGYWiwpO1tE-x9=qnLU+`6)XswF z4Kul!D}rbKf4H0&*xoFjGZ%(UEgvECSD)s3n^!dDOLeW~W*HMlu};B>2r)GvAGAG5 znBVye!W3tI@%6NkAY6<<$ObX2RQXU%dyn`Ci&|KeIdfX6-&DKvB?m4EQg@f4DV3R; zdI)*aE`(87xN%d~9J2V6<;#eQu_mqgy={L;6z4Up-vE)_-HEP=Gvve%%Hk^1HYtYd z!o5Y^;m2kf?0@xjlE%C7?p31q;rp(?Yt#;9y)AGfAzX=kX)<^^h-U@h6jSV??+3II zEmxm_N-R3Nm1ZGew~FlF0lf^9WxP=F4XiU+ga3&=e?QQ=vahs3hXT|G)c8d{So`^N zrfM~C+cIsiT|+Td?$JHkdBik6C4o)yhF7R?GE5%|M75jd^mTI*!~2Dr20!I0^mL?j z7=!2{NU;{VYEQTov|e+NYTjK8#ze+eYs--^X^H22-jnqW#Z$P4BaB|aN^dt^fY>|G z560xZudiq8aNsFHQ{*ebb=Tk)``r-cbOY{o2bNBBqY3z8FddNEtxA_9t%v5F6FS@7nCOyyQ&b{0`8=%eRwtfdAJWZ=4*mh`7VoKgj<+RG7rZ4^VGx4#R>u zMTG@V2CT(vIs-ksBM_`#;sze5GNdQuB zz6>U{!;$4V)^f_if_x2N?{4ZBhd3KOwipIPZR-^bTyIVKrQ%*i#&b=XWEb?9$98?h zHTT*@x%|^kk=IPmDp3=Yy)69+$E4;xqc1x9cI#=>)2aS?Bd-w|J zM*8s#T2TLTywVCGG)9m=bzCOEAfNg~{8?#0 zx$VZU6~T0@zs|Cj3>26HWKibhemddwyXN`E|K98j4&Fan*w0)1YW0=zqgK5%RK|AO z_3*;)u&%%>+y-)hiSco(p^QC9dVl;lP|3~5=k(S6*P#J>DUezhK9dFD9}u{a1ga%} zAn6NbvGbM6J&GApl;KcW5%qxHm+GYy4nCK5n%cts#{?P`c0yDk!W*`-LE>gXvG0^q zrhZh>3aoPGo;5rsVF%Rz(c6{ka{?$&*Ujz{0D`ZkIhwZeAKw^<6@@R3Y^VllwCQ?kqT*>%V5FJT%@}g;))5GRZp2!!Cnf*#u@0|zGmN`Kp zd3}|7@wgY1iLFN;f1}&?0n-a;&RX?L_#h6qrr-qtw~dTaFQ!9x1TckFGiru{jX+vL zS|R4CXb}q}jW?CBkk~M+S(Q(08Z2Q&eT%px*LfMR7h{^QfOe!^qvgpV0y+Ch!&ceV z1WyjV>~5fZf6R{vea6D>3~+$$M&Whg%mLQl3inJtdOvf;B+U1XD)+g_oy>^6$FB2Q zkMlBPGFVX9V-;`fF5LTeVN-S`sdo^T!C-*{@<_b_KMqiKXuOv0l&1lqEj>uSrasKQ!_JcJ*lOfUh z$J&~iAw(W<;N5iOH?Z$LAQ~a12b^8M(r^mmHFI(v85oELT%5tc>HxYs1xSh6iBbWH zC;WjhdBfT#Q92cPqDz3gvT>2~7Xo4v_D0@!X&fuzt0TeR1{tINPoLz}_I}?7O4s5& z4l&zJksm5z!Pr}MZJ0Fg@$t=R!a*bOqA_4l2ERoB9aIiB9PKZjC6*t@+@uGh{z9Mv z-Fho9l73Ysh=n`(=yjr0(yD*)t%EPjuE)cc#DN+Nh83)=;*A&{HXtC3v0$h@7CcYx z#^Wg+{vVcX4p#G?f5U%Cfx6Od4C~*3sGo5^MHu)1i6Z5Fz>bNCV|;7@3MfV{E?oKt zm4^3?jA96Y>X7t56ZLNea&fQT>MW-1n8vpqJ|lq2LyV$}3+}cBG1Smhp@hXg3~f~AxozqQ@M^GYTivy zDXgMARG(Ny=OQU2oa&flaf^TW8UuUgl5dpu|JZ`0$bbwdTU%@mb^(s<=i;meI#Jgt zu>qRapwhq{LCICAa^tuySG7le8ijYKIFA5fdQ}vjffL)~ih1oLRyeUA| zNU0bYFPxnT#bJo=-pSOdZ7G*u+uqq}m~&VgP=j!ehU#lxJ8sImZ*nx)q9b2;4_f!c z{Y=xeR6OrcrsZLKI5~jU`_eMFBju*$!~P=n@~I0ol+M!!r%Km}B;KIJt6=`%Z^a{d z#_s4}xZud|7%m~~9Rly1inV*2@Kb$McW;5=$WQ-~Jt@j8L^BA*Z6Q8lD`E#~8aA<8 zGUj%-?%bi$q3Yd!3gMN2`IU^2>J*ihDvo9iEH+nHkDA&87TD^%3@+~h6sx~?a$qjb z9=0-}m%Il!n09iRYtrhN#Qd1!zlmXk98tIoG-wW$v^0P?Ad`L z5IN={c0tVOV{*;q?`QJ*(?qQ04>{Le zRX1++728Ulq?o_AIK@!<|GPIaHf!XH>6zYg0fOtF9^QUshsR0H4Nj(WZ&8>C=_J9C9I<7 zuVrV*FAF#cJ6!7k5BeEc64VP(STrYM zfe_`vxQ@Z?JBdU3sP=hw`Cm?Y0pbjco!uUmo5&yh8fv{E@(1tuHYcDEsX|N~({n3# zI@U!AZ|}v})@JdA#xL1uwaX)v*~q=lP4_?bEROlCiCr?C6z+w&p+h*41E`b~Dq3IQ zW*hv6?f5TPs_)mAE5QzNEK8xKf;Iyy?!)nDK`UE`7ot~c2O1O94yfH5aH20s*3>|! zf!QjAFT$i6D)IQDfO?P5dYBlye1QMQt_^&H(n*NaYIRmzN_DyZ#~40E)zyU4kIwX8 zbyl++-ONaL84b|JZ*oECPbTT)1?sx(#x2=}3^H_gDG=R^m=WAE^6k~a*Y4!k!IUF5 z6zJ`{R`$$23egBPh)V4VO!d<^mR!jSFA;~bt=BuA9D>bJsZu%KqOaR&(8+tYD$^Vh zu3|N5*KquG0w`sHG^L|Jfy04lVURQd;Cn8b2AvyplHNjVbLfW;`?Goq)JU$c|Af=$ zUWRb1fgF)-$h#s&tO0XnkLRK^ET_GT1!NRaF&%R`8rCm0?u899q>`+T`y_9r@lxItajx@UFlO_!Sxbjkn7^AJ6NE6VJ%lhw zD?zHVrq90-dUT+2S4jyo{8hy{`JwdlDx?4X8l>k_EG5D74-{TWGpdA$~%J?IcNUJXIa-y$G)L8zFeUQbEar_A_| zPsKW|%rb2Uv8W26gTb;4yTkEags)(Pw?>*t`ybrdAWs9&C)n88k&TMhN)1F&*$7^2 zOZFydTof-I2^xuCU%$I**Xv5~r3?sh^euz;2coROGfFGvi)foVW#{3UijbW(fv5yi z)5Y=e;Kgw1)*g$bfhSQo=g`jbm?HkAIYMAnI;B{|jUyvic+DY^CQ~3VS~s%KK-#2` zR^1c;>f|RM?_lgzC=|=vnkkYNy}nAkQIW_XRF-`oOh(%>(-zFhQu%B+st6zN!cl?rX7_cg>KKEfi}*ilEi1ILx`gghnm;*=emg*fL}u* zD&W%8R8%Wo-{Cuujh$hlKaS0G*PBjW)mHtwk3N$yz-7lAtxy=$ladT0>QY}&MA$d% zfG&AP`KsWu%<@t43l1~|lblh(e0r?@n_-{A8Pn}>nPDP|Rb+lO4Zc>0LxF08)_}_k zWJD*h0s=Vsq02}EB9hNTR`x(?Z2*`o1-ws1D{=|bJ0uCZ_&Y*iI3zQ<&-(gcVRBM_ z00Bbw{ zpslR89-+(8I0C6to~TP9sFY*#p+4OU)OTN?D%TSr z2V49jUJ9xu&~P$y80kGe(bCoqGA&4i?L)iY(^2(@NMgHvg)!+Nr|PIYBZ%L82l@v@X6P!i6-^{1pC(HBDZ#g1ZdSt zluKFeQsaeVoj-s+BuKquBO7uAI<2mbWaJz&02O4e>VZILzxo@_6MWh`lcS@~fF(lg zGDrDs(b~S%4x(=Xm*>DBsH<%DBNH}x0ANu1_Wl`HYjXKBAr9xdCQHt(an0FgH@0Z1 z1Z0yrd(FW6EuW7jXW-I)H}68TyjP&Cy#sT=m{95OshE%m_xS>a7fGQzBrm7U6Kcshael`+7uBCz_|(_?P>g=2t8<34I~WZJKwybBdGH|o!7ez3kzF}ZtMK`bhNk8SY#d;eRQ3ZE12Ckp#0?y5YrXO$ z4~|U8?&0aHE7#7o=_%*e>jV_X^F(*wkC&4Zr{W>RX&OW&RYe4DDs;Rcxp}O^OU)di z7-|;i)@&@ha2sd%#V$n(zW{$3883ET3ANyjx?j6{@mB;^Zuc|15yx7U>)NOs&F+&| ziY_8tUA2O2!WXKRXJz5QC<4do+AN{qt8p_lUy8ynIA5v_qIB|37k;z?Nr246yO4%m zwL>c7PuhzYG*H)U=RfE|s0d-f=U^^1UV}&V!K8{b?=z^{A;7sBa@!XaAhr*r20cYZ zz`OxEcg0`8x1rMfuLxK69I-&9Y(}+G#D|2 z9v%WIqxq_&fp&Qn??6@Y1>>WFy07D_5fK=z2QQ zD8PxxPgz1kJ0Kvgers0?hS(u1!O}mj%}A;RC~8n~owq@Nz@I+akDY%FKlYhHXrjbKjmsgs<4OQ%z6vp6EE-0%Tv%zbgMwy5GR=7bn zBntPGL{hy_w!G+H``=RZ594u_ME|s|XA}CNSEdl2<(qTep^4x4=8w472+b4LG*xkW z$dZ$S2d~-g*HjrdLu6YoaCJ-Xz=}JY3`)v2)skB1Tj|V$(!H>`8zK!5-U34D-kqcZ zmz(x)G{en_LB$%`w+gA@CtDZ>DqF$Nog{Kddh{(h8f{Fkh8pmDuM7+`SgONavd&f8VKD%ib08yN~(4Y1UO*R z*d!i3d3&9G(vVp&v3JBGO<_=0ZA)?}%k|H~US0zUN>nYO-D6Kx^={#Bn7PK@1r|K? zpEGcEg1B5g42Yt)uV2qso1?yQ_Z9U&^IS`Xjv_uuN!k&((8&U{E2>@KCt6EYA9wR~ zMn1pL#WFDGI=TvGg&0<@kHwj1gd$Woy5No|JqIToVJO(ED=C@L|Gsb(imjNFU-s~X z@Npd$Qbs#0E8L{t^sY$@2mkx9h-%crsc}Qx;AUrPCLY8HZ#`h!yStWqyxmpx- zbaddAw$;$U_YZD6-mY35O?Df%N#lN4+o{CzX#^dbMNI%ddf1%8Qn0&;=HlUkUlGJ> z@qG~4>wl+(C!(RznT=;3)F(Gm)4jwd^UrAN5PlqxDP{Tfel@b`1 zK6VQX$?yD2idr9jdp>#nb&?=IE9@*G|(d&H1;xVmI^*Xu&0PqUgpxHuQ-e1 zVW8slEt1_a2=|8$52v>Czg529xz@flz>$HqX!y^5c%!u3o@t7je$)i8FHn+>+U9eZ zt65ngYtVL6fZk1{#ch?9>q1YdbA!E_)>O0;zLgp|7XRVNd=OuKY)Tb#ln8P%g=dRE zQGaI4tAFgrFU4!xD)DTv7@Ypa%$=Uo9^4N9>-{A{38Ab*!G7cnRlTAV9`EYwwO-vh zdv+&>W?D>pVsU5wof0vJLDAUpPmZ<483-u&@pyeG)APkKzx8LDjtTgjV0MN-DO?Bd zpZx^W0(;ZNGM9rXw4=jJr9z!0;zW0`@&gc_j?eH!^K)Q)uCX>ZFIeh{rQMaAe2Lv) z6`lUxYkytTM`YDs8p<$`-WGUm(+Fice;zu*4BUzP8F>6#dwh1J*HtlkWJ}}~?unb> zYCwHjtaUy3N?d=i{F8#R5o+|YIEkV?Bb~u=gp1IZ_*JLfpq;hwDBUHaFJiF^AK-L= zIgGy~Xqxuc?Zq}^RRHi=(T)RMFPR%ef|6d0eJ`wcp@g88#quyVgYdM0Coly&13+IU zeZE%9e~(2qi$lsfH)WqpXG%&e26#+o{9hMT2!y?|9`mM<3$0s69ujGKyfFog@z z#joBO)&1KV3~(I8cjd0_4`G=O8C6ajgoa&V#6%PVI8kki@o*pXGjmNP6TL>!6Fht03;tIA9~ZnV{L})0uar+q(MyVYF`4R z&_H|LN!O;Etehmf;{CS%?{6_SkcNBzmsj&Y`C3dc(({{OyX(s?rQ z@a*849(O{?^LOYJVB+*21~Ab^_(D}6=aZ>@uj%sny?$o-Uo$j6n#e%_EKA7>A3`$m ztSCwAnWD#eKXXE{;eeS5OUeL~kk#Ym&8w}OnHOSiS$L+dQM|lM(KdhsSD0?mn3l73 zTJGZ;0|H54pO%e|ssT5dZ|~xsI}Hft^gaWIg|jCBH~ofa@BwB1j7`HANZj^5at5Cb zu6SY@555}ZGE-~;W3}t|!Fw)0e!$BOKF+jtaKX}fLy}BHL>Dukt_K;9G8P3riSkHUvn9Hm#=@mbj3l=K` zrO{0=96P?tcAahjlS6eufl-n8_rSyD(@X1IFN{NJXtwF0Fby@IgPh=R-;mqgfZgzh z+h|l)H=+)oLq) z5540#pb8QuXJT5+l%+>4&(X^h85^t^!^1BfLAOGBpc_5FpF90Vr{d54{!gh6Q+rly z>Zw4|y#59&7}GcZkEW{(sA}D|bV*2ulz@~-gOrpsn?_2M5GfI95lJcO66x-el$7pH z1x&h;RB7Jahx_jDb7k$dzL;~&5q7DAwP2|M%r%I;Pl2Tki~y}TWZL5&54KNVfxU(M zp-UDQ{QB$v!4xeul@@Q!6Zts;gEAKN#nQOLzl65}nZD){%>6hfnFoXg1md*w*REg-|6j0c{q_-=Y#Z4_uT8Ai&g=~ zD;&80SWAOpx9ys|_PfAa{=SBOsi&(u<~EP+mLC-4rfX=3D_#rUf~IKos^u0& zabCOW+ocB)GvFFL3wac1=d)U$^WrVum{GBcRv2)_AcU>&Wr)OWcKHD?jKF039&yF$ zzx6hSpG5vksbQQ2>U~FX`lw#pkFoS@7~If(Lizdws~3H8mJ-w$kn&s)>y6@$5ewIi zjA+0W;O>X?O-R#=6*JV)xlc^b&dw`;LGJ0a=O_C-I?4=`5m1ISjA?TbekHYH>%DJ` zD}O!z&khi1UCcTNg(Ukx`t!X3mV2&r=e)o)D6M+GJ{PVJ@PQonOe3tpx8RQuB4^(N zev$RPP$6pd5pxE>*WkP*ac%ymmN_Uv8sI#FlodRJjCD5lTU&+@tZpQL+0ny11GO$W zb2?qTz;Vdx>gwV{3FDIn2Mm&v-W>2`f&QHMJ)+{7K<$j3FqP4sr@|W_zLAs}R}wgX z*Qzu}*s*^ncP#$#0Hcy$uU6BPoRUKQz!nYgFe#98t=%C#l_hJ&ZjE_L6%@k8d!MO4 z!5_CDN!49Vf6W~~h*z!Ie&>nA)mqgCljQ4Ge?SHkq+XyJSm3Ytqh{SdH$c<8HdSxbn5bsf z{*Ln0)atBjaW6VK=wS;?wxDu321A2uD!pT4WAF}u>Jq??7n_rnWd;==7_5>P4AAZh z*4fRHyz)@sbASLifD4fFIkpQs=_$*NcO=VSX~&2%j|Z3c1A?^xv{KObN0X_3N-BtN zy#ni_^ML8cG3XW678a_lQ9dq1nG9jbpu$=c0Dm9QhV!O((dG}#ZvQ=Uzo*JQiqXj% zPS*a3P*|4bHOOs;>foFl4#WcRtfQ3IKP_+}^f&bt;j{}P5Ms?~u$v!`j;Kw-Y(D_Q zgp3)tCHF6$xeOx9*^EN90OGi^!jiTgWo{sga-^gSWF`z}caHIar3twwXBYok69TY2 z08W5{5sC<2`oM+U*49>#0aHTRcB8J1Mu&SIX!5mnbs7inA<=qpndAZtf|f4g45lr8 z#;O3af$9FGD=WsKfb|hxAk(K-jpFfd-@@#7k>x6qWRR2u#>WfLI(P%ypdQ@ab{baG zkwIo_Eh=6BARyy5p-C*P(|K6qN8zzPaf>!9KOajio-nM|_rnn+*8|g8>r?rh?+swR z8u9S+Y3CmCKZmwWWQc*u_*kWUX8aEJQl-*zwtqa0WpH6D-_!qeg2c>lqExu%xi8QE zx*?!E3LhC-PqO~0zW}^~RX5Od;o1XlPRjV-p3ur6^_Bp`mwaBp10_4Bx8lk!B!t<( zXJofUd<4k5D^vWXn;X4^dqrs}zP{_$Or>?m(VEZMqr^bh7;}f`g!SqW?4vqiEf^AE z?ROhM4YK9?PDN5&!WSXB73w_pTL{zV=nz{K32u506fZoaFf@O~heh1Qc0u5nTQEmU12 zg=Fm*pg_gN38bxYGr=u}QHCCso@{V&l46#qbVfZbqX#=cOW~ zmjLw89W?VCT^>EoaO*e2ItG2oUSDAVDm@6vZqb|2l6e+PuJ0J~%n$)?iT`$mi_>A2 zom!whE(IM^Le9q^Z1h zws{?7S&lW(D`XR5E%%wY#p(zsAXzf794(fS?jq{3 z*~L8|Kj19#(05I@{1qDU0wJQMa0<_=oTq9 zLt(!jzSGeP!e^?lh3^6m>5uMmN{(Ee>P(oyk)CZ*uZevr~o0M&?~8w^7-Q!{9NPs*1V$Nxa@P-YND+;_1{~)AoM4F_;lTy$jnE z!!CHX|A`@sD>|mqd^%{JvCx0o3A0Jiz?%rqZO1UxHbknV`-_s$tpof#2{rYA|44Lk z-p%736Bh@%kcezp8kfH=&wnX)FJ6tQ6h47oZ{5=MpS#4TwZs_i#Gq_cAey~T%6+Cf zhD}9;O1wmX<=;6U{bf6oJ{iFpv-XKyqlVBpeAZ6=4VG-l+kga8REOj)4rx9smY)tU-EDXt7DW3~Y-avj zbnV}Le|WtCI*A8#I=tsdsAW4>r$pEEBeH>`96KRZ3v!oV9PguIz2+mr$M0KqQvQ`WxZHt)`kG|rsd@Pl zD2jwrBGANC*Urt|!KE=7BcPd(+p|U!2q_Z+#eCwD0{ETRVcCKKOWdCi;g7DX2uzof`JQ&YU5)52%(8Y2xW9NkYSy*{>=;3K*tp#Hb!y_p* zhUXo2UEY`_vh*zOwb>_cF>>c(d|Doi2>%(Y$}hn_4}$3*-ly9d5_;j7qo|c;GTr&!ENb|0s)oi_>UiD)0@5DtiVD@nSu^8CrGh=R!bg_XNuBn*_{`%!wafH0=7ZM`1LDQthy@g6r6W85S~KX) z?PsgN0Qm?iNU%3M0rdyS98W44fPo?9bKwcdv$AqO6t19Tq&(jH|L222?c-`of?zt+ z*l>UlA{4+ALga0=HN*9W2SGdX<3cb4RK91Vl_;C(JHj6Nj$kcZR+(M;!2|miUtSe;;0Qy#a9Yaizd~0TU8EPQUjWykn#y z6Ja#SAnLRP1Y$AZxv*GWjUZy$&X{pM+3wM6kWEkUhr6$BZ{LC0BWa$WGNZd-9h3VL zY;iU21h$gz2*@P95<@g5Yon&|`F4<5we$Jq_+&RKPC3_oE1O*JYiEEMD!3A_4N(UX z6IDc&>TOPW11snJzAn-ZbZeG09mdGeWA<+T@s@ZHNh?|fF0}A61Eh$r`lcDbKzvmW zTzd>*dc}T=Sn|4WcjEd*^ulM}YCdaOb`I5LCo8HzX$8a_O{}w?{Jyl61f4M={A*;t zMaOW}cACL1jvUjD_LvoDeLhBN6MnU;UGg67;tdyRp9zSx9`Fk?y?LVXf|qz1L)46l zjt&MCw^h~`ZNO&@IeY@XK#(Zi)uUiAHn8AY>e4FvE8D}4GUm1-QrR;Vr1|#sD^s|f zoF2ngG#LjiD77xqaeWlu#Dai;Y>nAy)7=5_ou-_X0v*)v*=apE8v-AqKU)QvEnuyL z@`mM0ESZHLM5Q|pQhtbzdmAv1Bz8k_(5r>ENJA(hEG+zU{pv(wk#-8OgWqiCPu@%P zPT8DYfp?C~!W;~nfTp7Cngzyod1$8{+IhLJps$)&)qvbG2zrvu8e4an+zZ(L{X6J0 zc-eNL)0gN{2v?pAfw2J}O+;c6qW2QZnfx-|03Hyg*b8syqJX|grq9B(zq`xZ?FiC( zTn5`57^H5ipC5Y<{QcH^5Vu&v^b>Fs+Znka_larA=%BGa!<(+eCVE-*}2UGfn%h~}}mJs4wiadjazte|LJ=_Kg77c!Q4Wi%>|f51m`1e)G)UqdPd??#jfR_Wfh_z!1hZ}#2AETyKjRu50J^ysU(pG@7K{dv366 zr%CA97mVKOj@`SD`%Ht7zJI{yLlZO~qJ<&P>B$MKF{Nj$LZZ^odh|ObVb(^csWI>$@tB!9mcv3IOOt)(LA0_A*yn?$_3di}7hsog4@3=Q8FMEfSQj6wqOjI< zo6BfK4y0ZmhqUmRhmaI0J+Wxr5>o+yF7^R1_a z?(y5-O-%R>H%*F=Dd5H{^GJ0lc-o*@EP&n)Dy)^IrBd*4lC_w-4+AGi%!5z5%X8u8 z>N+oK&K&3jRv>(xv^}wIEei4V1avWs8K4C6L#>os;7hQR#&69 z82pOi*wJew0&KOSNxDJi$9cLfr6P+iVm^>$DfcfC01W=5aGgC2uqrXmqF^0X_(&6MCSfB}Fpcd#q8eiYrz|Nj2{@VHs5gBPvh(h(Ip zOxurDw;SEts^_MMD*Yug?@(OhZ1uqhSvqvNFdAkJ1^hSMWo^tn_qg%L?>&ix^^dou z-tcBN-AC>4RIoY%Kg89Q6$MpmNDdy0VOH!&O};ufRN9P`RC3-j+wkJUqY*<{Ucqht z(&0Zpo%+;Xe>tmn5J{WdvbF{OX`eM@gn$NYZG2{{BQaxFyVeq5%1UdlImhk>7r3LP zl7CO@%-i?f<-;IS#=^o{lV`LJ58{zR@*zJ7BID~@qLs^wL$?8N&p3~93tvP z-8U#1uUU~At?(Y03Tqg;DNBy zn3ME|Z$0TKaM2p=5@PK{~BA zv+T8Ki8MCyNos{BWWQ>`wao5o4K8Jyx*2ZQyo19WBhZY2cUnGujehJXQ?G=N7h-rG z`*h}#$zD9HL8}Q9k+bOF=qR{VF>9w+63?JU1#V`=2}eiMf`i03$#jBE58_H4rtv!9%m z%F`96hK?=3jh@V-i^C4#r5YR9O)w#03D{eR=Ffg!4K6u)C2;lPp$UTXl=UEtRh~@o z_G8@X&7z_Ajt*^96Pz#6jGUsy8cH1(*Yd1J0(F2;64{t$-|d_-hwyi#7Yw)nD}_L7 zFbLe+?=4ZD8U8LMeb2M*%P zzc-b>#ywzyQrtMXj(-F>ft_EY)-l`WSo*_%q%M}@z+uiE%tBR+A+@IFovCJat#xTc%SZ?OFOJ%A?y-G{$k6SJm8oO47;g(kvNz1kQQNB?*I17O zwaMVoqll5>??lZ+DZ^hTCj|m;|F00I>Zhqng3_&B7QHi91RgQD%kUX1q$L@1uZ~H_ zp$UDr{diKY1LbL*DgV++ctMcBK2u6P(7PJ0$0ouVGPDT{T?IZLYNI0E>;|wZd7nki zH@D}$_E{41HUkxvQr}ZKCc$6(^0q5_q|$JX2fdIGznmABlDdRDX7M~AU)|@juXzeNG6ln4U&*$fLpzTR zSUi8pXR$1;2)gV-!lobgcx?C51*RZu1I##}6Pg|y+f9!GEX%9w-TU_^mk%F3Qo{z@ z5~Lp4aS6sC?>1)ZAF2)u{~RBmcMw6dunyI4;};|irde}p0Lk40i9=c3C=`FyP>WY; z@Cy_f@YthG>aNv);jH?+^5_}VWSqxk*m*w&S4CbohVMJu?_x)4@iwio3?OTZ+u|72GZ8Qu(BJ6Y^wh{%D!8zj&v zPGHa<_H3r^1w+g87cZiC`CvenR0V6*m^byiL+OI zL*m24z%C~F*g{|O_WqAltoVrrPdtWYQkieg8&!|FF2-d2vvjnO?RhBo{mU1K!_f*q zxz+80r-`oS%pX_dzChTqX~R5FoEV` zAFuxkLweW~s$a>)$XSIEH8AwjB=mv~i(($U9Q56i(sgzIt6cweY96|*LHLh#Ndh@l{JEwJIb z>{*Ty+|gh!1mwAn409Nr14a%;a;%21oEzYNa~cavg~}*Lo9>>63t-jtl;6kO{jqr- zH3A=owQThRv^`V!0$ykFYrZ(+Z>S~Y1s^8EY}AU3~8_#aQPBYHwg0b^P~Bb)-oBP4jf2b9!NoN??x5TdirAr?e8a` zAOHT*GjkQvMK}DqK48z00-If$foWd-y>xkS8rBK(+w&$?TP8dkZ zWU^!t$U=+*WDko{3g>VB*V$nAbh9huk=;pD+~?;D3c*Miyp=Gxmk`F3duMMcP9t=; z1Kt$mT9TFJvsAEvKYad{zn;GSKY%Vh!R-+uBu+ahTacp|<0dzPMV$4)BMPDU#i`D1 zx46Lr_#DlT%llS^X(`_l-&X|pL%$2^wCa9~Y#jWXGS&Pv5irB=>AluR4Kxs zBQ_S3-PMAG%SY}qy#L{nFdeG^$J$glYY1E9n^2Ep5-2hJ)wxJ8uW)50qNX3|O#1;U zdFIFAW=t4*m9klLa{}!WdtId2&B7||qoD%f{T#uJy)R5&Z+`?^DJ1pX{R=Wk3~8MQ zjRmk)Pmv<1#62MShHz(>mfArJy+D@65ytvYKU`PZM_v@aOs}Nfl#yqB?)pRrg+Ebp z=VCBbsg5vJ2bfE*_fdp(o2dM~^xbFSkTSFa2$1j})$v84B_vtrZS+Ixi3+YW`p`Rb z$1?x}%`RyF_+PPTl!%P>>v{;};Ivz8^CT34`+bvUec^_^jOcZL%7} z8jpRdXWY17f$2LE6;)nCtK?q#*Icf8-kHf+vFv1_GZ8p&%q6;XXPaKFAr|G0qYG0) zBTdaVjZ`xx>^P)JJ(UyfUh4JMF9=Qc9$lT(0%pN$o?y5KVY`5__0t53QYd4V>D|WL zhT+jd5k9ocMbYPpX8F<;wW=_D_Gdsn0U7O2L4r3vAEr0YH55ZA&L6ypyhQ@F7)267 z*wAs(yfXK#jzIDC=EAohE4W33dU399KxL9mRBc_;H{@a6YWQ*A1%-s^1lTLhR39hVrN;y#IoL5=24- zy6mperzf%p&@J=Pcr^bs#eGnw#~|gMDtQ-dqRGiIcOW7rXL@r_W`?viIoW*ECxD3o z;Ka!oUx+Z_evKyuI5Q+0rr7Bc7}qLc%>w=yuhRYKZYQs@@XzO8Yx*s#)#mF!Jx9^M z*@YgM4PNh#4VN!Z zAq>veF3M*XgbK2zxY$+2e>^5KD+Qh>RY`NvqB8sin|!z? ztK*{Y3BmkP3&`)I3}CE$3gy!E``xC~mVgO|Tp2SIHIH_#T|%SD`ZNJ&k#O=xpe*q! zxx2^<+ArAu+X$}i>O#E?h$(FrW~R=rH!yV?DuZJVucbQX!xseTt076U`7y(0uEw54 zvg`pQN~srI5;l=UU^oE!+2XX?#5u>|j)=;e&hX@U){i$Q9jXQg8{m@WoN zuIbksoxFreE(`S{o+HziLP5_sztcxt4 zb^9#MoT8cd5Y(&+@Y4asdS^uLsCr@~05pIS?V>S)o}2H?XnV?Sj69I@2>98+Tm`Zk z_+r7m{v3?yZHC|c9?lA z;}x7z;=z2flFOk6K%9B=UB9z@vnMYg?|=cCP!&$zGKsce5PM{ZI%6?F*cHq)!I#GI z8qm~d2o$e>z<6jmnyxk>V2ddkt-HN59nPF8@rs1O!2%MUzz{;~;X_qLDjv6LC2h>A zX9AtP+P&6-=5LeKhdN>3Ndh;x|1eq9zUZ>!dIo;YRo_ff`&noA!?Kg;w+ws%HCn=8 z1S>GrRbo!n2+NWfUogV)@gx1Zf5PN?>WYktswy+CZ6yRkYX`IC2`%pI?p8PyBBB4) zRh~19eW7&mm-c36H`iNH729H(AM?<|h$6l9C?zIFMvTW>zPG)#{u6*cw0GuI*7Rqn zuD^W($ih;$#FHL;CyO493TH6m^!y ziX-orCpb!x{7^}O8GFIxt-oHP`3yQ?$@dJe3cXxBRtDvaSP?3Orig<;CxStcDQEoc zD<95JpOjh4lE4MeuRUM8h$Z2VBaCDwDU;hlcq1k*&Nh{N!waGJ41UFj)`J}&VS~a% zzNIslSm)?knVvY1`=X5mj^!XX`XsCscJ30p7g#Ps#TTc~FJE*0g9WhSE@CU^YPon{ z|Fv@pq!@YYQ)vZB0CdJ8bibJxmFEJC4uG_pv+t6P_TO(3MM{OMlhw!YFa5lM>a2bD zm1(_MDU3DuwA`7K0=ib^uD+9YUQtoMop8Zi1n|sr^EK{v%F!9{1KB1|`_?4huxYHu zGuE|0RD3oV41`<@YNx)#0S=IYpPo7Ueo(oD9SW7TIYttsd9{9#01_QAaMK~+!|i?! zEaI%%@4zqO?&mE;+aB#o2Lg z6eKnhCq$HV%TVw<4lm#JGk>U2ClnTd80h6P zr@xY*$4lV*nESR8MW5uZl;hPsgj<5oak~L(nz;ThS6{R2r;J$wGSw;rO~5D^=#&;F zpFx#}ED_a9pk#EIN;w_qy(^SR_R zn?`!>?RHdUnw}ry3{40N zr!TNHD`lXiUE)p#K`=nILFp8aUXq=bfaf3(@0Dw$f%yu=?uuK&Qdr^fj!i88`|)v} zAtB5KfaDV@2T-%RTHD&bc|PYL61&v`#1U`s*DrWu9%!XF?ZWiG9>rxB zZ+HZRG<^Xnwt4Y_^5MrU1HSK~u*1HFkOn=%zpusMX11WrU4*q9*M`uxE58#s2tUkG z{D1SG0Oe&(5*Yab>s-Um8#hQ<643T7jDC4k!uyJfie_f>hdPH!m_{FqwTrq)Hz_Qw zw(vi}EXxjbXD||kDWKJ7_o~dXt0|WoS&qo2z<--Tc5Rtktk9rKN1;GpQx(YlvYYC+hI@) znl~b13RClPpw59qmq7-YPd7v13FfQ3E`~CZ0U$92hXEu;3l9hFh<%;75uZZNwf~-l z9xNsJYB|Y56S2x-RTfMTl*5+Q2vz}_2qukF;>*6c{~e$CMMcU>sA5kdV9u5r^$e|3 z4#IH3B{byktv@w>Fz11yK}g>(ny%hvGGA`lC)kkiwjhPQ$xZOL2VMHts;6O{^U|1> zGNQT6)!(+kX%`ZlH~(m>7BpZ8$3CHv7dl zq1))dpiS*q;%|1ByWMmnYN3$yR*v$NZp71^Yhf`F#!H!0v+R{y1A5_h*SMa@kd>MS z;^?Esj6d%-ph}9dI(zM*(fr_d;Goy|V2h`e&-WM?{gTgcX8)5AJ59~iF)kv)Hg&39i?=*e-hp8 z@9XKZhtqZ6YEZ306>=tas>~zZ$#HUkAN~!<&biVacXd9Ief+j9{7u6*Lg9YPJ^)H} z;Yd!mSem5UR^mOT!ToK}DA$0e3KX_~w$t4gaF5;2xy)vF;Np+#SHe6v_DrJ|Mf39= z=;N#At??9pG%f0mdibtJ%e&P??PU6r>@Q@rf*LQM^Ew9xv(!gdo@|TL)61-`WK@(d ztokTRe4ekj=7$4|-%C_07feprZ8ZM;BlB>gT;Ou7 z0BMr|W*A9`;<1CizCK7CWQb4zQD{FHKc9oy{at6-aEQ}D$``A4bS;jNK8#WaNu%Gr z{{7gG7&81iY^n2fNwd|t5T%A`JA|x>hTxv^gLmCjU-2_3%XFAxqHC2#jEi(_eYc0e z91F4U?A`R^eKs(MCWdL<2QCa_bw;HvgIT}eqg2$|3Exh;J0PP}E}n$YCX_D!Y%3Ji zOG+4A#@{D@5)IaJ6k(M+tYAORc`8#EbaSw{l;3ddl|LbHEaFKwfh`LDd3xl&dOmp_ zkmLfL9O9x0gd)I4gG}pBo238x#qyqTZ6*jbd454Bl3>gb=eGpS+{50!q~9Ped3Vto z<7TLa)?ojm5dypVD%by=-Z>mp0VX#sL0QL`0qk3uvA0>;US0me6!6XKmvPBL{l z8;n0(6ttzF#+N2NWMGww50Jg7Hffn;a9__ng>XX-NL-g*3tb@qkF*|6sQ$XV_y?_e z6Z}ACjMBo)-99px7S%Ef=!2_9AhOlyiw_tK9G8MVLjBpb$@LoAc%<%2kmdpLw|2tG zlxCH@Y^VFGpN)W$YQkn>}34u#h++xrE63wzlv&^@lw6} z>OMY2i?XF=g!^dvK{ey^K+%+Tm;~c5iK%>55Y_3!l~pIL9TE_3TT(@?^!JJ=c{(4B z==#X6`^G6>s?jh_Dpcu~8Vbjr(&sDvkQXnbUd_uGQWMTMmrIR^%V{(-CUC1=i>h++ z&M=?L9Jh8+$Yx^=c|X0}3bAUJ0=}qgX)upqC+nE65Zh3@VIr(F$o1ScBTQ)oZ6a0W zSjlkqBWs@_BNaa3#^ismVRZF?&(g{myUBTt)K@ZEPwB(@u;}y5P$B)22m8(HFEe_~ z`8b-x)TK>IK7Y5rd&_c!bOCart!&AJW()}*s7=Bi|A|{9o=fl)CtfIi2DrYJ) z>qWmB@_im5uH=+F6ak&~r%!gPT*8)8KbKMCc&HgA0`E7+>zT#GdJP`mD8I@3TYd8D zDCJ83Jrhq7!ssPaK7EKB(-0}np-J;&eKQ&zwHwwfGzpo@^XgA2a^-HL5vBn$BT56C<}kLf60(cS+t?O{kdXInsF{IQ-JDu!C}7d zaoXK_yY!{ONvBSNyN6~!!|a4hyp>c7CiRj&zk0uv+_m$M$N~K=a-C>=_(0Vo9@D&Y z4SlH8m>Zz>1H=vMuHd4RjgK4>^ zwO}pwv&`f~Mq6)Vg{449#;JjS<~FJMFbayesYlzvQ-Qy zO%5#RMgrA{C{|}d_$A9#H)$f==vnvNKN)a+-6}8_U6MM?BKpH*&Q0LXcs<%pJ9IpW z!#B4W|4dM(lp4hpyDOQ;rM(gIsQK@pp_7GmOVE#+vMmc3DcKO@P7kQBhZ>dD+I}t` z_4@4`uycnkO&y3D8hkxBv0t!|XmLp1&x)qDr&7t&{;MQhyfA+3`8Xnq5X+ymS8>qf z)uW5suhm+FZraQQO<5G3ImMXb8&LR3GbSO#%$R=Nu&>VwTffNViwV*izJMG;y7U=E z71Ox~Zw&-c+6b3A-pGnT40#R61b-)EV<|OCXKD7W9uO2C&1PE#mc%pWv#}6 zSihrM6x3EYNJ6^mO>~wZ(}cJ|^QCDJHAg7u-e$`cKRjQ;Q=AmE ziOvg|+h5tPlo_^6EKU6HIdh-Q2i!yvVD=I)-}9yRNU`;OeEB*)iEqP^J3-)nm41m% zHKtn&d@tR$um;;ZEGfe(8J?C>Bz=BdigC2#wk)vMV;}vh`*mZ8*KRn#_G2<_$i(-e zj5lIA6KM_N;Yt}a+;;|5&5X<~l@jAs?%JkYwlA}2iDqqK zd2qWW47z5$_1`l7jLKSSiu=do(chIVpPSKtSmKm3My+za`YfxPOVGF7zU}<0KDB(s zSTaAs=^va-z5hweMt<0>ut)92yv>S)3)&Nl<`aS^3l@pR_DW?i_az+t$s1q08Fa&* zogz$N=Gw*~r(&UCEv*Nod2GN1@(gujq@-oJnf4t{C9$-8S`-1`wL*9$)wA!|X)nJA z%iiok9X6<*eYbL$%_qlUCVE@BQebG7}bZXIo5v8MoA1+-T=YtJJUAP_QcR@%6Xa0_{x9QSZ#%t9~W3SZz4wlH%xrZ)5uMf~Dx}Wc-dkKSD;rS0Z z;|0|=zh!B0CxA=B!0%$Tv3-$v6}5ZD>}A;Zxzg?vlfH)DH-4$0|E;M^Y&zCJ01#%AZZ#kGWUq9U6CjBdT}3Y{>T&mQbr2 z^7tvZj&koqSgdLtQkbXdTck9tipli)?xE}Va>ofatDv^^(5R$k744#T$?wAbjPmcP z5`w_S_IjfrCXDGxLJEDu&i)*Gavt}*x~p9KzMl%k;EnOBOFm)TimG~1aaP`f9wpv%FbeH9rz|ipnclRO z5VtuTe#HVu^-mTpA{zp+xEEBjPx4j@9evtOqi?37Ak;rd=WfRe*oe@+$4<^y7Pm~7 zssFo%lTs}4--`!qSB{Bzz>E`=uR0uPD-cBt92o>bepGcd34zwI9z{*h2rquHG7R}0F}1@!J1=Z^wRlM9bvoU)bJMZ z=pETO>@$td$Or{yTEaolYA$XO$AJ|;wD0d{=s1HRk|X*ghvaK9@fgf`32r{T=G%h2 zuv;}nKYkwao)G-uI{j$LkLndtyPYt2&-P}X zhEmmZSnN-yBHfKqE9fiYS+ZVayj9laBo{>)ZcR%gue?Or`l9%YJA3QzeVNJ}{RW34kVbXGV7{;Dr&nX@ZjIA$j0*X`O5 zn-hU4=ZTE#J8H%uy^Eqdxx1R?l?I&g8wbJQgQUd5v|YW$zoJ3|_dg{*)^q1`=Fc1% zql!6NPkze??P|8LZlm~y6;E$&P?okOYO=rUw_vror(4S~P*$+8SC1=TLJDtnCfIn- zp?s~T=G${%{&+q2?H5W>`}{FQZAt5gxzulY(X%Fz<+S0YgI62}sP@u%+FAk~$}iJ? z@Ug?PqX613-=Lye;3MA8#9R~R2TSdnp_kQoais99!)PBWq-C+TW*FcpQJ9x zp!v4dNKra+A#E|I4FB~(N&YO9G7Js^r1n@t8j(8X)3@(6Q?Ewf+nG~bzsIjX`bxD) z@c?y1S}e^HuN@U$;Now*yEkk|8{MDj=Zq(coQaZz@Sagu+!bxh6ClU4bZD?fK~XwW zmXpy9T#Eh|q0B-ea7qUOgs{cb_&6h|M%3o4oQC4|C@S|k-DVtnv`&nj%=MJ<1W*Sjy4(oB(U*@Lty@i*LA|+ z;a4S2tGCA5us`W@#_MwC{chLyzvU%q!bJhJ-x^-&3?c5embf0`)@n1yj_D zK2#bE)u)+U1j*jC2}DQ|Fq_6!$Mc0`FhwoLw~zcR(*AZ3XT{JLDSUjyi7bX6_OBjL z;^mlz!XC@Zx#Rl;>X6U#shwk|?w>V!X~+r!cMD zo-7(03)pJWJNd!d$K|U|qR^~uAuuzcl=tKaB5tb;7e_zyZY4H^V$>=3pNrU7l2Fu{ z-V{S~I=O zI@%-t2nwRcoML|7vC^>K1l$8%m#SHUEePvN8KyzCCij0InucIi%_AYdAoPydfnETYf^0U_0`TnqJ#nKrR!W} zhDshH{f3z^C}NZ8Ipg{rtcTM3gN1`T&AvsU*$dJfd;U~v&q5p1?qA%i7xeO1V@5&5 z2r_Fw%9~IT5@s5-Wo+#aE>&kiqChhR=Z;w+cM*Ze)n)%y=%uOy{xXVzK5N{#;B)f; zt;eYryH0{MuDY64K-jQ&+~p!xChKIul1LCo^xXcV(a5Lku{=LTakGg1-($h=jMczG zmm1I2=CBddH82$Fwhcm*5RLN0tGKkByh5vzGsyVw4=rs(*bFz_qQc*3R2M~g&)RHg zLv=0i&0eUBJ=;zR3_U%Xe+P8Ls9%hYMdysr?8oPf!{rmd^5f>~hE3MXkCtq3009ubcx!h^ue;EYdo zK>IkH+NgK)!N^cSy83^gR)>osB*HDh_?}L#@4d#r34*_;=O2yKJh-=>LQTLHw;;LM(?*~Bq_nEiM3Ckdo!t#K zer__nm5l!8QL9m1&Rc9_BYQjb*W)zW6M#F|&(c&BHl^XBUCc?R$R=trWxWQ-Je9_6 z&?0VFVlrob7hSdBq8MB~u%M+;{J^wEa~LNmsjXU8^%40)g_oiY(@#u_jdjp!Z~j<; z$>sC!^^W^XxK2~w_ASpWt3@Rw5JL5u^J|SCY?8M;I&R0ki|r3itB=l}ifANBNWfX0F}Jfc!2nF;c>ij#kSOPASD}bohvu?8siaySy9<4X(T|77 zAAG~y*g2~2L1dt}7Pf;HnAcGLh9p~SK`~`Z<#oSrFV4ybmw{KQ>)ZdJZ3Eth8T5q&3JB|47^ibmVT_gX8laqof4#g2bym^-CEO(j? zN0(>nh7pPrR*P2EHXLMloVGBCNaLOVOqSQ1=ytFq`!?feS+-tDk#$i`C#kaw6`G&4 z1;R4?Q=WFw4ESU}4fh;|uVo@ig|E(aom}PpWwBCojqX0h*TTos4}dcwdI(-R6`J{$ z|LtpNtm)p}kK%p6Xv#L>r?vPA*02jB51F{mp7o7frugdnyi^vgqv5(l@oDelO3n98 zKiJVrHGd1KX;Z+^>oTtld6LJLwds+2pFe5HC0a*%nUXr=n|$hL@#OX9?z2jJ!a&yWwqfSN0#!6Mz^MIx28Lkhc)eH&$=Znk$?Damsd_R z1?_!N6ya#~g5Dpc*CQ12R7D-Pid}^AT-8`eD9-cu^Ab;r!e}CbXiC_9(hMsg)_5t{ zzdud|y+ZR>DA_K0gMH<~HV5*bt8J#wzV4y6JObC?4IuL`{?@dw`xc`lH(3)hInF|Y zd;4b!pwa?K_@|AO#h;7Cn3Zmd-?8zh6}S8;A;duQfUM090}XZM*}9ZX^Kz+e_Z>E9 zJ2H2IlXUzUII!C`HvXKvN*UHGfliH8A@z3r01OEOWB*cw$>07NXe+8c0_ggNHfOw3 zAO0h#g@$HTKR@4@LZArbZ+bwhKzlOUSauhQrYx@4p&W*+Xxr`R8ibc#3^v z|Ij~T^!h@`Y97as+je_+Yjl0ci>o|QIQ>RgH~e|=mlaD}jPY_FBYx7r%bMBx27tS$ z+t8;#CwKl23~e>K^ z?CTz06c-FzPVW3u-RaY<6M^odaUfs2eA@L<0;vl-S=I2dY|FcTY(lGQ!-+DqL@}F; z{(C~~P*jnG7@XWjwo@|{ljwg<^0bkKXxgux43E$@WM7r+5~>@eOXD|E;D75I2!G`C zXHy|?jGYWP)r}v%&81TvjLuo?%Q2t~-T%4-mAms_TCyAA2~6SZ}I2Fe<EX}te)7Y*tjR2P4 z&_KtW0rF>J`*1br<2L`CoO{Px@W%D`sk8t^l5k1V_}Hc7*P9K&ZgVZpDBUbMCbRC$ zYA8by8Fk&0Cx?J2oK$IRwD-I~sCx9;DD z>B;6pdaJr`&)0FkXBFDbJuaUnX*EvvnRDPy2(=y{us%{wE0GVs z6~2y&tv>z7v62&of`no6c%a6T>e)vlIMRRa7xsT^Djk0yVKnVW%aowt{_qB^ybImGPeItMJX#C9CWyE^PC60ntbI0 zWwS;c4v=;t>-lUz)TsOEu?e09l6xTdDb1QX6GKy4V?__>Tjz4nXGT(E+AFF3i51^VMqx+AiL`Y8S1QYU?)0P z`_e9r-|(n9!FF)A zlF>ZC@y$jXcFI!M!vC9VS)Jne-@fM}331r7NWa(ynij(QRKWMzxa&QNu>Wi7yW_cR z-}i4R6{3M6NtBgjXN3ycgp9Hpwrq*4l9WiYS5jtHNV1|N*^iyF3L&eEgw*%AeSUxZ z{PVn?=k;Ok2ao~<(z_H*FD|p!`q@61pKOLp>x5NR9YErw4kDM_7bM@dLhaD!{Vj*s(5_mssqr%$Qo_w3!WQGMr^vp4pN z?2b=z=%5l@{T2MWy*f_rU%T55a_<{qB^=xt8IYA{?QW96LmYniO?3Mf5K!P=*bi#x zBk#FN4B3%|Xjl5`)Rv$c%n9iSO&Mxpm(o6%fJ-GvxRiW&uQs~^yO__F*GudZ>{IN= zz}Vx--|q90gVC*9RKshEvUNweYFd-`ba?An+=1=YpD!KI+|W$PUCz!x-8-fBziWY| zi|Lu7twA+FYiOTs;O|KUYYEz&Y0_qSaCKnm@7&RUb5J))@0Nf82;3x&31cK^V;F28 zp*(8ZuK!4%SOMh%J(j>nC09O2w~p0UT{wdBrpFzKg2@u3vYE}8Wx{6=A}Mr=eaI=q zTAW_e>|_3U1#(BarrL|AxJmg8haP+Qn)x|AqcUthZI=CU<8a=que*|ezx%i9_fN~h z^zZm-xpM+BW}c%_u%EvMDo?m_sy0uB4JSDw?0*K(0)qlf_s|YaY%o6%uuZBlBSCW6 zQi7GuoSm)O9MFo*<1L~IH;ko6=RH?_j*`h=0%y0qrpt|0ZofJ1R7WcQRMY(I^4Y3i z#re7CioXx<|Mz>_vA!SBCO(q&SzZx{V%jccl>({N#wq3bK^7zLaB!2k^bLb^QzQ5 z6MF;hz;;KY$TRla&btaJ+K*Y)8)ugy$j6A@cW6jRYKM*IkMyESSVZIH-Bo%D<4z{V z8kZF&w`kpj#Gxk1?WiqLg7Hxfu@;|eesSa><)H|by@P`)>+fd$%+jW_+%g5)CKJq>F_|0uG#CUqmZ|VLl#WJ2f{S@<)`-sV^ZKqB@*9MI z*<>v?R`C15S1dCAOe#7YG5oi1RF8hL+ZHRu8w8ExC*PuTp*gS4?72qCZ6rX9`PB#MC94KxHmuW7df97ud&~e_OR8jFpt*+K_cTB1DWY2GWJIA!RlBJt5 z5(TFpSYoOTq{%9qMrORH?&^R~IbL8#7|baefT}V9cn|OwBJx3z+a} z!Pvvoll|Ti(+WdH7mI=f$JfxmHpiIxmQwHcxc@M^_U4-*D6~gI`KXSAhKF{4pG)JB z1o0~m4M3seI2=iz1V)dmCeEw3gXR`?$ebc=VUbL=7bI^ENg< z8>yUYNb(rq-OEcuKG(p6(W*H^)0nf<9}9+`3`!+5zeWdNZ|C*#GhW-W4sy{R>#-GE zj-PU?9so#P z^tB&DptU|?5djer+=hN!cwval;_6z-pl^A_=(FrRDW8=EPmy!{=Uym>S`QRig`G1T zc!leaqCTYmW6eDCtB>Pg zpw8Mn$Johky;!=t7~})KyUlLL$L(93io8$!5;MOPu6*kPYdVJy>vgME?e(KwE3aTh zWLTyQKs;uz*P8`z5WIUD#vzzJp&KIBXm)AO99DeZFgj@sxm=bSIOPtoGfT=DzsJsf`5a4Mv;+37of1Y`NAQQ_q;Zv**;%CCjU zoc(Fc+0Fm&92RWFYph{#ryohVf3LnlNyEhdYBc)%$TXjhcbnn-L`Q~&r%{0SJCL|X z7vcJzy-j;L9?njj|DrNrgREosVDnr<^RYpGn#||FJ1;edDh)&C_z$`=^+l&huSx+i zjCOBKQ!F)pH1k<4?P24naBGgX&X-Z)yZzK3Z@*B($=USB<}DqTuj_{xvU+gZs3U$} z?`a$6h-vdEoFOQeFeV}SA5K!?sLL$FA!_%9W+qgjLDW*&w~lmBOEvC=F|F11j2R?<+wawWOz=OR z+4-aI%B7RORfCdp1X*85Y$&i)LyCG>KgZl(M9_)U#gKzraLho+n66v7@;!TL(68!+ znv#{N>QlVbjtS+1U+0%As+3K`dr$<(CTHv`O0z6t4pr)U9UU(iRiZo^et1_zs*c5N zdEi0^E_&aV#PM+2!tEe=$G7C!%^$6v6`}-(3q*Bec}hzs*l3c68jg##wlLq3OrCid z?~I-&4Wv6*gt=%8_!uXwxWElN_;u0iIGdK0;HTN8#>ojcbP2j`#rR^~vmO_v+Z1YL z>~yyoafoxfRm2Szf9A}-NxJ$?_O+G6FD_`2nd^P_9#fPGF3-!%1+R5z91{}U zE*Lf~Q6=4ULel?1mYw~oE2JcYAzXiIz8 zMdh61n1Q|5u_C;3Yiu3D4DvN_$&fM4A#-eDPbu1p?8F<#(p>0E``$TBG==~Bc}o5- za1TRwKTaJiSE_)dOHagWaO&%7;Za!99PPtYm8lt7>~w%x5FVW!p0R zI7NSa;VsQkjKfvi7y~w~NL&*bW6v#`E`=SpOksj7k@22l?_b>dmW}U6#|15qMzZC5 z^Pb!pAmy6YVS^IM<3qq*SLKEoOtlDLDM8B*E60m;@-3<&=5^zkKO|hR1bL3->SkZ( z|6NbFy$DtY003GiD)mXY&@6k)BFV4$l8YT55;6tF30@0^0Q|1*xX3Dfl|P{wep}%} ze)GrtTAxr=g} zCHBh6WM0mnGY5kVVu{Q9DYy*ynJ^{b$jf?_^6yPe2IP{Vlj_xCRoa-1eS)6Q1%DCq ztxummh2gvx>VTIpI$GRkyYWRuY~v{DZVh5KSqBw`a2;dWW~3#X{Ew{Vu)Z%Nv6$n1 z&)twA2eDfFnV8y;D`?XIcIkNG{6&tNe0;NclPj-;+SZ$~3LN3;Ts2dH{b{yIpQrCD zJyn|9l~p1TqZV97zgIiI=iit8e@|#!;*maQ`*wD1U{)xPSy0kODAnj27h{APSHy(d zr?|l+GH&vw(p>4=kNQ!RrTvT*uHOXv{J7`bNXn_8U$cWpeMrr=AS<2Y^}6od^Iadt zX@veBrpZ30DrelydFAhGpH&B#6p=bb-N9JEITv$wH{?yqH(R>)O$83OyX`639o;zE zvPCu>K5JO@k}(rysDabIsz}wL+tm}`I)8Vyzyf}L0E^?@Q-x&GQ>uG!9| zeCo@`E$M-1K6AI0s*-!;v99bF<-HLDb5Pq+CQ^i;e^zNaODlZt*;Luh$McG?&qQY) zqQbUJq3ai{WXfEBotzPhS12`(wqwk4*9n33?$2fKIrEEmv#z~ZkzS?m$9qD&%qK;G z`~M7W9&3uLp`Z7cR5{ESN?A2#bTjdHqW7pg`Qz+K9XU0=BM$|(Z~49EoA;I?!T9;D1yb=i&So{athXdn8c zzOKy0RC)JW#5Bi=j2ZYX8YIP;FbH}Ez*YxIkK%=`?H4f^iiSLY0|bvh-Uapa#Er1Y zXi9m37}xTCCH=k$j`2R-_9MqEk0!?cFY4(`1)h9k<9Y$lz*^Mn^Oce#Muj7X&6b1D z{7jY4L;Xsoao+RICRw4V%=|p+55*WGH|$iZ)=S;=Alm6Y_tAy8#0(VqH8eNK)p5dG zc7Mr?)RDr@^z#b2=}({0RXjs?|I@HQ3^1lM3`B_U2fM-wnKr!T6 zSwRVD8#MtpkiL;5zjfCrII>SHd;TB;cgJvT$E0{%V@i_UUDAJ-Oy9XT@X}?z)Zhzd@3!OP={HTFrD7h6c`?A4*UPVsz?^=Jw=f z%d_4hY+)U(qGOxn(U-g|3>5e3+PhvFcM~nZ!m4|Ya2IPNh&RI&wndtxnmV7Cm6AHg z!vHSyU4#?N#Bm?lMxvTqIYF%e8e9 zg-xoQ$^nT73+@&@n*&bV4kEPm(v$M)0xgOGHU+w|M5P4uW1*ybd-l$}>*s~O}`IcYNYwL?n|h}o%>|3Ig%f)?Li{5srT zajZUVJy1&mCS3+*VoLFiT)5-uUaMrt6N)X?ma$>fSv`Z{s?5fcNW&Y`7@uA{>>T{o zWu%imV{5~S1LTuuy4Y;|MlB;osD&6{TV=GpcJ0;aOLeJlus#tw_s~jRk&<2oS_a}B zQBHqmFeT~4o~VR42N0Dj&i0OI(4Gk0HRqs@?| zCmg3P!-jo6)zr2F^4(sV43}Twx?QUvJ-2#)6WPtOPfkjT?{FUg9$3zL0~c%D#2N;3 zHrFvt-fX<&&+OB*1(p|^izK%xa_q=DS@bWCnsUnAg|l%c^OF=R1;%M zQfiLy-BEhVw=qsLBaR&utX`Tlx{U#E?s7imZZZ8$R+n&)shTQmB+af{K4B4*V8RK? ztrnTa?nMA~_UPM_Aw8|bZo3^x) zd8FeaxnfSChA9}28^O5y%sWmF1(Aq@oqnIll`6};lO)-gRNBfb%wKBJ;$?5 zFH#aE4TFBwwFkZ%M+ND~I6M46lV;cT-_H!RG|yJogTeEHvcNDWc|W!v=*X&vw07On zB;hRR!E(N>od+yPt_o6K;l@8-;W)gW=KA&GbK&Za<@8K`aI-}^ZEM`U@kthG)- z%SBQMUbK#J_C#FDiVgfz3BZvwPxl)?wZ9CJZ5HnUKkKuYZI;xK>c`jZJ(&v`@QK9+ z0Dh^aS^jhLt#W?9e_U8xf#@RH>w6Zi`iM!H-lK*MkVlcDTp**3@7C#YFCKxOa5NP5 zMVs=u1)NqEY@+rkbT5Ch%dbBSf0oEimxY#N&efpG0RHOSHXSnx>AYjStK0m+9fvNW z@0M|sr>I%^X;1R!6#gJ`kvpf_y|bX;3KPu|y50AYPJ(2nv$3J!O}V@P_ZoGs<7{D~ z3YR}R#d}r$g&xHhxqtH7loi&K!-&Vqj7QaV;HX&}Nd&RPbKbIQF#l0QseR4uZJX&> zUm^Ehn(CeJ)YYn|^fWOAa&&%V0;8v3?R`WGxAyw_l7pug;F(e#9kplHb111VGcV7= zDjfC~GR_p9>|(#}az8SBVI5u}(8zC6wy->w9Mk+j%fRk|LHeEtKEO_p2syS?4qpYT z_wVoBe;nk?b5V$!=4K01i@D()q2=oHT9HLxFG~+>fdw|Sb<-#$G*DDCnGbQ_ zgBiinYS-`oPSn0`vpQP!XO0m7G7cF(_;w4v?+FVDQ5SjuOr>HI4bz^KR^VTFfhIlV ze}Q$6=V-iLo+Kavc$DdldtyQ1=GQO!$)jf}{}uiLLfz#BXy!?~6zS`4Ywt3)0mj#) zMs!8Ovph$^wD0+a0NHPV)@O`s7!X;T6R&6JXRrO8{r8ttt*BkNIo{F$MQ5xLc6P0X JTxDt`V0qAgqggmO2eju zr_81^+N}SJNn|C%%&zc4<_?Vf=sYsrZjmNRjNxaI-e~j0UcUZm`l@)sSq~G4U8tnb z<2*WhLz9sbe*SzXSN15Im0m{pTuOZ$ebh|Af+zpOc?3=Vd(-{p1`WmoE< zng?}C(O0rg7K$$m%$c2SrrR%Dfn#pbxzJ^K3!{1rA9t5}a8DfQ)zN)>tS-4Qv3*FT z>pn?_R|S`!8dT~{Q!Bzrn%Q}m08hvhL0gbAoBwBj>=;HOD<6DoKKA!PBNbxfin;DmJ6w1MTe)qP{XKqb= z&9%UZaPE-ytpK%wIVsdK*8buYk0WYMzE*T}0-+Z% zcjQAj5_N!On8fI)|Hi^7jGr?(o1_0d3)j;7y^hKk*yMcsM#N6Mp2D1(WwojWwf$@3 zr)SG&Uzc$2>*2qyKyB>f)4NZHt5xn_MPxf*+_Ma(o9?8^AmZg*?SP2UVyV9NS#Vq9 zVHCF!539b#+jVMf0RH>A)HQ?OsqsijrnckQhC*LnZ%;*P-R{S>f&51&W9ZLPe#|fX z{)}|ak1hrLLn2_($^&_PVL1vKzj(w>4-^7KUF^77@e@xZrjmd5;kE}!0)uKy4`w;` z@@rXSG)i^Rvq2Ag)jX$Eo99)(1FryQht$+*zF$oacbyo>WQ1Eaqa#GK)*e$T6*y9C z;umuElx&bVQD6ui%(ujISNqJZSkg4#I~nkDFb;&)UgZ0PZdp1TCy?24Q1;HDtTwO% zAJL?5$g*geWFnJ(G{v@Oi_cB}=^>j2q(v6w&xsnJZb3bE^!&@5@~l0`CAhPXI}KIi zWC;CJ)j`f5$oHAHo4YDvz}+kD_shzU>$(+Yry_J0{#-d&@XZb&D}qwAW5#Xzqd=0^ zWJNt@jKvzi;+z_-vh^;Y7Qpdi%p~ppJ<^L0c6LW|VK0oy3}$22ZoG#XRoP1XbF{Z9 zMfX@x7){}U8SLlN8Z}EA?nQ@1zt`uP>W83)=uCG3(~938!a3)LhTa5xud==J-K6lO z*qKzB0mSnh4gJ?JQ7o<=VHTg-Z5PdCn76gxq2$Gpk@H19yB`*C>5{$nA%*s{p!Y{o zmg&TxE>5@6dFoQix@p5l!|X2Mnp-y_z^`rR!Mv2PI?e>!+Ar=((OW0lvojs|qJ-zz z)Q|Pw_^GrgQUrp!?HX4_jf(ihOSJcf?@J4as;&X{{DU)kwVIN?N#bh-j@zgMDfh0< z^m!r&L3igD&eLS0NKY&^SoFO+?^tOuC-N8Lg=&GWYvo8rjM+uc8NG7)g5(YJ84he( z?3C6F1Ac9n`sCU8b7}!{YDDOH=YGi!8>qBXPBwNP1-X|rtox)`HCWz4!j>=u_?){0dqG>Xff*7tp`py?7 z>P_HsO+zjLPo>H|PTZ4;vD_shqWt@h3;oTGZ=eb1a_c+jSZFz{YwyPw*KiSb*VjkF z(fL)v*r7lYM%1wLLJE+KhVhZ}FJt8zyxS^W+e#@A6VOiiglyWxwOPzIWFF74Qy4KJ z7OG}ECvL8n(HTepV(~owkV7Y8OuZ)F85YGS6u44Ec^fgUw#U3qeNuxSnx35Chfg6Y z?4iyxWOql^og?UxjJ}$~K!s5yPf%)(m2r-d?9Zk+5jY8d!ud*io*{MGD<~!PEdAyS zn1yxO)?O6qErNW-jk%??C8lWSsG#CH_ysydC2-!L58cHj&E#f#}A3{C&%K51m|K?6uV}+Dt zXXxl-$Vkj+*Tuq}oQ#Dme`Opf7{$nK!f%;cWmxG|?49}N_|+-HF&4e&=hGS=_~n|E z>nm1C^uDEG*%+WMUiO8r%t1P1IXBV~=I>O(VL;&UnCw@?uunLGH z``!|I9N}=wjimHC64R)%UtRI?*Pqu)jnmbM>vxo%x)^)dDZK_u`khs1-;ShR|7~65 z>~6xbUi{E+wZw0=&hJlM@g)?Ok1!ykV7E$8n-+F`^i&;L2B(lDSGo9GjF*~i)w7{1 zt!jGvT^_XX8=M{Mr=WKGboeAy1BDNeGjL$@Ccoc5m*1l{&Ma8!RcSi$VB+z~>cN%n zlD~gi{~24@FSTe&u!>)7P@1{ZvUU93tGKV0`FecyS=wT%eYY;qlV~AIWfJ>!Z$k0; z2kvhw%@eLNKgpt>-uFiUpo|7_H0q`?5|5AR9`-Il~z0q4~`SS$QmSx3Z9m?|l8Sp>dUki(hcE<4aiSmjXln?OWX5SB%)8xSvbb(T>dngfE$Vx9xmDXU&IY^@r^qfP2sy z+GVz%jZJn|!D-mk4ch7KccP@8H@1x>PvbJ-@SG}3+^ zP)TEqQcXiDVGMQv$yNc}Cv4SpeQ?z@EA9Wmya0lLQpDBm_cNY-jf3)RA6}>0@X~Qr-jFM-Q76NHnQPV-YK3S=Ji@$Ku5f0C-^JI zQ!J9_E1z$gXvixUjA;~$ilU{bH{*GGJ;k_kEJ`!uD1%#zWzkruuE@&Y3LMyxFO#T| z9e*g*d6vyGtKQe^0uqu0>+6a11liwj=*gry|L^yFo(NO+Zu<#C*Wz>Ar~=@D!4m3n zHK6U9Fu%=vvagzWFS42NpMhKk+{oyXzMUQ~Go2*|SGcll^+14#g(ENbC&lU4Il_gZ?u@#N$acClW8Z znRvWC2F@qn`FraJMc*w4Du~Hvm$L7%Lf?oTuFF+9KYG+Jj=iw{QZwH>OioKPvSbk9 zIiKi)Fx5=lus-aW!F>{1$B`{dMXfHc4mZC#FlCBtpBmwrY(7gq9E z^PZlrfPaOQ@-trl40S{c_NK&~B548P!)9j2!_diNxomv0=~X6FMXh7JK}PG_OLT&= zaTCudL5zoAEzg}SYyL)?_;q&-+jYS`3n9>QMX3g^{AUM_-`Ko+I&)NANZVx1;s|M- zcU>@x^hr(8&ZL)gO8W^=*p|gKeYK_&k1|U#vSw;MVD95hpdczi!WGrHS9|gPksBx; z>4MHKa5GRtyy0T#Zcu#Ay}Z9KcT=6McmiKog>puR`qXV36|RVvi9H_d>#w)^nxOIOHrz4==#a% zS6!?qz!s)UNBGNHmwZOzKfAPxNt9Y4?UQ!On3DwLwmi{UK$=0$`_kkT53SiwA+^a9 zzHCi}0*7{PZAiICUW7c$HbUMERBnw9Xj?oFazz85Gw^t`y7m{uga>0ZLcS%Bncf_L zo3m7s{`4tP7K`s^noM)`U0uAg*+`g@Kp|L7z_T`{5da8pFa&4kl1@DuJt3ZOXgW%V zpDAtbLD(iuaG5#6@1)zbGr&o}*Z9QlY^EFEun%a7>d!9W2YkdE@Fe`u%>g`bx$p$* zEi$UiZh%B)XPUNBjUHAz04^Md!}DV{j1W_<*2Lc&yt{wOYa*kc9M`IfC01G?b=3#HM_VB6QX6@{&^JmNIvh}S>b{XG6 z?wmjL?T~FzA&rD&6eQT4?aa{Cwpr`dCY=>9Na!!iv5TvHRdfYc{F@n>8PjZ*Z z6Z&Qw_U%L64+h95QvDAZ>cTVyL1~cR14}NeG$WiAKd<$z(q(h^L4yY|>$%)Qs|$Pi zXo^;R@byA8JS(Tx98Nzj%^+XOkE$e{^xFgxtB|X&yTi&;-loa4)R=9zSIgLZu72ZA zu{YCKMQ$9NO6j#v*WnGTg9K56)zU?6p^8eipYxbnKDkDR{KAze33EPB&oly0zbh@* z%R|#NFrf^7&Oq6cRqmA*ar0$ydcRKGRVw}GXd|1#j zzgk|@%b(VE43?JKJm{Zr4i~kKp_d8Qhw>d?+@z+V&iwBUA750klz^T9OICG=+3j9* zqFh9mn6ZM1zhTBa=P#zS6aF>W9VMUlg(^v2*>-D(k3MCx)qWpTVe#qp4r%rm=HinZ zNA>jgr%aZ0dIoPw2jxvU;-laCJ<8!89oUF!KI*`mb;H2v7rm0&_vFBEf}aUXP-yh= zpDuUEfHhuwjD+%?b$i!WE)2>*1eHQwM4g~MHQm4@<#$xt@7N)==p4fWOt7ZfK!L6Y_fwvg*4VAO zn_|+$8+0wt1f+paug-N!l9rl$R=yNAq685gt(hUFK@)iLkDIOLt_aJ_@KmrKYgeUo zoz{JKPGYdHp2a;N?_Ub_iU4Tk|B&8n4|av1&x|>_Ld|8?Z!Ql4`IvVB}qD7H4|KGPw zrLzGpGP%Ov!x_Va#2?N#A!SK0{-`kJVc2p?TD$n1*u#Lm^S`r_ z5A7+U4MMI97b%xL66BK);od!}eu#p29*V?D`5=ZAEY!pe*|Cpe@u%A;wTF;l1L1@% z41+VAFIe~bL$$=uR9|D~zHWrj5M|50UHeqj*~>;(3o2S#X`SpvCYM%i2Gwtpt9MKY zeD(tbVV{mSSXwpyU2Mi^)u+RWyo{yr*N#` zVbHtQ8JqW?`8yTF>pupe55+fh&~1$cm1VgQ)OQ~b-k`gZ#i31~p500HepOGz;#D8r z%#a~iv>rs4Nh-u=WoSlX8b?JnKm=ARw~V>*Am->e z&2v9U9o}bIm9^+q=^FT6{BV{YU;CTcB{R2S6dU}!jPki}Bu`v5XV>d?X?SysjI>U^ z6K?0E29S$XZ-r2rB?)6pcthhLEE0$T>t35dL_b$QbSS?;_ySA_lHQoj=8z02r*!`9gK$RnVfcM0hOk`9qYY8C!y5>B5H7wr8Fsw5EIg5U4MVmT!VZXu5DP(x z*3^L;M$M0`U-ljB-FvlIID`~h+!(>Lw0b4k{uwMHen^QN+92=OIk^aS*Z}QeGJ&hE z&4sTv9^g>L7k_iX@t@bggg8=VF2m+g-j7Y{vyE6gz#VBVsw!#7uzocV<2f%e5k$m? z%fd*hw{Q7q`6J)^DUPP)#+FU~e=%3Xg$;UGhCuiA*rU4pc+>VRM71I&G{ZcLTSG0# z`d;mm#!=OSJE!ne5>BSDXVANRJ-?6q`t)~`iw}>|68^kc+41Q{0trR-x%SY--;e*b zouE?NWrEblkDxHtXMYvEI@Y)s_fd ztz(zw&aQV4tM%%|w(C+-5Q3Dza4{ZShHaPS7kkKry-soLBmRT0+Xr~zocXwQ{bHWA zS;J!eHu4;EOC)A8Y(1h_2k{3)&cgX#fur#Fs7qWWC9xK%&ZTnCaotBLma1y7)q8;; znownJTW=t7Ml$;DxE5a60I*7w4rWh_dW{hYTHFjSjGcJviUqRd|a$a0?BwqQ&y- znoLV&3LRNG_}ko5;Ar0rX9*En5gTlLEtq``{l$Qc119m6tI_ z?P2ThFd-`}6vA4Fnga4B`llU(t%cNWF2_|NbY4EYX4>-wM1G zzbvgsaY2R)0#B4iE>={yJc@N9Fh}8}g`; z_sFE_1K^3FXaWX~w-=)`(%EzfAO3zAP7D04A7Do9z8`9{>vKM9T3(zfpldEeY zcl%?I<%~EhwGm(ajo`e9*aOKs_eW^?!AZ`WR9b)}>Vs}?C(<@;Dt|`U!%b9WD*VFp zPwo%|3V|o^t@smmLY=}Xykqt3E}f^}AJ(TH5;xRb!7Qzvciry$V-L*fnW8|(&Q@S0 z)VrFH=s{_rbNNF6d_kgV-FB=$43)et*~Kg^p;uV*Hb_wTjL-8kUHRcYqKe0atPBfk zX*HC2%eJ|T5CNl-XY0@1N>5?V+QkI%t*8RFzfp6W^!im5YV(L9Nx@kl$Oz-9ju-Om z|CML`Q%8^QEFa_Y3?CbqFO|DFckc-oiW5R8Xun}CHgvgtgR(Sx^UW9B!wyB-S-!94 zclwZwQ2!a&!#cCH)aEA~MLPVSdv?wk4$ln%O|81?WKYzn4F?QEh!kimxZv8k{P2<6BvEE<* zhFxKGj<3Glwk%RPLl9)KhA@QkgqCV@QEJl$f*2rKTJp)Y!#|-$%fk!}27(}E=IgYk z%SA@y#k!Gas(jU+mPDwOnY4d#?U=xyJ`V^yjri z@;ks+1WFm74n8hd(I%WLBzoabF~7Q2mPf)D6wmatp#kdE>Qk zU;nBqr7t@$(ohQii8;)%eT%|IggZS21@`TXI~eaY!Bt0LBM14nVaJVX<8*sz>2g;O zkND|Il@*zr7d~ZbB{o$YA7glZAMfCp6>FWSMiGC}8)kp4$ua?zhwNL@#}*veiE4w6 zc#0ti64#D&4g3O%g?!o#faZlWAkWq zZ9cJG@yyw?_iG8FDiA+W;=o#0%FY^gx`P-x_4%bU>*+I*2kU*Sj%_D~mfGLRp@7*ZmCKnvC%42no5y@a;;J6>e1OSkzdL3h*K ztJ{4#8roVa8+^!b<+WCaTY=%LI_9A>+iJAWcDa<&);M`ZTTB?!5KhA{EQwbJ!xBu2 zC|@u$cbfx24?<|91+(IrJ-3}%4bF}R*oV-a^yWr3?vc=rq?5q8>+%0H-haCR&&e5^F7g{W$hxPRrd zrroUf{2XgcLi*1oIbx^)_xIyBs`mKwHwjO8;O7uW{0WnNd8F0C6CUyH?n(6oF&K<% z8dUrI(kQx_SHXko_bq2uB&T&RN9$kYb-VX3Rer&T;>Zsf^tiXSwzic&;raA(-|aV- z2`*S^g12W;dM;O1od5GnTH=SuIT7MVP~IeFP_WkdWwl=YPC;+aT37Q0Zq<**@GeZ( zz7-}Otbai(uHh=fwvCz?GQ(w7Yc(%QYIMjsjwcMlHFqI9-3HopiTjqD`tDrVL+AKw z)o0PNygzSH(GSy`GLp6SC&}C(UpEA3ov}3;+NC diff --git a/nix/node-packages.nix b/nix/node-packages.nix index 918f1e0aee..1d2daca512 100644 --- a/nix/node-packages.nix +++ b/nix/node-packages.nix @@ -22,13 +22,22 @@ let sha512 = "UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw=="; }; }; - "@grpc/grpc-js-1.1.2" = { + "@grpc/grpc-js-1.1.7" = { name = "_at_grpc_slash_grpc-js"; packageName = "@grpc/grpc-js"; - version = "1.1.2"; + version = "1.1.7"; + src = fetchurl { + url = "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.1.7.tgz"; + sha512 = "EuxMstI0u778dp0nk6Fe3gHXYPeV6FYsWOe0/QFwxv1NQ6bc5Wl/0Yxa4xl9uBlKElL6AIxuASmSfu7KEJhqiw=="; + }; + }; + "@grpc/proto-loader-0.6.0-pre9" = { + name = "_at_grpc_slash_proto-loader"; + packageName = "@grpc/proto-loader"; + version = "0.6.0-pre9"; src = fetchurl { - url = "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.1.2.tgz"; - sha512 = "k2u86Bkm/3xrjUaSWeIyzXScBt/cC8uE7BznR0cpueQi11R33W6qfJdMrkrsmSHirp5likR55JSXUrcWG6ybHA=="; + url = "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.0-pre9.tgz"; + sha512 = "oM+LjpEjNzW5pNJjt4/hq1HYayNeQT+eGrOPABJnYHv7TyNPDNzkQ76rDYZF86X5swJOa4EujEMzQ9iiTdPgww=="; }; }; "@protobufjs/aspromise-1.1.2" = { @@ -175,6 +184,15 @@ let sha512 = "5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w=="; }; }; + "@types/node-12.12.62" = { + name = "_at_types_slash_node"; + packageName = "@types/node"; + version = "12.12.62"; + src = fetchurl { + url = "https://registry.npmjs.org/@types/node/-/node-12.12.62.tgz"; + sha512 = "qAfo81CsD7yQIM9mVyh6B/U47li5g7cfpVQEDMfQeF8pSZVwzbhwU3crc0qG4DmpsebpJPR49AKOExQyJ05Cpg=="; + }; + }; "@types/node-13.13.4" = { name = "_at_types_slash_node"; packageName = "@types/node"; @@ -229,6 +247,15 @@ let sha512 = "OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg=="; }; }; + "abort-controller-3.0.0" = { + name = "abort-controller"; + packageName = "abort-controller"; + version = "3.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz"; + sha512 = "h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg=="; + }; + }; "acorn-7.3.1" = { name = "acorn"; packageName = "acorn"; @@ -247,6 +274,15 @@ let sha512 = "HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ=="; }; }; + "agent-base-6.0.1" = { + name = "agent-base"; + packageName = "agent-base"; + version = "6.0.1"; + src = fetchurl { + url = "https://registry.npmjs.org/agent-base/-/agent-base-6.0.1.tgz"; + sha512 = "01q25QQDwLSsyfhrKbn8yuur+JNw0H+0Y4JiGIKd3z9aYk/w/2kxD/Upc+t2ZBBSUNff50VjPsSW2YxM8QYKVg=="; + }; + }; "ajv-6.12.2" = { name = "ajv"; packageName = "ajv"; @@ -301,6 +337,15 @@ let sha512 = "9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA=="; }; }; + "append-field-1.0.0" = { + name = "append-field"; + packageName = "append-field"; + version = "1.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz"; + sha1 = "1e3440e915f0b1203d23748e78edd7b9b5b43e56"; + }; + }; "argparse-1.0.10" = { name = "argparse"; packageName = "argparse"; @@ -310,6 +355,15 @@ let sha1 = "bcd6791ea5ae09725e17e5ad988134cd40b3d911"; }; }; + "arrify-2.0.1" = { + name = "arrify"; + packageName = "arrify"; + version = "2.0.1"; + src = fetchurl { + url = "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz"; + sha512 = "3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug=="; + }; + }; "astral-regex-1.0.0" = { name = "astral-regex"; packageName = "astral-regex"; @@ -319,6 +373,15 @@ let sha512 = "+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg=="; }; }; + "async-2.6.3" = { + name = "async"; + packageName = "async"; + version = "2.6.3"; + src = fetchurl { + url = "https://registry.npmjs.org/async/-/async-2.6.3.tgz"; + sha512 = "zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg=="; + }; + }; "async-lock-1.2.4" = { name = "async-lock"; packageName = "async-lock"; @@ -337,6 +400,15 @@ let sha512 = "fcQKOXUKMQc57JlmjBCHtkKNrfGpHyR7vu18RfuLfeTAf4hK9PgOadPR5cDrBQ682zasrLUhJFe7EKAHJOduDg=="; }; }; + "asynckit-0.4.0" = { + name = "asynckit"; + packageName = "asynckit"; + version = "0.4.0"; + src = fetchurl { + url = "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz"; + sha1 = "c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"; + }; + }; "auto-bind-proxy-1.0.1" = { name = "auto-bind-proxy"; packageName = "auto-bind-proxy"; @@ -373,6 +445,15 @@ let sha512 = "ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw=="; }; }; + "bignumber.js-9.0.0" = { + name = "bignumber.js"; + packageName = "bignumber.js"; + version = "9.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz"; + sha512 = "t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A=="; + }; + }; "bitset-5.0.3" = { name = "bitset"; packageName = "bitset"; @@ -382,6 +463,15 @@ let sha1 = "37ee70b2ff04208912bf124248d47e89d71eeb28"; }; }; + "bluebird-3.7.2" = { + name = "bluebird"; + packageName = "bluebird"; + version = "3.7.2"; + src = fetchurl { + url = "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz"; + sha512 = "XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg=="; + }; + }; "bn-1.0.1" = { name = "bn"; packageName = "bn"; @@ -391,6 +481,15 @@ let sha1 = "a153825e6b1eb2c2db7726149b047a07ce0a3bb3"; }; }; + "body-parser-1.18.2" = { + name = "body-parser"; + packageName = "body-parser"; + version = "1.18.2"; + src = fetchurl { + url = "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz"; + sha1 = "87678a19d84b47d859b83199bd59bce222b10454"; + }; + }; "brace-expansion-1.1.11" = { name = "brace-expansion"; packageName = "brace-expansion"; @@ -409,6 +508,42 @@ let sha512 = "/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw=="; }; }; + "buffer-equal-constant-time-1.0.1" = { + name = "buffer-equal-constant-time"; + packageName = "buffer-equal-constant-time"; + version = "1.0.1"; + src = fetchurl { + url = "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz"; + sha1 = "f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819"; + }; + }; + "buffer-from-1.1.1" = { + name = "buffer-from"; + packageName = "buffer-from"; + version = "1.1.1"; + src = fetchurl { + url = "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz"; + sha512 = "MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A=="; + }; + }; + "busboy-0.2.14" = { + name = "busboy"; + packageName = "busboy"; + version = "0.2.14"; + src = fetchurl { + url = "https://registry.npmjs.org/busboy/-/busboy-0.2.14.tgz"; + sha1 = "6c2a622efcf47c57bbbe1e2a9c37ad36c7925453"; + }; + }; + "bytes-3.0.0" = { + name = "bytes"; + packageName = "bytes"; + version = "3.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz"; + sha1 = "d32815404d689699f85a4ea4fa8755dd13a96048"; + }; + }; "bzip-deflate-1.0.0" = { name = "bzip-deflate"; packageName = "bzip-deflate"; @@ -427,6 +562,15 @@ let sha512 = "P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="; }; }; + "camelcase-5.3.1" = { + name = "camelcase"; + packageName = "camelcase"; + version = "5.3.1"; + src = fetchurl { + url = "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz"; + sha512 = "L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="; + }; + }; "chalk-2.4.1" = { name = "chalk"; packageName = "chalk"; @@ -454,6 +598,15 @@ let sha512 = "bLSptAy2P0s6hU4PzuIMKmMJJSE6gLXGH1cntDu7bWJUksvuM+7ReOK61mozULErYvP6a15rnYl0zFDef+pyPw=="; }; }; + "cliui-6.0.0" = { + name = "cliui"; + packageName = "cliui"; + version = "6.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz"; + sha512 = "t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ=="; + }; + }; "color-convert-1.9.3" = { name = "color-convert"; packageName = "color-convert"; @@ -490,6 +643,24 @@ let sha512 = "dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="; }; }; + "combined-stream-1.0.8" = { + name = "combined-stream"; + packageName = "combined-stream"; + version = "1.0.8"; + src = fetchurl { + url = "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz"; + sha512 = "FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg=="; + }; + }; + "commander-2.11.0" = { + name = "commander"; + packageName = "commander"; + version = "2.11.0"; + src = fetchurl { + url = "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz"; + sha512 = "b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ=="; + }; + }; "commander-2.17.1" = { name = "commander"; packageName = "commander"; @@ -499,6 +670,24 @@ let sha512 = "wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg=="; }; }; + "commander-2.20.3" = { + name = "commander"; + packageName = "commander"; + version = "2.20.3"; + src = fetchurl { + url = "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz"; + sha512 = "GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="; + }; + }; + "commander-4.1.1" = { + name = "commander"; + packageName = "commander"; + version = "4.1.1"; + src = fetchurl { + url = "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz"; + sha512 = "NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA=="; + }; + }; "commander-5.1.0" = { name = "commander"; packageName = "commander"; @@ -508,6 +697,15 @@ let sha512 = "P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg=="; }; }; + "component-emitter-1.2.1" = { + name = "component-emitter"; + packageName = "component-emitter"; + version = "1.2.1"; + src = fetchurl { + url = "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz"; + sha1 = "137918d6d78283f7df7a6b7c5a63e140e69425e6"; + }; + }; "concat-map-0.0.1" = { name = "concat-map"; packageName = "concat-map"; @@ -517,6 +715,15 @@ let sha1 = "d8a96bd77fd68df7793a73036a3ba0d5405d477b"; }; }; + "concat-stream-1.6.2" = { + name = "concat-stream"; + packageName = "concat-stream"; + version = "1.6.2"; + src = fetchurl { + url = "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz"; + sha1 = "904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34"; + }; + }; "configstore-5.0.1" = { name = "configstore"; packageName = "configstore"; @@ -526,6 +733,33 @@ let sha512 = "aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA=="; }; }; + "connect-3.7.0" = { + name = "connect"; + packageName = "connect"; + version = "3.7.0"; + src = fetchurl { + url = "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz"; + sha512 = "ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ=="; + }; + }; + "content-type-1.0.4" = { + name = "content-type"; + packageName = "content-type"; + version = "1.0.4"; + src = fetchurl { + url = "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz"; + sha512 = "hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="; + }; + }; + "cookiejar-2.1.2" = { + name = "cookiejar"; + packageName = "cookiejar"; + version = "2.1.2"; + src = fetchurl { + url = "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz"; + sha512 = "Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA=="; + }; + }; "core-js-2.5.7" = { name = "core-js"; packageName = "core-js"; @@ -535,6 +769,15 @@ let sha512 = "RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw=="; }; }; + "core-js-2.6.11" = { + name = "core-js"; + packageName = "core-js"; + version = "2.6.11"; + src = fetchurl { + url = "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz"; + sha512 = "5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg=="; + }; + }; "core-util-is-1.0.2" = { name = "core-util-is"; packageName = "core-util-is"; @@ -571,6 +814,24 @@ let sha512 = "v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA=="; }; }; + "debug-2.6.9" = { + name = "debug"; + packageName = "debug"; + version = "2.6.9"; + src = fetchurl { + url = "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz"; + sha1 = "5d128515df134ff327e90a4c93f4e077a536341f"; + }; + }; + "debug-3.2.6" = { + name = "debug"; + packageName = "debug"; + version = "3.2.6"; + src = fetchurl { + url = "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz"; + sha512 = "mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ=="; + }; + }; "debug-4.1.1" = { name = "debug"; packageName = "debug"; @@ -580,6 +841,24 @@ let sha512 = "pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw=="; }; }; + "debug-4.2.0" = { + name = "debug"; + packageName = "debug"; + version = "4.2.0"; + src = fetchurl { + url = "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz"; + sha512 = "IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg=="; + }; + }; + "decamelize-1.2.0" = { + name = "decamelize"; + packageName = "decamelize"; + version = "1.2.0"; + src = fetchurl { + url = "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz"; + sha1 = "f6534d15148269b20352e7bee26f501f9a191290"; + }; + }; "decompress-response-4.2.1" = { name = "decompress-response"; packageName = "decompress-response"; @@ -607,6 +886,51 @@ let sha1 = "b369d6fb5dbc13eecf524f91b070feedc357cf34"; }; }; + "delayed-stream-1.0.0" = { + name = "delayed-stream"; + packageName = "delayed-stream"; + version = "1.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz"; + sha1 = "df3ae199acadfb7d440aaae0b29e2272b24ec619"; + }; + }; + "depd-1.1.1" = { + name = "depd"; + packageName = "depd"; + version = "1.1.1"; + src = fetchurl { + url = "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz"; + sha1 = "5783b4e1c459f06fa5ca27f991f3d06e7a310359"; + }; + }; + "depd-1.1.2" = { + name = "depd"; + packageName = "depd"; + version = "1.1.2"; + src = fetchurl { + url = "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz"; + sha1 = "9bcd52e14c097763e749b274c4346ed2e560b5a9"; + }; + }; + "destroy-1.0.4" = { + name = "destroy"; + packageName = "destroy"; + version = "1.0.4"; + src = fetchurl { + url = "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz"; + sha1 = "978857442c44749e4206613e37946205826abd80"; + }; + }; + "dicer-0.2.5" = { + name = "dicer"; + packageName = "dicer"; + version = "0.2.5"; + src = fetchurl { + url = "https://registry.npmjs.org/dicer/-/dicer-0.2.5.tgz"; + sha1 = "5996c086bb33218c812c090bddc09cd12facb70f"; + }; + }; "diff3-0.0.3" = { name = "diff3"; packageName = "diff3"; @@ -643,6 +967,24 @@ let sha512 = "uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A=="; }; }; + "ecdsa-sig-formatter-1.0.11" = { + name = "ecdsa-sig-formatter"; + packageName = "ecdsa-sig-formatter"; + version = "1.0.11"; + src = fetchurl { + url = "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz"; + sha512 = "nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ=="; + }; + }; + "ee-first-1.1.1" = { + name = "ee-first"; + packageName = "ee-first"; + version = "1.1.1"; + src = fetchurl { + url = "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"; + sha1 = "590c61156b0ae2f4f0255732a158b266bc56b21d"; + }; + }; "emoji-regex-7.0.3" = { name = "emoji-regex"; packageName = "emoji-regex"; @@ -652,6 +994,33 @@ let sha512 = "CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA=="; }; }; + "emoji-regex-8.0.0" = { + name = "emoji-regex"; + packageName = "emoji-regex"; + version = "8.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz"; + sha512 = "MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="; + }; + }; + "encodeurl-1.0.2" = { + name = "encodeurl"; + packageName = "encodeurl"; + version = "1.0.2"; + src = fetchurl { + url = "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz"; + sha1 = "ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"; + }; + }; + "encoding-0.1.13" = { + name = "encoding"; + packageName = "encoding"; + version = "0.1.13"; + src = fetchurl { + url = "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz"; + sha512 = "ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A=="; + }; + }; "encryptedfs-1.0.2" = { name = "encryptedfs"; packageName = "encryptedfs"; @@ -679,6 +1048,15 @@ let sha1 = "4684d71779ad39af177e3f007996f7c67c852618"; }; }; + "escape-html-1.0.3" = { + name = "escape-html"; + packageName = "escape-html"; + version = "1.0.3"; + src = fetchurl { + url = "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz"; + sha1 = "0258eae4d3d0c0974de1c169188ef0051d1d1988"; + }; + }; "escape-string-regexp-1.0.5" = { name = "escape-string-regexp"; packageName = "escape-string-regexp"; @@ -814,6 +1192,24 @@ let sha1 = "0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"; }; }; + "etag-1.8.1" = { + name = "etag"; + packageName = "etag"; + version = "1.8.1"; + src = fetchurl { + url = "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz"; + sha1 = "41ae2eeb65efa62268aebfea83ac7d79299b0887"; + }; + }; + "event-target-shim-5.0.1" = { + name = "event-target-shim"; + packageName = "event-target-shim"; + version = "5.0.1"; + src = fetchurl { + url = "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz"; + sha512 = "i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="; + }; + }; "exit-on-epipe-1.0.1" = { name = "exit-on-epipe"; packageName = "exit-on-epipe"; @@ -823,6 +1219,15 @@ let sha512 = "h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw=="; }; }; + "extend-3.0.2" = { + name = "extend"; + packageName = "extend"; + version = "3.0.2"; + src = fetchurl { + url = "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz"; + sha512 = "fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="; + }; + }; "fast-deep-equal-3.1.1" = { name = "fast-deep-equal"; packageName = "fast-deep-equal"; @@ -859,6 +1264,15 @@ let sha1 = "3d8a5c66883a16a30ca8643e851f19baa7797917"; }; }; + "fast-text-encoding-1.0.3" = { + name = "fast-text-encoding"; + packageName = "fast-text-encoding"; + version = "1.0.3"; + src = fetchurl { + url = "https://registry.npmjs.org/fast-text-encoding/-/fast-text-encoding-1.0.3.tgz"; + sha512 = "dtm4QZH9nZtcDt8qJiOH9fcQd1NAgi+K1O2DbE6GG1PPCK/BWfOH3idCTRQ4ImXRUOyopDEgDEnVEE7Y/2Wrig=="; + }; + }; "file-entry-cache-5.0.1" = { name = "file-entry-cache"; packageName = "file-entry-cache"; @@ -868,6 +1282,24 @@ let sha512 = "bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g=="; }; }; + "finalhandler-1.1.2" = { + name = "finalhandler"; + packageName = "finalhandler"; + version = "1.1.2"; + src = fetchurl { + url = "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz"; + sha512 = "aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA=="; + }; + }; + "find-up-4.1.0" = { + name = "find-up"; + packageName = "find-up"; + version = "4.1.0"; + src = fetchurl { + url = "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz"; + sha512 = "PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw=="; + }; + }; "flat-cache-2.0.1" = { name = "flat-cache"; packageName = "flat-cache"; @@ -886,6 +1318,33 @@ let sha512 = "r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA=="; }; }; + "form-data-2.3.3" = { + name = "form-data"; + packageName = "form-data"; + version = "2.3.3"; + src = fetchurl { + url = "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz"; + sha512 = "1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ=="; + }; + }; + "formidable-1.2.2" = { + name = "formidable"; + packageName = "formidable"; + version = "1.2.2"; + src = fetchurl { + url = "https://registry.npmjs.org/formidable/-/formidable-1.2.2.tgz"; + sha512 = "V8gLm+41I/8kguQ4/o1D3RIHRmhYFG4pnNyonvua+40rqcEmT4+V71yaZ3B457xbbgCsCfjSPi65u/W6vK1U5Q=="; + }; + }; + "fresh-0.5.2" = { + name = "fresh"; + packageName = "fresh"; + version = "0.5.2"; + src = fetchurl { + url = "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz"; + sha1 = "3d8cadd90d976569fa835ab1f8e4b23a105605a7"; + }; + }; "fs.realpath-1.0.0" = { name = "fs.realpath"; packageName = "fs.realpath"; @@ -904,6 +1363,42 @@ let sha1 = "1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"; }; }; + "gaxios-3.2.0" = { + name = "gaxios"; + packageName = "gaxios"; + version = "3.2.0"; + src = fetchurl { + url = "https://registry.npmjs.org/gaxios/-/gaxios-3.2.0.tgz"; + sha512 = "+6WPeVzPvOshftpxJwRi2Ozez80tn/hdtOUag7+gajDHRJvAblKxTFSSMPtr2hmnLy7p0mvYz0rMXLBl8pSO7Q=="; + }; + }; + "gcp-metadata-4.2.0" = { + name = "gcp-metadata"; + packageName = "gcp-metadata"; + version = "4.2.0"; + src = fetchurl { + url = "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-4.2.0.tgz"; + sha512 = "vQZD57cQkqIA6YPGXM/zc+PIZfNRFdukWGsGZ5+LcJzesi5xp6Gn7a02wRJi4eXPyArNMIYpPET4QMxGqtlk6Q=="; + }; + }; + "get-caller-file-2.0.5" = { + name = "get-caller-file"; + packageName = "get-caller-file"; + version = "2.0.5"; + src = fetchurl { + url = "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz"; + sha512 = "DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="; + }; + }; + "get-port-5.1.1" = { + name = "get-port"; + packageName = "get-port"; + version = "5.1.1"; + src = fetchurl { + url = "https://registry.npmjs.org/get-port/-/get-port-5.1.1.tgz"; + sha512 = "g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ=="; + }; + }; "get-random-values-1.2.0" = { name = "get-random-values"; packageName = "get-random-values"; @@ -958,6 +1453,24 @@ let sha512 = "BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg=="; }; }; + "google-auth-library-6.0.6" = { + name = "google-auth-library"; + packageName = "google-auth-library"; + version = "6.0.6"; + src = fetchurl { + url = "https://registry.npmjs.org/google-auth-library/-/google-auth-library-6.0.6.tgz"; + sha512 = "fWYdRdg55HSJoRq9k568jJA1lrhg9i2xgfhVIMJbskUmbDpJGHsbv9l41DGhCDXM21F9Kn4kUwdysgxSYBYJUw=="; + }; + }; + "google-p12-pem-3.0.3" = { + name = "google-p12-pem"; + packageName = "google-p12-pem"; + version = "3.0.3"; + src = fetchurl { + url = "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-3.0.3.tgz"; + sha512 = "wS0ek4ZtFx/ACKYF3JhyGe5kzH7pgiQ7J5otlumqR9psmWMYc+U9cErKlCYVYHoUaidXHdZ2xbo34kB+S+24hA=="; + }; + }; "google-protobuf-4.0.0-rc.2" = { name = "google-protobuf"; packageName = "google-protobuf"; @@ -976,6 +1489,33 @@ let sha1 = "0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"; }; }; + "graphlib-2.1.8" = { + name = "graphlib"; + packageName = "graphlib"; + version = "2.1.8"; + src = fetchurl { + url = "https://registry.npmjs.org/graphlib/-/graphlib-2.1.8.tgz"; + sha512 = "jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A=="; + }; + }; + "graphql-15.3.0" = { + name = "graphql"; + packageName = "graphql"; + version = "15.3.0"; + src = fetchurl { + url = "https://registry.npmjs.org/graphql/-/graphql-15.3.0.tgz"; + sha512 = "GTCJtzJmkFLWRfFJuoo9RWWa/FfamUHgiFosxi/X1Ani4AVWbeyBenZTNX6dM+7WSbbFfTo/25eh0LLkwHMw2w=="; + }; + }; + "gtoken-5.0.3" = { + name = "gtoken"; + packageName = "gtoken"; + version = "5.0.3"; + src = fetchurl { + url = "https://registry.npmjs.org/gtoken/-/gtoken-5.0.3.tgz"; + sha512 = "Nyd1wZCMRc2dj/mAD0LlfQLcAO06uKdpKJXvK85SGrF5+5+Bpfil9u/2aw35ltvEHjvl0h5FMKN5knEU+9JrOg=="; + }; + }; "has-flag-3.0.0" = { name = "has-flag"; packageName = "has-flag"; @@ -994,6 +1534,42 @@ let sha512 = "EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="; }; }; + "http-errors-1.6.2" = { + name = "http-errors"; + packageName = "http-errors"; + version = "1.6.2"; + src = fetchurl { + url = "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz"; + sha1 = "0a002cc85707192a7e7946ceedc11155f60ec736"; + }; + }; + "http-errors-1.6.3" = { + name = "http-errors"; + packageName = "http-errors"; + version = "1.6.3"; + src = fetchurl { + url = "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz"; + sha1 = "8b55680bb4be283a0b5bf4ea2e38580be1d9320d"; + }; + }; + "http-errors-1.7.3" = { + name = "http-errors"; + packageName = "http-errors"; + version = "1.7.3"; + src = fetchurl { + url = "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz"; + sha512 = "ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw=="; + }; + }; + "https-proxy-agent-5.0.0" = { + name = "https-proxy-agent"; + packageName = "https-proxy-agent"; + version = "5.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz"; + sha512 = "EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA=="; + }; + }; "iced-error-0.0.13" = { name = "iced-error"; packageName = "iced-error"; @@ -1021,6 +1597,24 @@ let sha1 = "2d4f4fb999ab7aa5430b193c77a7fce4118319ce"; }; }; + "iconv-lite-0.4.19" = { + name = "iconv-lite"; + packageName = "iconv-lite"; + version = "0.4.19"; + src = fetchurl { + url = "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz"; + sha512 = "oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ=="; + }; + }; + "iconv-lite-0.6.2" = { + name = "iconv-lite"; + packageName = "iconv-lite"; + version = "0.6.2"; + src = fetchurl { + url = "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz"; + sha512 = "2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ=="; + }; + }; "ieee754-1.1.12" = { name = "ieee754"; packageName = "ieee754"; @@ -1084,10 +1678,19 @@ let sha1 = "633c2c83e3da42a502f52466022480f4208261de"; }; }; - "is-extglob-2.1.1" = { - name = "is-extglob"; - packageName = "is-extglob"; - version = "2.1.1"; + "inherits-2.0.4" = { + name = "inherits"; + packageName = "inherits"; + version = "2.0.4"; + src = fetchurl { + url = "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz"; + sha512 = "k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="; + }; + }; + "is-extglob-2.1.1" = { + name = "is-extglob"; + packageName = "is-extglob"; + version = "2.1.1"; src = fetchurl { url = "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz"; sha1 = "a88c02535791f02ed37c76a1b9ea9773c833f8c2"; @@ -1102,6 +1705,15 @@ let sha1 = "a3b30a5c4f199183167aaab93beefae3ddfb654f"; }; }; + "is-fullwidth-code-point-3.0.0" = { + name = "is-fullwidth-code-point"; + packageName = "is-fullwidth-code-point"; + version = "3.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz"; + sha512 = "zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="; + }; + }; "is-glob-4.0.1" = { name = "is-glob"; packageName = "is-glob"; @@ -1129,6 +1741,24 @@ let sha512 = "NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA=="; }; }; + "is-stream-1.1.0" = { + name = "is-stream"; + packageName = "is-stream"; + version = "1.1.0"; + src = fetchurl { + url = "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz"; + sha1 = "12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"; + }; + }; + "is-stream-2.0.0" = { + name = "is-stream"; + packageName = "is-stream"; + version = "2.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz"; + sha512 = "XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw=="; + }; + }; "is-typedarray-1.0.0" = { name = "is-typedarray"; packageName = "is-typedarray"; @@ -1138,6 +1768,15 @@ let sha1 = "e479c80858df0c1b11ddda6940f96011fcda4a9a"; }; }; + "isarray-0.0.1" = { + name = "isarray"; + packageName = "isarray"; + version = "0.0.1"; + src = fetchurl { + url = "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz"; + sha1 = "8a18acfca9a8f4177e09abfc6038939b05d1eedf"; + }; + }; "isarray-1.0.0" = { name = "isarray"; packageName = "isarray"; @@ -1183,6 +1822,24 @@ let sha512 = "/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A=="; }; }; + "json-bigint-1.0.0" = { + name = "json-bigint"; + packageName = "json-bigint"; + version = "1.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz"; + sha512 = "SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ=="; + }; + }; + "json-refs-3.0.15" = { + name = "json-refs"; + packageName = "json-refs"; + version = "3.0.15"; + src = fetchurl { + url = "https://registry.npmjs.org/json-refs/-/json-refs-3.0.15.tgz"; + sha512 = "0vOQd9eLNBL18EGl5yYaO44GhixmImes2wiYn9Z3sag3QnehWrYWlB9AFtMxCL2Bj3fyxgDYkxGFEU/chlYssw=="; + }; + }; "json-schema-traverse-0.4.1" = { name = "json-schema-traverse"; packageName = "json-schema-traverse"; @@ -1201,6 +1858,24 @@ let sha1 = "9db7b59496ad3f3cfef30a75142d2d930ad72651"; }; }; + "jwa-2.0.0" = { + name = "jwa"; + packageName = "jwa"; + version = "2.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz"; + sha512 = "jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA=="; + }; + }; + "jws-4.0.0" = { + name = "jws"; + packageName = "jws"; + version = "4.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz"; + sha512 = "KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg=="; + }; + }; "kbpgp-2.0.82" = { name = "kbpgp"; packageName = "kbpgp"; @@ -1237,6 +1912,15 @@ let sha512 = "+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ=="; }; }; + "locate-path-5.0.0" = { + name = "locate-path"; + packageName = "locate-path"; + version = "5.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz"; + sha512 = "t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g=="; + }; + }; "lodash-4.17.15" = { name = "lodash"; packageName = "lodash"; @@ -1255,6 +1939,294 @@ let sha512 = "JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ=="; }; }; + "lodash-4.17.20" = { + name = "lodash"; + packageName = "lodash"; + version = "4.17.20"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz"; + sha512 = "PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA=="; + }; + }; + "lodash-4.17.5" = { + name = "lodash"; + packageName = "lodash"; + version = "4.17.5"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz"; + sha512 = "svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw=="; + }; + }; + "lodash._arraypool-2.4.1" = { + name = "lodash._arraypool"; + packageName = "lodash._arraypool"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash._arraypool/-/lodash._arraypool-2.4.1.tgz"; + sha1 = "e88eecb92e2bb84c9065612fd958a0719cd47f94"; + }; + }; + "lodash._basebind-2.4.1" = { + name = "lodash._basebind"; + packageName = "lodash._basebind"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash._basebind/-/lodash._basebind-2.4.1.tgz"; + sha1 = "e940b9ebdd27c327e0a8dab1b55916c5341e9575"; + }; + }; + "lodash._baseclone-2.4.1" = { + name = "lodash._baseclone"; + packageName = "lodash._baseclone"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash._baseclone/-/lodash._baseclone-2.4.1.tgz"; + sha1 = "30f823e57e17e3735d383bd62b60b387543b4186"; + }; + }; + "lodash._basecreate-2.4.1" = { + name = "lodash._basecreate"; + packageName = "lodash._basecreate"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-2.4.1.tgz"; + sha1 = "f8e6f5b578a9e34e541179b56b8eeebf4a287e08"; + }; + }; + "lodash._basecreatecallback-2.4.1" = { + name = "lodash._basecreatecallback"; + packageName = "lodash._basecreatecallback"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash._basecreatecallback/-/lodash._basecreatecallback-2.4.1.tgz"; + sha1 = "7d0b267649cb29e7a139d0103b7c11fae84e4851"; + }; + }; + "lodash._basecreatewrapper-2.4.1" = { + name = "lodash._basecreatewrapper"; + packageName = "lodash._basecreatewrapper"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash._basecreatewrapper/-/lodash._basecreatewrapper-2.4.1.tgz"; + sha1 = "4d31f2e7de7e134fbf2803762b8150b32519666f"; + }; + }; + "lodash._createwrapper-2.4.1" = { + name = "lodash._createwrapper"; + packageName = "lodash._createwrapper"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash._createwrapper/-/lodash._createwrapper-2.4.1.tgz"; + sha1 = "51d6957973da4ed556e37290d8c1a18c53de1607"; + }; + }; + "lodash._getarray-2.4.1" = { + name = "lodash._getarray"; + packageName = "lodash._getarray"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash._getarray/-/lodash._getarray-2.4.1.tgz"; + sha1 = "faf1f7f810fa985a251c2187404481094839e5ee"; + }; + }; + "lodash._isnative-2.4.1" = { + name = "lodash._isnative"; + packageName = "lodash._isnative"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz"; + sha1 = "3ea6404b784a7be836c7b57580e1cdf79b14832c"; + }; + }; + "lodash._maxpoolsize-2.4.1" = { + name = "lodash._maxpoolsize"; + packageName = "lodash._maxpoolsize"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash._maxpoolsize/-/lodash._maxpoolsize-2.4.1.tgz"; + sha1 = "9d482f463b8e66afbe59c2c14edb117060172334"; + }; + }; + "lodash._objecttypes-2.4.1" = { + name = "lodash._objecttypes"; + packageName = "lodash._objecttypes"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz"; + sha1 = "7c0b7f69d98a1f76529f890b0cdb1b4dfec11c11"; + }; + }; + "lodash._releasearray-2.4.1" = { + name = "lodash._releasearray"; + packageName = "lodash._releasearray"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash._releasearray/-/lodash._releasearray-2.4.1.tgz"; + sha1 = "a6139630d76d1536b07ddc80962889b082f6a641"; + }; + }; + "lodash._setbinddata-2.4.1" = { + name = "lodash._setbinddata"; + packageName = "lodash._setbinddata"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash._setbinddata/-/lodash._setbinddata-2.4.1.tgz"; + sha1 = "f7c200cd1b92ef236b399eecf73c648d17aa94d2"; + }; + }; + "lodash._shimkeys-2.4.1" = { + name = "lodash._shimkeys"; + packageName = "lodash._shimkeys"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz"; + sha1 = "6e9cc9666ff081f0b5a6c978b83e242e6949d203"; + }; + }; + "lodash._slice-2.4.1" = { + name = "lodash._slice"; + packageName = "lodash._slice"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash._slice/-/lodash._slice-2.4.1.tgz"; + sha1 = "745cf41a53597b18f688898544405efa2b06d90f"; + }; + }; + "lodash.assign-2.4.1" = { + name = "lodash.assign"; + packageName = "lodash.assign"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash.assign/-/lodash.assign-2.4.1.tgz"; + sha1 = "84c39596dd71181a97b0652913a7c9675e49b1aa"; + }; + }; + "lodash.bind-2.4.1" = { + name = "lodash.bind"; + packageName = "lodash.bind"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash.bind/-/lodash.bind-2.4.1.tgz"; + sha1 = "5d19fa005c8c4d236faf4742c7b7a1fcabe29267"; + }; + }; + "lodash.camelcase-4.3.0" = { + name = "lodash.camelcase"; + packageName = "lodash.camelcase"; + version = "4.3.0"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz"; + sha1 = "b28aa6288a2b9fc651035c7711f65ab6190331a6"; + }; + }; + "lodash.clonedeep-2.4.1" = { + name = "lodash.clonedeep"; + packageName = "lodash.clonedeep"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-2.4.1.tgz"; + sha1 = "f29203b40b12fee0a45d3631648259bebabc7868"; + }; + }; + "lodash.foreach-2.4.1" = { + name = "lodash.foreach"; + packageName = "lodash.foreach"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-2.4.1.tgz"; + sha1 = "fe3fc3a34c86c94cab6f9522560282741e016309"; + }; + }; + "lodash.forown-2.4.1" = { + name = "lodash.forown"; + packageName = "lodash.forown"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash.forown/-/lodash.forown-2.4.1.tgz"; + sha1 = "78b41eafe1405fa966459ea4193fd502d084524b"; + }; + }; + "lodash.get-4.4.2" = { + name = "lodash.get"; + packageName = "lodash.get"; + version = "4.4.2"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz"; + sha1 = "2d177f652fa31e939b4438d5341499dfa3825e99"; + }; + }; + "lodash.identity-2.4.1" = { + name = "lodash.identity"; + packageName = "lodash.identity"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash.identity/-/lodash.identity-2.4.1.tgz"; + sha1 = "6694cffa65fef931f7c31ce86c74597cf560f4f1"; + }; + }; + "lodash.isarray-2.4.1" = { + name = "lodash.isarray"; + packageName = "lodash.isarray"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-2.4.1.tgz"; + sha1 = "b52a326c1f62f6d7da73a31d5401df6ef44f0fa1"; + }; + }; + "lodash.isequal-4.5.0" = { + name = "lodash.isequal"; + packageName = "lodash.isequal"; + version = "4.5.0"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz"; + sha1 = "415c4478f2bcc30120c22ce10ed3226f7d3e18e0"; + }; + }; + "lodash.isfunction-2.4.1" = { + name = "lodash.isfunction"; + packageName = "lodash.isfunction"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-2.4.1.tgz"; + sha1 = "2cfd575c73e498ab57e319b77fa02adef13a94d1"; + }; + }; + "lodash.isobject-2.4.1" = { + name = "lodash.isobject"; + packageName = "lodash.isobject"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-2.4.1.tgz"; + sha1 = "5a2e47fe69953f1ee631a7eba1fe64d2d06558f5"; + }; + }; + "lodash.keys-2.4.1" = { + name = "lodash.keys"; + packageName = "lodash.keys"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz"; + sha1 = "48dea46df8ff7632b10d706b8acb26591e2b3727"; + }; + }; + "lodash.noop-2.4.1" = { + name = "lodash.noop"; + packageName = "lodash.noop"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash.noop/-/lodash.noop-2.4.1.tgz"; + sha1 = "4fb54f816652e5ae10e8f72f717a388c7326538a"; + }; + }; + "lodash.support-2.4.1" = { + name = "lodash.support"; + packageName = "lodash.support"; + version = "2.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/lodash.support/-/lodash.support-2.4.1.tgz"; + sha1 = "320e0b67031673c28d7a2bb5d9e0331a45240515"; + }; + }; "long-4.0.0" = { name = "long"; packageName = "long"; @@ -1264,6 +2236,15 @@ let sha512 = "XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="; }; }; + "lru-cache-6.0.0" = { + name = "lru-cache"; + packageName = "lru-cache"; + version = "6.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz"; + sha512 = "Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA=="; + }; + }; "make-dir-3.1.0" = { name = "make-dir"; packageName = "make-dir"; @@ -1273,6 +2254,60 @@ let sha512 = "g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw=="; }; }; + "media-typer-0.3.0" = { + name = "media-typer"; + packageName = "media-typer"; + version = "0.3.0"; + src = fetchurl { + url = "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"; + sha1 = "8710d7af0aa626f8fffa1ce00168545263255748"; + }; + }; + "methods-1.1.2" = { + name = "methods"; + packageName = "methods"; + version = "1.1.2"; + src = fetchurl { + url = "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz"; + sha1 = "5529a4d67654134edcc5266656835b0f851afcee"; + }; + }; + "mime-1.6.0" = { + name = "mime"; + packageName = "mime"; + version = "1.6.0"; + src = fetchurl { + url = "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz"; + sha512 = "x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="; + }; + }; + "mime-2.3.1" = { + name = "mime"; + packageName = "mime"; + version = "2.3.1"; + src = fetchurl { + url = "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz"; + sha1 = "b1621c54d63b97c47d3cfe7f7215f7d64517c369"; + }; + }; + "mime-db-1.44.0" = { + name = "mime-db"; + packageName = "mime-db"; + version = "1.44.0"; + src = fetchurl { + url = "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz"; + sha512 = "/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg=="; + }; + }; + "mime-types-2.1.27" = { + name = "mime-types"; + packageName = "mime-types"; + version = "2.1.27"; + src = fetchurl { + url = "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz"; + sha512 = "JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w=="; + }; + }; "mimic-response-2.1.0" = { name = "mimic-response"; packageName = "mimic-response"; @@ -1354,6 +2389,24 @@ let sha1 = "67bfc6f7a86f26fbc37aac83fd46d88c61d109b5"; }; }; + "ms-2.0.0" = { + name = "ms"; + packageName = "ms"; + version = "2.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"; + sha1 = "5608aeadfc00be6c2901df5f9861788de0d597c8"; + }; + }; + "ms-2.1.1" = { + name = "ms"; + packageName = "ms"; + version = "2.1.1"; + src = fetchurl { + url = "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz"; + sha512 = "tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="; + }; + }; "ms-2.1.2" = { name = "ms"; packageName = "ms"; @@ -1363,6 +2416,24 @@ let sha512 = "sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="; }; }; + "multer-1.4.2" = { + name = "multer"; + packageName = "multer"; + version = "1.4.2"; + src = fetchurl { + url = "https://registry.npmjs.org/multer/-/multer-1.4.2.tgz"; + sha512 = "xY8pX7V+ybyUpbYMxtjM9KAiD9ixtg5/JkeKUTD6xilfDv0vzzOFcCp4Ljb1UU3tSOM3VTZtKo63OmzOrGi3Cg=="; + }; + }; + "native-promise-only-0.8.1" = { + name = "native-promise-only"; + packageName = "native-promise-only"; + version = "0.8.1"; + src = fetchurl { + url = "https://registry.npmjs.org/native-promise-only/-/native-promise-only-0.8.1.tgz"; + sha1 = "20a318c30cb45f71fe7adfbf7b21c99c1472ef11"; + }; + }; "natural-compare-1.4.0" = { name = "natural-compare"; packageName = "natural-compare"; @@ -1372,13 +2443,49 @@ let sha1 = "4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"; }; }; - "node-forge-0.9.1" = { + "node-fetch-1.7.3" = { + name = "node-fetch"; + packageName = "node-fetch"; + version = "1.7.3"; + src = fetchurl { + url = "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz"; + sha512 = "NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ=="; + }; + }; + "node-fetch-2.6.1" = { + name = "node-fetch"; + packageName = "node-fetch"; + version = "2.6.1"; + src = fetchurl { + url = "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz"; + sha512 = "V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw=="; + }; + }; + "node-forge-0.10.0" = { name = "node-forge"; packageName = "node-forge"; - version = "0.9.1"; + version = "0.10.0"; + src = fetchurl { + url = "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz"; + sha512 = "PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA=="; + }; + }; + "node-forge-0.9.2" = { + name = "node-forge"; + packageName = "node-forge"; + version = "0.9.2"; + src = fetchurl { + url = "https://registry.npmjs.org/node-forge/-/node-forge-0.9.2.tgz"; + sha512 = "naKSScof4Wn+aoHU6HBsifh92Zeicm1GDQKd1vp3Y/kOi8ub0DozCa9KpvYNCXslFHYRmLNiqRopGdTGwNLpNw=="; + }; + }; + "object-assign-4.1.1" = { + name = "object-assign"; + packageName = "object-assign"; + version = "4.1.1"; src = fetchurl { - url = "https://registry.npmjs.org/node-forge/-/node-forge-0.9.1.tgz"; - sha512 = "G6RlQt5Sb4GMBzXvhfkeFmbqR6MzhtnT7VTHuLadjkii3rdYHNdw0m8zA4BTxVIh68FicCQ2NSUANpsqkr9jvQ=="; + url = "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz"; + sha1 = "2109adc7965887cfc05cbbd442cac8bfbb360863"; }; }; "observable-fns-0.5.1" = { @@ -1390,6 +2497,15 @@ let sha512 = "wf7g4Jpo1Wt2KIqZKLGeiuLOEMqpaOZ5gJn7DmSdqXgTdxRwSdBhWegQQpPteQ2gZvzCKqNNpwb853wcpA0j7A=="; }; }; + "on-finished-2.3.0" = { + name = "on-finished"; + packageName = "on-finished"; + version = "2.3.0"; + src = fetchurl { + url = "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz"; + sha1 = "20f1336481b083cd75337992a16971aa2d906947"; + }; + }; "once-1.4.0" = { name = "once"; packageName = "once"; @@ -1408,6 +2524,33 @@ let sha512 = "74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw=="; }; }; + "p-limit-2.3.0" = { + name = "p-limit"; + packageName = "p-limit"; + version = "2.3.0"; + src = fetchurl { + url = "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz"; + sha512 = "//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w=="; + }; + }; + "p-locate-4.1.0" = { + name = "p-locate"; + packageName = "p-locate"; + version = "4.1.0"; + src = fetchurl { + url = "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz"; + sha512 = "R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A=="; + }; + }; + "p-try-2.2.0" = { + name = "p-try"; + packageName = "p-try"; + version = "2.2.0"; + src = fetchurl { + url = "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz"; + sha512 = "R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="; + }; + }; "pako-1.0.11" = { name = "pako"; packageName = "pako"; @@ -1426,6 +2569,24 @@ let sha512 = "GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g=="; }; }; + "parseurl-1.3.3" = { + name = "parseurl"; + packageName = "parseurl"; + version = "1.3.3"; + src = fetchurl { + url = "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz"; + sha512 = "CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="; + }; + }; + "path-exists-4.0.0" = { + name = "path-exists"; + packageName = "path-exists"; + version = "4.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz"; + sha512 = "ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="; + }; + }; "path-is-absolute-1.0.1" = { name = "path-is-absolute"; packageName = "path-is-absolute"; @@ -1444,6 +2605,24 @@ let sha512 = "ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="; }; }; + "path-loader-1.0.10" = { + name = "path-loader"; + packageName = "path-loader"; + version = "1.0.10"; + src = fetchurl { + url = "https://registry.npmjs.org/path-loader/-/path-loader-1.0.10.tgz"; + sha512 = "CMP0v6S6z8PHeJ6NFVyVJm6WyJjIwFvyz2b0n2/4bKdS/0uZa/9sKUlYZzubrn3zuDRU0zIuEDX9DZYQ2ZI8TA=="; + }; + }; + "path-to-regexp-2.4.0" = { + name = "path-to-regexp"; + packageName = "path-to-regexp"; + version = "2.4.0"; + src = fetchurl { + url = "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.4.0.tgz"; + sha512 = "G6zHoVqC6GGTQkZwF4lkuEyMbVOjoBKAEybQUypI1WTkqinCOrq2x6U2+phkJ1XsEMTy4LjtwPI7HW+NVrRR2w=="; + }; + }; "permaproxy-0.0.2" = { name = "permaproxy"; packageName = "permaproxy"; @@ -1471,6 +2650,15 @@ let sha512 = "uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g=="; }; }; + "portable-fetch-3.0.0" = { + name = "portable-fetch"; + packageName = "portable-fetch"; + version = "3.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/portable-fetch/-/portable-fetch-3.0.0.tgz"; + sha1 = "3cbf4aa6dbc5a5734b41c0419c9273313bfd9ad8"; + }; + }; "prelude-ls-1.2.1" = { name = "prelude-ls"; packageName = "prelude-ls"; @@ -1579,6 +2767,51 @@ let sha1 = "086282fd939285f58664ba9a9bba31cdb165ccd2"; }; }; + "qs-6.5.1" = { + name = "qs"; + packageName = "qs"; + version = "6.5.1"; + src = fetchurl { + url = "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz"; + sha512 = "eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A=="; + }; + }; + "qs-6.5.2" = { + name = "qs"; + packageName = "qs"; + version = "6.5.2"; + src = fetchurl { + url = "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz"; + sha1 = "cb3ae806e8740444584ef154ce8ee98d403f3e36"; + }; + }; + "range-parser-1.2.1" = { + name = "range-parser"; + packageName = "range-parser"; + version = "1.2.1"; + src = fetchurl { + url = "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz"; + sha512 = "Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="; + }; + }; + "raw-body-2.3.2" = { + name = "raw-body"; + packageName = "raw-body"; + version = "2.3.2"; + src = fetchurl { + url = "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz"; + sha1 = "bcd60c77d3eb93cde0050295c3f379389bc88f89"; + }; + }; + "readable-stream-1.1.14" = { + name = "readable-stream"; + packageName = "readable-stream"; + version = "1.1.14"; + src = fetchurl { + url = "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz"; + sha1 = "7cf4c54ef648e3813084c636dd2079e166c081d9"; + }; + }; "readable-stream-2.3.6" = { name = "readable-stream"; packageName = "readable-stream"; @@ -1588,6 +2821,15 @@ let sha512 = "tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw=="; }; }; + "readable-stream-2.3.7" = { + name = "readable-stream"; + packageName = "readable-stream"; + version = "2.3.7"; + src = fetchurl { + url = "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz"; + sha512 = "Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw=="; + }; + }; "readable-stream-3.6.0" = { name = "readable-stream"; packageName = "readable-stream"; @@ -1615,6 +2857,24 @@ let sha512 = "ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q=="; }; }; + "require-directory-2.1.1" = { + name = "require-directory"; + packageName = "require-directory"; + version = "2.1.1"; + src = fetchurl { + url = "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz"; + sha1 = "8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"; + }; + }; + "require-main-filename-2.0.0" = { + name = "require-main-filename"; + packageName = "require-main-filename"; + version = "2.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz"; + sha512 = "NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg=="; + }; + }; "resolve-from-4.0.0" = { name = "resolve-from"; packageName = "resolve-from"; @@ -1660,6 +2920,15 @@ let sha512 = "rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="; }; }; + "safer-buffer-2.1.2" = { + name = "safer-buffer"; + packageName = "safer-buffer"; + version = "2.1.2"; + src = fetchurl { + url = "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz"; + sha512 = "YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="; + }; + }; "secure-random-bytes-1.0.1" = { name = "secure-random-bytes"; packageName = "secure-random-bytes"; @@ -1696,6 +2965,60 @@ let sha512 = "OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ=="; }; }; + "send-0.17.1" = { + name = "send"; + packageName = "send"; + version = "0.17.1"; + src = fetchurl { + url = "https://registry.npmjs.org/send/-/send-0.17.1.tgz"; + sha512 = "BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg=="; + }; + }; + "serve-static-1.14.1" = { + name = "serve-static"; + packageName = "serve-static"; + version = "1.14.1"; + src = fetchurl { + url = "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz"; + sha512 = "JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg=="; + }; + }; + "set-blocking-2.0.0" = { + name = "set-blocking"; + packageName = "set-blocking"; + version = "2.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz"; + sha1 = "045f9782d011ae9a6803ddd382b24392b3d890f7"; + }; + }; + "setprototypeof-1.0.3" = { + name = "setprototypeof"; + packageName = "setprototypeof"; + version = "1.0.3"; + src = fetchurl { + url = "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz"; + sha1 = "66567e37043eeb4f04d91bd658c0cbefb55b8e04"; + }; + }; + "setprototypeof-1.1.0" = { + name = "setprototypeof"; + packageName = "setprototypeof"; + version = "1.1.0"; + src = fetchurl { + url = "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz"; + sha512 = "BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ=="; + }; + }; + "setprototypeof-1.1.1" = { + name = "setprototypeof"; + packageName = "setprototypeof"; + version = "1.1.1"; + src = fetchurl { + url = "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz"; + sha512 = "JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw=="; + }; + }; "sha.js-2.4.11" = { name = "sha.js"; packageName = "sha.js"; @@ -1750,6 +3073,15 @@ let sha512 = "bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA=="; }; }; + "slash-3.0.0" = { + name = "slash"; + packageName = "slash"; + version = "3.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz"; + sha512 = "g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q=="; + }; + }; "slice-ansi-2.1.0" = { name = "slice-ansi"; packageName = "slice-ansi"; @@ -1768,6 +3100,15 @@ let sha512 = "UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="; }; }; + "spark-md5-3.0.1" = { + name = "spark-md5"; + packageName = "spark-md5"; + version = "3.0.1"; + src = fetchurl { + url = "https://registry.npmjs.org/spark-md5/-/spark-md5-3.0.1.tgz"; + sha512 = "0tF3AGSD1ppQeuffsLDIOWlKUd3lS92tFxcsrh5Pe3ZphhnoK+oXIBTzOAThZCiuINZLvpiLH/1VS1/ANEJVig=="; + }; + }; "sprintf-js-1.0.3" = { name = "sprintf-js"; packageName = "sprintf-js"; @@ -1777,6 +3118,24 @@ let sha1 = "04e6926f662895354f3dd015203633b857297e2c"; }; }; + "statuses-1.5.0" = { + name = "statuses"; + packageName = "statuses"; + version = "1.5.0"; + src = fetchurl { + url = "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz"; + sha1 = "161c7dac177659fd9811f43771fa99381478628c"; + }; + }; + "streamsearch-0.1.2" = { + name = "streamsearch"; + packageName = "streamsearch"; + version = "0.1.2"; + src = fetchurl { + url = "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz"; + sha1 = "808b9d0e56fc273d809ba57338e929919a1a9f1a"; + }; + }; "string-width-3.1.0" = { name = "string-width"; packageName = "string-width"; @@ -1786,6 +3145,24 @@ let sha512 = "vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w=="; }; }; + "string-width-4.2.0" = { + name = "string-width"; + packageName = "string-width"; + version = "4.2.0"; + src = fetchurl { + url = "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz"; + sha512 = "zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg=="; + }; + }; + "string_decoder-0.10.31" = { + name = "string_decoder"; + packageName = "string_decoder"; + version = "0.10.31"; + src = fetchurl { + url = "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz"; + sha1 = "62e203bc41766c6c28c9fc84301dab1c5310fa94"; + }; + }; "string_decoder-1.1.1" = { name = "string_decoder"; packageName = "string_decoder"; @@ -1831,6 +3208,15 @@ let sha512 = "e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w=="; }; }; + "superagent-3.8.3" = { + name = "superagent"; + packageName = "superagent"; + version = "3.8.3"; + src = fetchurl { + url = "https://registry.npmjs.org/superagent/-/superagent-3.8.3.tgz"; + sha512 = "GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA=="; + }; + }; "supports-color-5.5.0" = { name = "supports-color"; packageName = "supports-color"; @@ -1849,6 +3235,24 @@ let sha512 = "oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g=="; }; }; + "swagger-converter-0.1.7" = { + name = "swagger-converter"; + packageName = "swagger-converter"; + version = "0.1.7"; + src = fetchurl { + url = "https://registry.npmjs.org/swagger-converter/-/swagger-converter-0.1.7.tgz"; + sha1 = "a097519c6f1ee4dd67e308d9b53ddc9c2b257f97"; + }; + }; + "swagger-tools-0.10.4" = { + name = "swagger-tools"; + packageName = "swagger-tools"; + version = "0.10.4"; + src = fetchurl { + url = "https://registry.npmjs.org/swagger-tools/-/swagger-tools-0.10.4.tgz"; + sha512 = "VQpijIi8cpB/frUZOZlVpS7U3CrdSAZBfiHu448R1njiNXUnE7heF3Svz3qFBr5SYtaPvaqWpHMbvboirCXVzA=="; + }; + }; "symbol-observable-1.2.0" = { name = "symbol-observable"; packageName = "symbol-observable"; @@ -1903,6 +3307,24 @@ let sha512 = "pJ70wq5EAqTAEl9IkGzA+fN0836rycEuz2Cn6yeZ6FRzlVS5IDOkFHpIoEsksPRQV34GDqXm65+OlnZqUSyK2g=="; }; }; + "toidentifier-1.0.0" = { + name = "toidentifier"; + packageName = "toidentifier"; + version = "1.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz"; + sha512 = "yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="; + }; + }; + "traverse-0.6.6" = { + name = "traverse"; + packageName = "traverse"; + version = "0.6.6"; + src = fetchurl { + url = "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz"; + sha1 = "cbdf560fd7b9af632502fed40f918c157ea97137"; + }; + }; "triplesec-3.0.27" = { name = "triplesec"; packageName = "triplesec"; @@ -1966,6 +3388,24 @@ let sha512 = "4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA=="; }; }; + "type-is-1.6.18" = { + name = "type-is"; + packageName = "type-is"; + version = "1.6.18"; + src = fetchurl { + url = "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz"; + sha512 = "TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g=="; + }; + }; + "typedarray-0.0.6" = { + name = "typedarray"; + packageName = "typedarray"; + version = "0.0.6"; + src = fetchurl { + url = "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz"; + sha1 = "867ac74e3864187b1d3d47d996a78ec5c8830777"; + }; + }; "typedarray-to-buffer-3.1.5" = { name = "typedarray-to-buffer"; packageName = "typedarray-to-buffer"; @@ -2002,6 +3442,15 @@ let sha512 = "uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg=="; }; }; + "unpipe-1.0.0" = { + name = "unpipe"; + packageName = "unpipe"; + version = "1.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"; + sha1 = "b2bf4ee8514aae6165b4817829d21b2ef49904ec"; + }; + }; "uri-js-4.2.2" = { name = "uri-js"; packageName = "uri-js"; @@ -2020,6 +3469,15 @@ let sha1 = "450d4dc9fa70de732762fbd2d4a28981419a0ccf"; }; }; + "utils-merge-1.0.1" = { + name = "utils-merge"; + packageName = "utils-merge"; + version = "1.0.1"; + src = fetchurl { + url = "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz"; + sha1 = "9f95710f50a267947b2ccc124741c1028427e713"; + }; + }; "v8-compile-cache-2.0.3" = { name = "v8-compile-cache"; packageName = "v8-compile-cache"; @@ -2029,6 +3487,15 @@ let sha512 = "CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w=="; }; }; + "validator-10.11.0" = { + name = "validator"; + packageName = "validator"; + version = "10.11.0"; + src = fetchurl { + url = "https://registry.npmjs.org/validator/-/validator-10.11.0.tgz"; + sha512 = "X/p3UZerAIsbBfN/IwahhYaBbY68EN/UQBWHtsbXGT5bfrH/p4NQzUCG1kF/rtKaNpnJ7jAu6NGTdSNtyNIXMw=="; + }; + }; "virtualfs-2.2.0" = { name = "virtualfs"; packageName = "virtualfs"; @@ -2038,6 +3505,15 @@ let sha512 = "IhKend8RSZReoyXybZAJWzCxhASNeBufBgyrpLCcc7B9hnqJtiY511vZPKIIi2mO7+SO2Hj4D778GunR9D1pBA=="; }; }; + "whatwg-fetch-3.4.1" = { + name = "whatwg-fetch"; + packageName = "whatwg-fetch"; + version = "3.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.4.1.tgz"; + sha512 = "sofZVzE1wKwO+EYPbWfiwzaKovWiZXf4coEzjGP9b2GBVgQRLQUZ2QcuPpQExGDAW5GItpEm6Tl4OU5mywnAoQ=="; + }; + }; "which-2.0.2" = { name = "which"; packageName = "which"; @@ -2047,6 +3523,15 @@ let sha512 = "BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="; }; }; + "which-module-2.0.0" = { + name = "which-module"; + packageName = "which-module"; + version = "2.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz"; + sha1 = "d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"; + }; + }; "word-wrap-1.2.3" = { name = "word-wrap"; packageName = "word-wrap"; @@ -2056,6 +3541,15 @@ let sha512 = "Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ=="; }; }; + "wrap-ansi-6.2.0" = { + name = "wrap-ansi"; + packageName = "wrap-ansi"; + version = "6.2.0"; + src = fetchurl { + url = "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz"; + sha512 = "r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA=="; + }; + }; "wrappy-1.0.2" = { name = "wrappy"; packageName = "wrappy"; @@ -2092,6 +3586,60 @@ let sha512 = "PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q=="; }; }; + "xtend-4.0.1" = { + name = "xtend"; + packageName = "xtend"; + version = "4.0.1"; + src = fetchurl { + url = "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz"; + sha1 = "a5c6d532be656e23db820efb943a1f04998d63af"; + }; + }; + "y18n-4.0.0" = { + name = "y18n"; + packageName = "y18n"; + version = "4.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz"; + sha512 = "r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w=="; + }; + }; + "yallist-4.0.0" = { + name = "yallist"; + packageName = "yallist"; + version = "4.0.0"; + src = fetchurl { + url = "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz"; + sha512 = "3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="; + }; + }; + "yargs-15.4.1" = { + name = "yargs"; + packageName = "yargs"; + version = "15.4.1"; + src = fetchurl { + url = "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz"; + sha512 = "aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A=="; + }; + }; + "yargs-parser-18.1.3" = { + name = "yargs-parser"; + packageName = "yargs-parser"; + version = "18.1.3"; + src = fetchurl { + url = "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz"; + sha512 = "o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ=="; + }; + }; + "z-schema-3.25.1" = { + name = "z-schema"; + packageName = "z-schema"; + version = "3.25.1"; + src = fetchurl { + url = "https://registry.npmjs.org/z-schema/-/z-schema-3.25.1.tgz"; + sha512 = "7tDlwhrBG+oYFdXNOjILSurpfQyuVgkRe3hB2q8TEssamDHB7BbLWYkYO98nTn0FibfdFroFKDjndbgufAgS/Q=="; + }; + }; "zxcvbn-4.4.2" = { name = "zxcvbn"; packageName = "zxcvbn"; @@ -2118,11 +3666,37 @@ let sources."supports-color-5.5.0" ]; }) - (sources."@grpc/grpc-js-1.1.2" // { + (sources."@grpc/grpc-js-1.1.7" // { dependencies = [ + sources."@types/node-12.12.62" sources."semver-6.3.0" ]; }) + (sources."@grpc/proto-loader-0.6.0-pre9" // { + dependencies = [ + sources."ansi-regex-5.0.0" + sources."ansi-styles-4.2.1" + sources."cliui-6.0.0" + sources."color-convert-2.0.1" + sources."color-name-1.1.4" + sources."emoji-regex-8.0.0" + sources."find-up-4.1.0" + sources."get-caller-file-2.0.5" + sources."is-fullwidth-code-point-3.0.0" + sources."locate-path-5.0.0" + sources."p-limit-2.3.0" + sources."p-locate-4.1.0" + sources."p-try-2.2.0" + sources."path-exists-4.0.0" + sources."require-main-filename-2.0.0" + sources."string-width-4.2.0" + sources."strip-ansi-6.0.0" + sources."wrap-ansi-6.2.0" + sources."y18n-4.0.0" + sources."yargs-15.4.1" + sources."yargs-parser-18.1.3" + ]; + }) sources."@protobufjs/aspromise-1.1.2" sources."@protobufjs/base64-1.1.2" sources."@protobufjs/codegen-2.0.4" @@ -2157,17 +3731,32 @@ let sources."semver-7.3.2" ]; }) + sources."abort-controller-3.0.0" sources."acorn-jsx-5.2.0" + (sources."agent-base-6.0.1" // { + dependencies = [ + sources."debug-4.2.0" + sources."ms-2.1.2" + ]; + }) sources."ajv-6.12.2" sources."ansi-colors-3.2.4" + sources."append-field-1.0.0" sources."argparse-1.0.10" + sources."arrify-2.0.1" sources."astral-regex-1.0.0" + (sources."async-2.6.3" // { + dependencies = [ + sources."lodash-4.17.20" + ]; + }) sources."async-lock-1.2.4" (sources."async-mutex-0.2.4" // { dependencies = [ sources."tslib-2.0.0" ]; }) + sources."asynckit-0.4.0" sources."auto-bind-proxy-1.0.1" (sources."babel-runtime-6.26.0" // { dependencies = [ @@ -2176,12 +3765,38 @@ let }) sources."balanced-match-1.0.0" sources."base64-js-1.3.0" + sources."bignumber.js-9.0.0" sources."bitset-5.0.3" + sources."bluebird-3.7.2" sources."bn-1.0.1" + (sources."body-parser-1.18.2" // { + dependencies = [ + sources."bytes-3.0.0" + sources."iconv-lite-0.4.19" + sources."qs-6.5.1" + (sources."raw-body-2.3.2" // { + dependencies = [ + sources."depd-1.1.1" + sources."http-errors-1.6.2" + ]; + }) + sources."setprototypeof-1.0.3" + ]; + }) sources."brace-expansion-1.1.11" sources."buffer-5.6.0" + sources."buffer-equal-constant-time-1.0.1" + sources."buffer-from-1.1.1" + (sources."busboy-0.2.14" // { + dependencies = [ + sources."isarray-0.0.1" + sources."readable-stream-1.1.14" + sources."string_decoder-0.10.31" + ]; + }) sources."bzip-deflate-1.0.0" sources."callsites-3.1.0" + sources."camelcase-5.3.1" (sources."chalk-4.0.0" // { dependencies = [ sources."ansi-styles-4.2.1" @@ -2192,18 +3807,50 @@ let sources."clean-git-ref-2.0.1" sources."color-convert-1.9.3" sources."color-name-1.1.3" + sources."combined-stream-1.0.8" sources."commander-5.1.0" + sources."component-emitter-1.2.1" sources."concat-map-0.0.1" + (sources."concat-stream-1.6.2" // { + dependencies = [ + sources."readable-stream-2.3.7" + sources."string_decoder-1.1.1" + ]; + }) sources."configstore-5.0.1" + sources."connect-3.7.0" + sources."content-type-1.0.4" + sources."cookiejar-2.1.2" + sources."core-js-2.6.11" sources."core-util-is-1.0.2" sources."crc-32-1.2.0" sources."crypto-random-string-2.0.0" + sources."debug-2.6.9" + sources."decamelize-1.2.0" sources."decompress-response-4.2.1" sources."deep-is-0.1.3" + sources."delayed-stream-1.0.0" + sources."depd-1.1.2" + sources."destroy-1.0.4" + (sources."dicer-0.2.5" // { + dependencies = [ + sources."isarray-0.0.1" + sources."readable-stream-1.1.14" + sources."string_decoder-0.10.31" + ]; + }) sources."diff3-0.0.3" sources."doctrine-3.0.0" sources."dom-walk-0.1.1" sources."dot-prop-5.2.0" + sources."ecdsa-sig-formatter-1.0.11" + sources."ee-first-1.1.1" + sources."encodeurl-1.0.2" + (sources."encoding-0.1.13" // { + dependencies = [ + sources."iconv-lite-0.6.2" + ]; + }) (sources."encryptedfs-1.0.2" // { dependencies = [ sources."debug-4.1.1" @@ -2213,6 +3860,7 @@ let }) sources."enquirer-2.3.5" sources."errno-0.1.7" + sources."escape-html-1.0.3" sources."escape-string-regexp-1.0.5" (sources."eslint-7.3.1" // { dependencies = [ @@ -2258,12 +3906,17 @@ let sources."esrecurse-4.2.1" sources."estraverse-4.2.0" sources."esutils-2.0.2" + sources."etag-1.8.1" + sources."event-target-shim-5.0.1" sources."exit-on-epipe-1.0.1" + sources."extend-3.0.2" sources."fast-deep-equal-3.1.1" sources."fast-diff-1.2.0" sources."fast-json-stable-stringify-2.1.0" sources."fast-levenshtein-2.0.6" + sources."fast-text-encoding-1.0.3" sources."file-entry-cache-5.0.1" + sources."finalhandler-1.1.2" (sources."flat-cache-2.0.1" // { dependencies = [ sources."glob-7.1.6" @@ -2271,14 +3924,49 @@ let ]; }) sources."flatted-2.0.2" + sources."form-data-2.3.3" + sources."formidable-1.2.2" + sources."fresh-0.5.2" sources."fs.realpath-1.0.0" sources."functional-red-black-tree-1.0.1" + (sources."gaxios-3.2.0" // { + dependencies = [ + sources."is-stream-2.0.0" + ]; + }) + sources."gcp-metadata-4.2.0" + sources."get-port-5.1.1" sources."get-random-values-1.2.0" sources."get-stdin-6.0.0" sources."glob-parent-5.1.1" sources."global-4.3.2" + (sources."google-auth-library-6.0.6" // { + dependencies = [ + sources."lru-cache-6.0.0" + sources."yallist-4.0.0" + ]; + }) + (sources."google-p12-pem-3.0.3" // { + dependencies = [ + sources."node-forge-0.10.0" + ]; + }) sources."google-protobuf-4.0.0-rc.2" sources."graceful-fs-4.1.11" + (sources."graphlib-2.1.8" // { + dependencies = [ + sources."lodash-4.17.20" + ]; + }) + sources."graphql-15.3.0" + sources."gtoken-5.0.3" + sources."http-errors-1.6.3" + (sources."https-proxy-agent-5.0.0" // { + dependencies = [ + sources."debug-4.2.0" + sources."ms-2.1.2" + ]; + }) sources."iced-error-0.0.13" sources."iced-lock-1.1.0" sources."iced-runtime-1.0.3" @@ -2297,6 +3985,7 @@ let sources."is-glob-4.0.1" sources."is-obj-2.0.0" sources."is-observable-1.1.0" + sources."is-stream-1.1.0" sources."is-typedarray-1.0.0" sources."isarray-1.0.0" sources."isexe-2.0.0" @@ -2306,22 +3995,74 @@ let sources."pify-4.0.1" ]; }) + sources."js-yaml-3.14.0" + sources."json-bigint-1.0.0" + (sources."json-refs-3.0.15" // { + dependencies = [ + sources."commander-4.1.1" + sources."lodash-4.17.20" + sources."slash-3.0.0" + ]; + }) sources."json-schema-traverse-0.4.1" sources."json-stable-stringify-without-jsonify-1.0.1" + sources."jwa-2.0.0" + sources."jws-4.0.0" (sources."kbpgp-2.0.82" // { dependencies = [ sources."deep-equal-1.0.1" sources."minimist-1.2.0" + sources."tweetnacl-0.13.3" ]; }) sources."keybase-ecurve-1.0.0" - sources."keybase-nacl-1.0.10" + (sources."keybase-nacl-1.0.10" // { + dependencies = [ + sources."tweetnacl-0.13.3" + ]; + }) + sources."lodash-4.17.5" + sources."lodash._arraypool-2.4.1" + sources."lodash._basebind-2.4.1" + sources."lodash._baseclone-2.4.1" + sources."lodash._basecreate-2.4.1" + sources."lodash._basecreatecallback-2.4.1" + sources."lodash._basecreatewrapper-2.4.1" + sources."lodash._createwrapper-2.4.1" + sources."lodash._getarray-2.4.1" + sources."lodash._isnative-2.4.1" + sources."lodash._maxpoolsize-2.4.1" + sources."lodash._objecttypes-2.4.1" + sources."lodash._releasearray-2.4.1" + sources."lodash._setbinddata-2.4.1" + sources."lodash._shimkeys-2.4.1" + sources."lodash._slice-2.4.1" + sources."lodash.assign-2.4.1" + sources."lodash.bind-2.4.1" + sources."lodash.camelcase-4.3.0" + sources."lodash.clonedeep-2.4.1" + sources."lodash.foreach-2.4.1" + sources."lodash.forown-2.4.1" + sources."lodash.get-4.4.2" + sources."lodash.identity-2.4.1" + sources."lodash.isarray-2.4.1" + sources."lodash.isequal-4.5.0" + sources."lodash.isfunction-2.4.1" + sources."lodash.isobject-2.4.1" + sources."lodash.keys-2.4.1" + sources."lodash.noop-2.4.1" + sources."lodash.support-2.4.1" sources."long-4.0.0" (sources."make-dir-3.1.0" // { dependencies = [ sources."semver-6.3.0" ]; }) + sources."media-typer-0.3.0" + sources."methods-1.1.2" + sources."mime-2.3.1" + sources."mime-db-1.44.0" + sources."mime-types-2.1.27" sources."mimic-response-2.1.0" sources."min-document-2.19.0" sources."minimatch-3.0.4" @@ -2333,15 +4074,29 @@ let }) sources."mkdirp-0.5.1" sources."more-entropy-0.0.7" + sources."ms-2.0.0" + sources."multer-1.4.2" + sources."native-promise-only-0.8.1" sources."natural-compare-1.4.0" - sources."node-forge-0.9.1" + sources."node-fetch-2.6.1" + sources."node-forge-0.9.2" + sources."object-assign-4.1.1" sources."observable-fns-0.5.1" + sources."on-finished-2.3.0" sources."once-1.4.0" sources."pako-1.0.11" sources."parent-module-1.0.1" + sources."parseurl-1.3.3" sources."path-is-absolute-1.0.1" + sources."path-loader-1.0.10" + sources."path-to-regexp-2.4.0" sources."permaproxy-0.0.2" sources."pgp-utils-0.0.34" + (sources."portable-fetch-3.0.0" // { + dependencies = [ + sources."node-fetch-1.7.3" + ]; + }) sources."prettier-2.0.5" sources."prettier-linter-helpers-1.0.0" sources."printj-1.1.2" @@ -2352,6 +4107,8 @@ let sources."prr-1.0.1" sources."punycode-2.1.1" sources."purepack-1.0.4" + sources."qs-6.5.2" + sources."range-parser-1.2.1" (sources."readable-stream-3.6.0" // { dependencies = [ sources."safe-buffer-5.2.1" @@ -2360,10 +4117,24 @@ let }) sources."regenerator-runtime-0.11.1" sources."regexpp-3.1.0" + sources."require-directory-2.1.1" sources."resource-counter-1.2.4" sources."safe-buffer-5.1.1" + sources."safer-buffer-2.1.2" sources."secure-random-bytes-1.0.1" sources."secure-random-octet-1.0.2" + (sources."send-0.17.1" // { + dependencies = [ + sources."http-errors-1.7.3" + sources."inherits-2.0.4" + sources."mime-1.6.0" + sources."ms-2.1.1" + sources."setprototypeof-1.1.1" + ]; + }) + sources."serve-static-1.14.1" + sources."set-blocking-2.0.0" + sources."setprototypeof-1.1.0" sources."sha.js-2.4.11" sources."signal-exit-3.0.2" sources."simple-concat-1.0.1" @@ -2373,12 +4144,32 @@ let sources."ansi-styles-3.2.1" ]; }) + sources."spark-md5-3.0.1" sources."sprintf-js-1.0.3" + sources."statuses-1.5.0" + sources."streamsearch-0.1.2" + (sources."superagent-3.8.3" // { + dependencies = [ + sources."debug-3.2.6" + sources."mime-1.6.0" + sources."ms-2.1.2" + sources."readable-stream-2.3.7" + sources."string_decoder-1.1.1" + ]; + }) (sources."supports-color-7.1.0" // { dependencies = [ sources."has-flag-4.0.0" ]; }) + sources."swagger-converter-0.1.7" + (sources."swagger-tools-0.10.4" // { + dependencies = [ + sources."commander-2.11.0" + sources."debug-3.2.6" + sources."ms-2.1.2" + ]; + }) sources."symbol-observable-1.2.0" (sources."table-5.4.6" // { dependencies = [ @@ -2397,11 +4188,14 @@ let ]; }) sources."tiny-worker-2.3.0" + sources."toidentifier-1.0.0" + sources."traverse-0.6.6" sources."triplesec-3.0.27" sources."tslib-1.11.1" sources."tsutils-3.17.1" - sources."tweetnacl-0.13.3" sources."type-fest-0.8.1" + sources."type-is-1.6.18" + sources."typedarray-0.0.6" sources."typedarray-to-buffer-3.1.5" (sources."uglify-js-3.4.9" // { dependencies = [ @@ -2411,20 +4205,31 @@ let }) sources."uint64be-1.0.1" sources."unique-string-2.0.0" + sources."unpipe-1.0.0" sources."uri-js-4.2.2" sources."util-deprecate-1.0.2" + sources."utils-merge-1.0.1" sources."v8-compile-cache-2.0.3" + sources."validator-10.11.0" (sources."virtualfs-2.2.0" // { dependencies = [ sources."readable-stream-2.3.6" sources."string_decoder-1.1.1" ]; }) + sources."whatwg-fetch-3.4.1" + sources."which-module-2.0.0" sources."word-wrap-1.2.3" sources."wrappy-1.0.2" sources."write-1.0.3" sources."write-file-atomic-3.0.3" sources."xdg-basedir-4.0.0" + sources."xtend-4.0.1" + (sources."z-schema-3.25.1" // { + dependencies = [ + sources."commander-2.20.3" + ]; + }) sources."zxcvbn-4.4.2" ]; buildInputs = globalBuildInputs; diff --git a/package-lock.json b/package-lock.json index b97bbe6d87..b4bc979bf3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -157,6 +157,24 @@ } } }, + "@babel/runtime-corejs3": { + "version": "7.11.2", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.11.2.tgz", + "integrity": "sha512-qh5IR+8VgFz83VBa6OkaET6uN/mJOhHONuy3m1sgF0CV6mXdPSEBdA7e1eUbVvyNtANjMbg22JUv71BaDXLY6A==", + "dev": true, + "requires": { + "core-js-pure": "^3.0.0", + "regenerator-runtime": "^0.13.4" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.13.7", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", + "dev": true + } + } + }, "@babel/types": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0.tgz", @@ -217,13 +235,21 @@ } }, "@grpc/grpc-js": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.1.2.tgz", - "integrity": "sha512-k2u86Bkm/3xrjUaSWeIyzXScBt/cC8uE7BznR0cpueQi11R33W6qfJdMrkrsmSHirp5likR55JSXUrcWG6ybHA==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.1.7.tgz", + "integrity": "sha512-EuxMstI0u778dp0nk6Fe3gHXYPeV6FYsWOe0/QFwxv1NQ6bc5Wl/0Yxa4xl9uBlKElL6AIxuASmSfu7KEJhqiw==", "requires": { + "@grpc/proto-loader": "^0.6.0-pre14", + "@types/node": "^12.12.47", + "google-auth-library": "^6.0.0", "semver": "^6.2.0" }, "dependencies": { + "@types/node": { + "version": "12.12.62", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.62.tgz", + "integrity": "sha512-qAfo81CsD7yQIM9mVyh6B/U47li5g7cfpVQEDMfQeF8pSZVwzbhwU3crc0qG4DmpsebpJPR49AKOExQyJ05Cpg==" + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -231,6 +257,180 @@ } } }, + "@grpc/proto-loader": { + "version": "0.6.0-pre9", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.0-pre9.tgz", + "integrity": "sha512-oM+LjpEjNzW5pNJjt4/hq1HYayNeQT+eGrOPABJnYHv7TyNPDNzkQ76rDYZF86X5swJOa4EujEMzQ9iiTdPgww==", + "requires": { + "@types/long": "^4.0.1", + "lodash.camelcase": "^4.3.0", + "long": "^4.0.0", + "protobufjs": "^6.9.0", + "yargs": "^15.3.1" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" + }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, "@hapi/bourne": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-1.3.2.tgz", @@ -1553,6 +1753,15 @@ "resolved": "https://registry.npmjs.org/@types/configstore/-/configstore-4.0.0.tgz", "integrity": "sha512-SvCBBPzOIe/3Tu7jTl2Q8NjITjLmq9m7obzjSyb8PXWWZ31xVK6w4T6v8fOx+lrgQnqk3Yxc00LDolFsSakKCA==" }, + "@types/connect": { + "version": "3.4.33", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.33.tgz", + "integrity": "sha512-2+FrkXY4zllzTNfJth7jOqEHC+enpLeGslEhpnTAkg21GkRrWV4SsAtqchtT4YS9/nODBU2/ZfsBY2X4J/dX7A==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/eslint-visitor-keys": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", @@ -1593,6 +1802,12 @@ "pretty-format": "^25.2.1" } }, + "@types/js-yaml": { + "version": "3.12.5", + "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-3.12.5.tgz", + "integrity": "sha512-JCcp6J0GV66Y4ZMDAQCXot4xprYB+Zfd3meK9+INSJeVZwJmHAW30BBEEkPzXswMXuiyReUGOP3GxrADc9wPww==", + "dev": true + }, "@types/json-schema": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.4.tgz", @@ -1662,6 +1877,15 @@ "integrity": "sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw==", "dev": true }, + "@types/swagger-tools": { + "version": "0.10.6", + "resolved": "https://registry.npmjs.org/@types/swagger-tools/-/swagger-tools-0.10.6.tgz", + "integrity": "sha512-6d44Amrtm0vOgv6OtGCN6U4gRxJ9WRvwP1yMADUh8q6Cess3fyONaA2nh86i+ojAQvq5Ht8OYdN+AeXDhu3qIw==", + "dev": true, + "requires": { + "@types/connect": "*" + } + }, "@types/tapable": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/tapable/-/tapable-1.0.6.tgz", @@ -2040,6 +2264,14 @@ "integrity": "sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg==", "dev": true }, + "abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "requires": { + "event-target-shim": "^5.0.0" + } + }, "acorn": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.2.tgz", @@ -2075,6 +2307,29 @@ "integrity": "sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA==", "dev": true }, + "agent-base": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.1.tgz", + "integrity": "sha512-01q25QQDwLSsyfhrKbn8yuur+JNw0H+0Y4JiGIKd3z9aYk/w/2kxD/Upc+t2ZBBSUNff50VjPsSW2YxM8QYKVg==", + "requires": { + "debug": "4" + }, + "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, "aggregate-error": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz", @@ -2140,6 +2395,11 @@ "buffer-equal": "^1.0.0" } }, + "append-field": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz", + "integrity": "sha1-HjRA6RXwsSA9I3SOeO3XubW0PlY=" + }, "aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", @@ -2474,8 +2734,7 @@ "arrify": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", - "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", - "dev": true + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==" }, "asn1": { "version": "0.2.4", @@ -2541,6 +2800,21 @@ "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==" }, + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "requires": { + "lodash": "^4.17.14" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + } + } + }, "async-each": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", @@ -2570,8 +2844,7 @@ "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "at-least-node": { "version": "1.0.0", @@ -3879,6 +4152,11 @@ "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", "dev": true }, + "bignumber.js": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", + "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==" + }, "binary-extensions": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", @@ -3903,8 +4181,7 @@ "bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, "bn": { "version": "1.0.1", @@ -3929,6 +4206,74 @@ "safe-json-parse": "~1.0.1" } }, + "body-parser": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", + "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", + "requires": { + "bytes": "3.0.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.1", + "http-errors": "~1.6.2", + "iconv-lite": "0.4.19", + "on-finished": "~2.3.0", + "qs": "6.5.1", + "raw-body": "2.3.2", + "type-is": "~1.6.15" + }, + "dependencies": { + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + }, + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + }, + "raw-body": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", + "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.2", + "iconv-lite": "0.4.19", + "unpipe": "1.0.0" + }, + "dependencies": { + "depd": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" + }, + "http-errors": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", + "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "requires": { + "depd": "1.1.1", + "inherits": "2.0.3", + "setprototypeof": "1.0.3", + "statuses": ">= 1.3.1 < 2" + } + } + } + }, + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" + } + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -4074,6 +4419,12 @@ "node-int64": "^0.4.0" } }, + "btoa": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz", + "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==", + "dev": true + }, "buffer": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", @@ -4089,11 +4440,15 @@ "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", "dev": true }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + }, "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" }, "buffer-shims": { "version": "1.0.0", @@ -4119,6 +4474,38 @@ "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", "dev": true }, + "busboy": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-0.2.14.tgz", + "integrity": "sha1-bCpiLvz0fFe7vh4qnDetNseSVFM=", + "requires": { + "dicer": "0.2.5", + "readable-stream": "1.1.x" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, "bytes": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz", @@ -4235,6 +4622,11 @@ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + }, "caniuse-lite": { "version": "1.0.30000883", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000883.tgz", @@ -4571,7 +4963,6 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, "requires": { "delayed-stream": "~1.0.0" } @@ -4599,8 +4990,7 @@ "component-emitter": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" }, "concat-map": { "version": "0.0.1", @@ -4611,7 +5001,6 @@ "version": "1.6.2", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", "integrity": "sha1-kEvfGUzTEi/Gdcd/xKw9T/D9GjQ=", - "dev": true, "requires": { "buffer-from": "^1.0.0", "inherits": "^2.0.3", @@ -4623,7 +5012,6 @@ "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -4638,7 +5026,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, "requires": { "safe-buffer": "~5.1.0" } @@ -4658,6 +5045,17 @@ "xdg-basedir": "^4.0.0" } }, + "connect": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "requires": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + } + }, "console-browserify": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", @@ -4670,6 +5068,11 @@ "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", "dev": true }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, "continuable-cache": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/continuable-cache/-/continuable-cache-0.3.1.tgz", @@ -4682,6 +5085,11 @@ "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", "dev": true }, + "cookiejar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==" + }, "copy-concurrently": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", @@ -4941,6 +5349,11 @@ } } }, + "core-js": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", + "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==" + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -5048,6 +5461,15 @@ } } }, + "cross-fetch": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.0.6.tgz", + "integrity": "sha512-KBPUbqgFjzWlVcURG+Svp9TlhA5uliYtiNx/0r8nv0pdypeQCRJ9IaSIc3q/x3q8t3F75cHuwxVql1HFGHCNJQ==", + "dev": true, + "requires": { + "node-fetch": "2.6.1" + } + }, "cross-spawn": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", @@ -5148,7 +5570,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", - "dev": true, "requires": { "ms": "2.0.0" } @@ -5156,8 +5577,7 @@ "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" }, "decode-uri-component": { "version": "0.2.0", @@ -5173,6 +5593,12 @@ "mimic-response": "^2.0.0" } }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true + }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", @@ -5255,8 +5681,12 @@ "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" }, "des.js": { "version": "1.0.0", @@ -5268,6 +5698,11 @@ "minimalistic-assert": "^1.0.0" } }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, "detab": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/detab/-/detab-2.0.1.tgz", @@ -5319,6 +5754,38 @@ "kuler": "1.0.x" } }, + "dicer": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/dicer/-/dicer-0.2.5.tgz", + "integrity": "sha1-WZbAhrszIYyBLAkL3cCc0S+stw8=", + "requires": { + "readable-stream": "1.1.x", + "streamsearch": "0.1.2" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, "diff": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz", @@ -6066,6 +6533,19 @@ "safer-buffer": "^2.1.0" } }, + "ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, "electron-to-chromium": { "version": "1.3.62", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.62.tgz", @@ -6108,6 +6588,29 @@ "env-variable": "0.0.x" } }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "requires": { + "iconv-lite": "^0.6.2" + }, + "dependencies": { + "iconv-lite": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz", + "integrity": "sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + } + } + }, "encryptedfs": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encryptedfs/-/encryptedfs-1.0.2.tgz", @@ -6215,6 +6718,11 @@ "is-arrayish": "^0.2.1" } }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -6535,6 +7043,16 @@ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" + }, "events": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/events/-/events-3.1.0.tgz", @@ -6636,8 +7154,7 @@ "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, "extend-shallow": { "version": "3.0.2", @@ -6735,6 +7252,23 @@ } } }, + "fast-json-patch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-2.2.1.tgz", + "integrity": "sha512-4j5uBaTnsYAV5ebkidvxiLUYOwjQ+JSFljeqfTxCrH9bDmlCQaOJFS84oDJ2rAXZq2yskmk3ORfoP9DCwqFNig==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1" + }, + "dependencies": { + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + } + } + }, "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -6757,6 +7291,11 @@ "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==", "dev": true }, + "fast-text-encoding": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/fast-text-encoding/-/fast-text-encoding-1.0.3.tgz", + "integrity": "sha512-dtm4QZH9nZtcDt8qJiOH9fcQd1NAgi+K1O2DbE6GG1PPCK/BWfOH3idCTRQ4ImXRUOyopDEgDEnVEE7Y/2Wrig==" + }, "fastq": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.8.0.tgz", @@ -6860,6 +7399,20 @@ "dev": true, "optional": true }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + } + }, "find-cache-dir": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", @@ -7289,13 +7842,17 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", "mime-types": "^2.1.12" } }, + "formidable": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.2.tgz", + "integrity": "sha512-V8gLm+41I/8kguQ4/o1D3RIHRmhYFG4pnNyonvua+40rqcEmT4+V71yaZ3B457xbbgCsCfjSPi65u/W6vK1U5Q==" + }, "fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", @@ -7305,6 +7862,11 @@ "map-cache": "^0.2.2" } }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, "from2": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", @@ -7450,6 +8012,34 @@ "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" }, + "gaxios": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-3.2.0.tgz", + "integrity": "sha512-+6WPeVzPvOshftpxJwRi2Ozez80tn/hdtOUag7+gajDHRJvAblKxTFSSMPtr2hmnLy7p0mvYz0rMXLBl8pSO7Q==", + "requires": { + "abort-controller": "^3.0.0", + "extend": "^3.0.2", + "https-proxy-agent": "^5.0.0", + "is-stream": "^2.0.0", + "node-fetch": "^2.3.0" + }, + "dependencies": { + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" + } + } + }, + "gcp-metadata": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-4.2.0.tgz", + "integrity": "sha512-vQZD57cQkqIA6YPGXM/zc+PIZfNRFdukWGsGZ5+LcJzesi5xp6Gn7a02wRJi4eXPyArNMIYpPET4QMxGqtlk6Q==", + "requires": { + "gaxios": "^3.0.0", + "json-bigint": "^1.0.0" + } + }, "gensync": { "version": "1.0.0-beta.1", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", @@ -7462,6 +8052,11 @@ "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", "dev": true }, + "get-port": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-5.1.1.tgz", + "integrity": "sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==" + }, "get-random-values": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/get-random-values/-/get-random-values-1.2.0.tgz", @@ -7699,6 +8294,52 @@ } } }, + "google-auth-library": { + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-6.0.6.tgz", + "integrity": "sha512-fWYdRdg55HSJoRq9k568jJA1lrhg9i2xgfhVIMJbskUmbDpJGHsbv9l41DGhCDXM21F9Kn4kUwdysgxSYBYJUw==", + "requires": { + "arrify": "^2.0.0", + "base64-js": "^1.3.0", + "ecdsa-sig-formatter": "^1.0.11", + "fast-text-encoding": "^1.0.0", + "gaxios": "^3.0.0", + "gcp-metadata": "^4.1.0", + "gtoken": "^5.0.0", + "jws": "^4.0.0", + "lru-cache": "^6.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } + }, + "google-p12-pem": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-3.0.3.tgz", + "integrity": "sha512-wS0ek4ZtFx/ACKYF3JhyGe5kzH7pgiQ7J5otlumqR9psmWMYc+U9cErKlCYVYHoUaidXHdZ2xbo34kB+S+24hA==", + "requires": { + "node-forge": "^0.10.0" + }, + "dependencies": { + "node-forge": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", + "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==" + } + } + }, "google-protobuf": { "version": "4.0.0-rc.2", "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-4.0.0-rc.2.tgz", @@ -7709,6 +8350,26 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" }, + "graphlib": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/graphlib/-/graphlib-2.1.8.tgz", + "integrity": "sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A==", + "requires": { + "lodash": "^4.17.15" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + } + } + }, + "graphql": { + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-15.3.0.tgz", + "integrity": "sha512-GTCJtzJmkFLWRfFJuoo9RWWa/FfamUHgiFosxi/X1Ani4AVWbeyBenZTNX6dM+7WSbbFfTo/25eh0LLkwHMw2w==" + }, "growly": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", @@ -7716,6 +8377,17 @@ "dev": true, "optional": true }, + "gtoken": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-5.0.3.tgz", + "integrity": "sha512-Nyd1wZCMRc2dj/mAD0LlfQLcAO06uKdpKJXvK85SGrF5+5+Bpfil9u/2aw35ltvEHjvl0h5FMKN5knEU+9JrOg==", + "requires": { + "gaxios": "^3.0.0", + "google-p12-pem": "^3.0.0", + "jws": "^4.0.0", + "mime": "^2.2.0" + } + }, "handlebars": { "version": "4.7.6", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", @@ -7977,6 +8649,17 @@ "integrity": "sha1-lWcH2+zRDPZYySxdJ/7nY6pqqYI=", "dev": true }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, "http-parser-js": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.1.tgz", @@ -8000,6 +8683,30 @@ "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", "dev": true }, + "https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "requires": { + "agent-base": "6", + "debug": "4" + }, + "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, "human-signals": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", @@ -8412,8 +9119,7 @@ "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, "is-typedarray": { "version": "1.0.0", @@ -8476,6 +9182,15 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, + "isomorphic-form-data": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-form-data/-/isomorphic-form-data-2.0.0.tgz", + "integrity": "sha512-TYgVnXWeESVmQSg4GLVbalmQ+B4NPi/H4eWxqALKj63KsUrcu301YDjBqaOw3h+cbak7Na4Xyps3BiptHtxTfg==", + "dev": true, + "requires": { + "form-data": "^2.3.2" + } + }, "isomorphic-git": { "version": "1.7.4", "resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.7.4.tgz", @@ -11479,10 +12194,9 @@ "dev": true }, "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha1-6u1lbsg0TxD1J8a/obbiJE3hZ9E=", - "dev": true, + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -11542,12 +12256,52 @@ "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true }, + "json-bigint": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", + "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "requires": { + "bignumber.js": "^9.0.0" + } + }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", "integrity": "sha1-u4Z8+zRQ5pEHwTHRxRS6s9yLyqk=", "dev": true }, + "json-refs": { + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/json-refs/-/json-refs-3.0.15.tgz", + "integrity": "sha512-0vOQd9eLNBL18EGl5yYaO44GhixmImes2wiYn9Z3sag3QnehWrYWlB9AFtMxCL2Bj3fyxgDYkxGFEU/chlYssw==", + "requires": { + "commander": "~4.1.1", + "graphlib": "^2.1.8", + "js-yaml": "^3.13.1", + "lodash": "^4.17.15", + "native-promise-only": "^0.8.1", + "path-loader": "^1.0.10", + "slash": "^3.0.0", + "uri-js": "^4.2.2" + }, + "dependencies": { + "commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==" + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" + } + } + }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -11627,6 +12381,25 @@ "verror": "1.10.0" } }, + "jwa": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", + "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", + "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", + "requires": { + "jwa": "^2.0.0", + "safe-buffer": "^5.0.1" + } + }, "kbpgp": { "version": "2.0.82", "resolved": "https://registry.npmjs.org/kbpgp/-/kbpgp-2.0.82.tgz", @@ -11656,6 +12429,11 @@ "version": "1.2.0", "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "tweetnacl": { + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.13.3.tgz", + "integrity": "sha1-1ii1bzvMPVrnS6nUwacE3vWrS1Y=" } } }, @@ -11681,6 +12459,13 @@ "iced-runtime": "^1.0.2", "tweetnacl": "^0.13.1", "uint64be": "^1.0.1" + }, + "dependencies": { + "tweetnacl": { + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.13.3.tgz", + "integrity": "sha1-1ii1bzvMPVrnS6nUwacE3vWrS1Y=" + } } }, "kind-of": { @@ -11812,43 +12597,194 @@ "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", "dev": true, "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^1.0.1" - }, - "dependencies": { - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - } + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + }, + "dependencies": { + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + } + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + }, + "lodash._arraypool": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._arraypool/-/lodash._arraypool-2.4.1.tgz", + "integrity": "sha1-6I7suS4ruEyQZWEv2VigcZzUf5Q=" + }, + "lodash._basebind": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._basebind/-/lodash._basebind-2.4.1.tgz", + "integrity": "sha1-6UC5690nwyfgqNqxtVkWxTQelXU=", + "requires": { + "lodash._basecreate": "~2.4.1", + "lodash._setbinddata": "~2.4.1", + "lodash._slice": "~2.4.1", + "lodash.isobject": "~2.4.1" + } + }, + "lodash._baseclone": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._baseclone/-/lodash._baseclone-2.4.1.tgz", + "integrity": "sha1-MPgj5X4X43NdODvWK2Czh1Q7QYY=", + "requires": { + "lodash._getarray": "~2.4.1", + "lodash._releasearray": "~2.4.1", + "lodash._slice": "~2.4.1", + "lodash.assign": "~2.4.1", + "lodash.foreach": "~2.4.1", + "lodash.forown": "~2.4.1", + "lodash.isarray": "~2.4.1", + "lodash.isobject": "~2.4.1" + } + }, + "lodash._basecreate": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-2.4.1.tgz", + "integrity": "sha1-+Ob1tXip405UEXm1a47uv0oofgg=", + "requires": { + "lodash._isnative": "~2.4.1", + "lodash.isobject": "~2.4.1", + "lodash.noop": "~2.4.1" + } + }, + "lodash._basecreatecallback": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._basecreatecallback/-/lodash._basecreatecallback-2.4.1.tgz", + "integrity": "sha1-fQsmdknLKeehOdAQO3wR+uhOSFE=", + "requires": { + "lodash._setbinddata": "~2.4.1", + "lodash.bind": "~2.4.1", + "lodash.identity": "~2.4.1", + "lodash.support": "~2.4.1" + } + }, + "lodash._basecreatewrapper": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._basecreatewrapper/-/lodash._basecreatewrapper-2.4.1.tgz", + "integrity": "sha1-TTHy595+E0+/KAN2K4FQsyUZZm8=", + "requires": { + "lodash._basecreate": "~2.4.1", + "lodash._setbinddata": "~2.4.1", + "lodash._slice": "~2.4.1", + "lodash.isobject": "~2.4.1" + } + }, + "lodash._createwrapper": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._createwrapper/-/lodash._createwrapper-2.4.1.tgz", + "integrity": "sha1-UdaVeXPaTtVW43KQ2MGhjFPeFgc=", + "requires": { + "lodash._basebind": "~2.4.1", + "lodash._basecreatewrapper": "~2.4.1", + "lodash._slice": "~2.4.1", + "lodash.isfunction": "~2.4.1" + } + }, + "lodash._getarray": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._getarray/-/lodash._getarray-2.4.1.tgz", + "integrity": "sha1-+vH3+BD6mFolHCGHQESBCUg55e4=", + "requires": { + "lodash._arraypool": "~2.4.1" + } + }, + "lodash._isnative": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz", + "integrity": "sha1-PqZAS3hKe+g2x7V1gOHN95sUgyw=" + }, + "lodash._maxpoolsize": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._maxpoolsize/-/lodash._maxpoolsize-2.4.1.tgz", + "integrity": "sha1-nUgvRjuOZq++WcLBTtsRcGAXIzQ=" + }, + "lodash._objecttypes": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz", + "integrity": "sha1-fAt/admKH3ZSn4kLDNsbTf7BHBE=" + }, + "lodash._releasearray": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._releasearray/-/lodash._releasearray-2.4.1.tgz", + "integrity": "sha1-phOWMNdtFTawfdyAliiJsIL2pkE=", + "requires": { + "lodash._arraypool": "~2.4.1", + "lodash._maxpoolsize": "~2.4.1" + } + }, + "lodash._setbinddata": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._setbinddata/-/lodash._setbinddata-2.4.1.tgz", + "integrity": "sha1-98IAzRuS7yNrOZ7s9zxkjReqlNI=", + "requires": { + "lodash._isnative": "~2.4.1", + "lodash.noop": "~2.4.1" + } + }, + "lodash._shimkeys": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz", + "integrity": "sha1-bpzJZm/wgfC1psl4uD4kLmlJ0gM=", + "requires": { + "lodash._objecttypes": "~2.4.1" + } + }, + "lodash._slice": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._slice/-/lodash._slice-2.4.1.tgz", + "integrity": "sha1-dFz0GlNZexj2iImFREBe+isG2Q8=" + }, + "lodash.assign": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-2.4.1.tgz", + "integrity": "sha1-hMOVlt1xGBqXsGUpE6fJZ15Jsao=", + "requires": { + "lodash._basecreatecallback": "~2.4.1", + "lodash._objecttypes": "~2.4.1", + "lodash.keys": "~2.4.1" } }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, + "lodash.bind": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-2.4.1.tgz", + "integrity": "sha1-XRn6AFyMTSNvr0dCx7eh/Kvikmc=", "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "lodash._createwrapper": "~2.4.1", + "lodash._slice": "~2.4.1" } }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", - "dev": true + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" }, "lodash.clone": { "version": "4.5.0", @@ -11856,12 +12792,86 @@ "integrity": "sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y=", "dev": true }, + "lodash.clonedeep": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-2.4.1.tgz", + "integrity": "sha1-8pIDtAsS/uCkXTYxZIJZvrq8eGg=", + "requires": { + "lodash._baseclone": "~2.4.1", + "lodash._basecreatecallback": "~2.4.1" + } + }, "lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", "dev": true }, + "lodash.foreach": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-2.4.1.tgz", + "integrity": "sha1-/j/Do0yGyUyrb5UiVgKCdB4BYwk=", + "requires": { + "lodash._basecreatecallback": "~2.4.1", + "lodash.forown": "~2.4.1" + } + }, + "lodash.forown": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.forown/-/lodash.forown-2.4.1.tgz", + "integrity": "sha1-eLQer+FAX6lmRZ6kGT/VAtCEUks=", + "requires": { + "lodash._basecreatecallback": "~2.4.1", + "lodash._objecttypes": "~2.4.1", + "lodash.keys": "~2.4.1" + } + }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" + }, + "lodash.identity": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.identity/-/lodash.identity-2.4.1.tgz", + "integrity": "sha1-ZpTP+mX++TH3wxzobHRZfPVg9PE=" + }, + "lodash.isarray": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-2.4.1.tgz", + "integrity": "sha1-tSoybB9i9tfac6MdVAHfbvRPD6E=", + "requires": { + "lodash._isnative": "~2.4.1" + } + }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" + }, + "lodash.isfunction": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-2.4.1.tgz", + "integrity": "sha1-LP1XXHPkmKtX4xm3f6Aq3vE6lNE=" + }, + "lodash.isobject": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-2.4.1.tgz", + "integrity": "sha1-Wi5H/mmVPx7mMafrof5k0tBlWPU=", + "requires": { + "lodash._objecttypes": "~2.4.1" + } + }, + "lodash.keys": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz", + "integrity": "sha1-SN6kbfj/djKxDXBrissmWR4rNyc=", + "requires": { + "lodash._isnative": "~2.4.1", + "lodash._shimkeys": "~2.4.1", + "lodash.isobject": "~2.4.1" + } + }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -11874,12 +12884,25 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, + "lodash.noop": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.noop/-/lodash.noop-2.4.1.tgz", + "integrity": "sha1-T7VPgWZS5a4Q6PcvcXo4jHMmU4o=" + }, "lodash.sortby": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", "dev": true }, + "lodash.support": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.support/-/lodash.support-2.4.1.tgz", + "integrity": "sha1-Mg4LZwMWc8KNeiu12eAzGkUkBRU=", + "requires": { + "lodash._isnative": "~2.4.1" + } + }, "logform": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/logform/-/logform-2.2.0.tgz", @@ -12112,6 +13135,11 @@ "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", "dev": true }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, "mem": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", @@ -12175,6 +13203,11 @@ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, "miller-rabin": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", @@ -12188,20 +13221,17 @@ "mime": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", - "integrity": "sha1-sWIcVNY7l8R9PP5/chX31kUXw2k=", - "dev": true + "integrity": "sha1-sWIcVNY7l8R9PP5/chX31kUXw2k=" }, "mime-db": { "version": "1.44.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", - "dev": true + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" }, "mime-types": { "version": "2.1.27", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", - "dev": true, "requires": { "mime-db": "1.44.0" } @@ -12553,8 +13583,22 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "multer": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/multer/-/multer-1.4.2.tgz", + "integrity": "sha512-xY8pX7V+ybyUpbYMxtjM9KAiD9ixtg5/JkeKUTD6xilfDv0vzzOFcCp4Ljb1UU3tSOM3VTZtKo63OmzOrGi3Cg==", + "requires": { + "append-field": "^1.0.0", + "busboy": "^0.2.11", + "concat-stream": "^1.5.2", + "mkdirp": "^0.5.1", + "object-assign": "^4.1.1", + "on-finished": "^2.3.0", + "type-is": "^1.6.4", + "xtend": "^4.0.0" + } }, "multimatch": { "version": "4.0.0", @@ -12615,6 +13659,11 @@ } } }, + "native-promise-only": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/native-promise-only/-/native-promise-only-0.8.1.tgz", + "integrity": "sha1-IKMYwwy0X3H+et+/eyHJnBRy7xE=" + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -12632,10 +13681,15 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, + "node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" + }, "node-forge": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.1.tgz", - "integrity": "sha512-G6RlQt5Sb4GMBzXvhfkeFmbqR6MzhtnT7VTHuLadjkii3rdYHNdw0m8zA4BTxVIh68FicCQ2NSUANpsqkr9jvQ==" + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.2.tgz", + "integrity": "sha512-naKSScof4Wn+aoHU6HBsifh92Zeicm1GDQKd1vp3Y/kOi8ub0DozCa9KpvYNCXslFHYRmLNiqRopGdTGwNLpNw==" }, "node-int64": { "version": "0.4.0", @@ -12917,8 +13971,7 @@ "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, "object-copy": { "version": "0.1.0", @@ -12999,6 +14052,14 @@ "resolved": "https://registry.npmjs.org/observable-fns/-/observable-fns-0.5.1.tgz", "integrity": "sha512-wf7g4Jpo1Wt2KIqZKLGeiuLOEMqpaOZ5gJn7DmSdqXgTdxRwSdBhWegQQpPteQ2gZvzCKqNNpwb853wcpA0j7A==" }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -13303,6 +14364,11 @@ "integrity": "sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==", "dev": true }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", @@ -13338,6 +14404,15 @@ "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", "dev": true }, + "path-loader": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/path-loader/-/path-loader-1.0.10.tgz", + "integrity": "sha512-CMP0v6S6z8PHeJ6NFVyVJm6WyJjIwFvyz2b0n2/4bKdS/0uZa/9sKUlYZzubrn3zuDRU0zIuEDX9DZYQ2ZI8TA==", + "requires": { + "native-promise-only": "^0.8.1", + "superagent": "^3.8.3" + } + }, "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", @@ -13365,6 +14440,11 @@ "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", "dev": true }, + "path-to-regexp": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.4.0.tgz", + "integrity": "sha512-G6zHoVqC6GGTQkZwF4lkuEyMbVOjoBKAEybQUypI1WTkqinCOrq2x6U2+phkJ1XsEMTy4LjtwPI7HW+NVrRR2w==" + }, "path-type": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", @@ -13595,6 +14675,26 @@ "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==", "dev": true }, + "portable-fetch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/portable-fetch/-/portable-fetch-3.0.0.tgz", + "integrity": "sha1-PL9KptvFpXNLQcBBnJJzMTv9mtg=", + "requires": { + "node-fetch": "^1.0.1", + "whatwg-fetch": ">=0.10.0" + }, + "dependencies": { + "node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "requires": { + "encoding": "^0.1.11", + "is-stream": "^1.0.1" + } + } + } + }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", @@ -13818,8 +14918,7 @@ "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha1-yzroBuh0BERYTvFUzo7pjUA/PjY=", - "dev": true + "integrity": "sha1-yzroBuh0BERYTvFUzo7pjUA/PjY=" }, "querystring": { "version": "0.2.0", @@ -13827,6 +14926,12 @@ "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", "dev": true }, + "querystring-browser": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/querystring-browser/-/querystring-browser-1.0.4.tgz", + "integrity": "sha1-8uNYgYQKgZvHsb9Zf68JeeZiLcY=", + "dev": true + }, "querystring-es3": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", @@ -13858,6 +14963,11 @@ "safe-buffer": "^5.1.0" } }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + }, "raw-body": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-1.1.7.tgz", @@ -14294,8 +15404,7 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, "require-main-filename": { "version": "1.0.1", @@ -14473,8 +15582,7 @@ "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "sane": { "version": "4.1.0", @@ -14874,6 +15982,60 @@ "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==", "dev": true }, + "send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "http-errors": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz", + "integrity": "sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + } + } + }, "serialize-javascript": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz", @@ -14889,11 +16051,21 @@ "protochain": "^1.0.5" } }, + "serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + } + }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, "set-immediate-shim": { "version": "1.0.1", @@ -14930,6 +16102,11 @@ "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", "dev": true }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + }, "sha.js": { "version": "2.4.11", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", @@ -15208,6 +16385,11 @@ "trim": "0.0.1" } }, + "spark-md5": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spark-md5/-/spark-md5-3.0.1.tgz", + "integrity": "sha512-0tF3AGSD1ppQeuffsLDIOWlKUd3lS92tFxcsrh5Pe3ZphhnoK+oXIBTzOAThZCiuINZLvpiLH/1VS1/ANEJVig==" + }, "spdx-correct": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", @@ -15336,6 +16518,11 @@ } } }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + }, "stealthy-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", @@ -15507,6 +16694,11 @@ "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", "dev": true }, + "streamsearch": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz", + "integrity": "sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo=" + }, "string-length": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-length/-/string-length-3.1.0.tgz", @@ -15638,6 +16830,65 @@ } } }, + "superagent": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.3.tgz", + "integrity": "sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==", + "requires": { + "component-emitter": "^1.2.0", + "cookiejar": "^2.1.0", + "debug": "^3.1.0", + "extend": "^3.0.0", + "form-data": "^2.3.1", + "formidable": "^1.2.0", + "methods": "^1.1.1", + "mime": "^1.4.1", + "qs": "^6.5.1", + "readable-stream": "^2.3.5" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, "supports-color": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", @@ -15680,6 +16931,58 @@ } } }, + "swagger-converter": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/swagger-converter/-/swagger-converter-0.1.7.tgz", + "integrity": "sha1-oJdRnG8e5N1n4wjZtT3cnCslf5c=", + "requires": { + "lodash.clonedeep": "^2.4.1" + } + }, + "swagger-tools": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/swagger-tools/-/swagger-tools-0.10.4.tgz", + "integrity": "sha512-VQpijIi8cpB/frUZOZlVpS7U3CrdSAZBfiHu448R1njiNXUnE7heF3Svz3qFBr5SYtaPvaqWpHMbvboirCXVzA==", + "requires": { + "async": "^2.5.0", + "body-parser": "1.18.2", + "commander": "~2.11.0", + "debug": "^3.1.0", + "js-yaml": "^3.3.1", + "json-refs": "^3.0.2", + "lodash": "^4.17.4", + "multer": "^1.1.0", + "parseurl": "^1.3.0", + "path-to-regexp": "^2.0.0", + "qs": "^6.0.3", + "serve-static": "^1.10.0", + "spark-md5": "^3.0.0", + "superagent": "^3.5.2", + "swagger-converter": "^0.1.7", + "traverse": "^0.6.6", + "z-schema": "^3.15.4" + }, + "dependencies": { + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==" + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, "symbol-observable": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", @@ -16184,6 +17487,11 @@ "through2": "^2.0.3" } }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + }, "tough-cookie": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz", @@ -16204,6 +17512,11 @@ "punycode": "^2.1.0" } }, + "traverse": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", + "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" + }, "trim": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", @@ -16564,11 +17877,6 @@ "safe-buffer": "^5.0.1" } }, - "tweetnacl": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.13.3.tgz", - "integrity": "sha1-1ii1bzvMPVrnS6nUwacE3vWrS1Y=" - }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -16589,11 +17897,19 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, "typedarray-to-buffer": { "version": "3.1.5", @@ -16650,6 +17966,43 @@ "lunr": "^2.3.8" } }, + "typedoc-plugin-nojekyll": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typedoc-plugin-nojekyll/-/typedoc-plugin-nojekyll-1.0.1.tgz", + "integrity": "sha512-hdFMhn0vAFCwepihSaVVs5yyImjo2FCX/OVQW89lrrqoARYHlAchOki4BQug23UqFSrYdykUu8yP4gD0M48qbw==", + "dev": true, + "requires": { + "fs-extra": "^6.0.1" + }, + "dependencies": { + "fs-extra": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz", + "integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + } + } + }, "typedoc-webpack-plugin": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/typedoc-webpack-plugin/-/typedoc-webpack-plugin-1.1.4.tgz", @@ -16853,6 +18206,11 @@ "unist-util-is": "^2.1.2" } }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", @@ -16957,6 +18315,11 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, "uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", @@ -17006,6 +18369,11 @@ "spdx-expression-parse": "^3.0.0" } }, + "validator": { + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-10.11.0.tgz", + "integrity": "sha512-X/p3UZerAIsbBfN/IwahhYaBbY68EN/UQBWHtsbXGT5bfrH/p4NQzUCG1kF/rtKaNpnJ7jAu6NGTdSNtyNIXMw==" + }, "value-or-function": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", @@ -18520,6 +19888,11 @@ "iconv-lite": "0.4.24" } }, + "whatwg-fetch": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.4.1.tgz", + "integrity": "sha512-sofZVzE1wKwO+EYPbWfiwzaKovWiZXf4coEzjGP9b2GBVgQRLQUZ2QcuPpQExGDAW5GItpEm6Tl4OU5mywnAoQ==" + }, "whatwg-mimetype": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", @@ -18549,8 +19922,7 @@ "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, "winston-transport": { "version": "4.4.0", @@ -18696,8 +20068,7 @@ "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" }, "y18n": { "version": "3.2.1", @@ -18763,6 +20134,26 @@ "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true }, + "z-schema": { + "version": "3.25.1", + "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-3.25.1.tgz", + "integrity": "sha512-7tDlwhrBG+oYFdXNOjILSurpfQyuVgkRe3hB2q8TEssamDHB7BbLWYkYO98nTn0FibfdFroFKDjndbgufAgS/Q==", + "requires": { + "commander": "^2.7.1", + "core-js": "^2.5.7", + "lodash.get": "^4.0.0", + "lodash.isequal": "^4.0.0", + "validator": "^10.0.0" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "optional": true + } + } + }, "zxcvbn": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/zxcvbn/-/zxcvbn-4.4.2.tgz", diff --git a/package.json b/package.json index 377a44f461..b32aa71806 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "build:proto": "./scripts/compile_proto.sh", "build:webpack": "webpack", "build:documentation": "arkit src/ -o ./media/dependencies.png && typedoc --media ./media --gitRevision master --mode modules && touch ./docs/.nojekyll", - "build:all": "npm run build:proto && npm run build:api && npm run build:webpack", + "build:all": "npm run build:proto && npm run build:webpack", "test": "jest", "lint": "eslint '{src,tests}/**/*.{js,ts}' --quiet --fix", "npm:version:patch": "./scripts/npm_version_patch.sh" diff --git a/proto/compiled/Agent_grpc_pb.d.ts b/proto/compiled/Agent_grpc_pb.d.ts new file mode 100644 index 0000000000..6fc4ada531 --- /dev/null +++ b/proto/compiled/Agent_grpc_pb.d.ts @@ -0,0 +1,636 @@ +// package: agentInterface +// file: Agent.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from "@grpc/grpc-js"; +import * as Agent_pb from "./Agent_pb"; + +interface IAgentService extends grpc.ServiceDefinition { + addPeer: IAgentService_IAddPeer; + decryptFile: IAgentService_IDecryptFile; + deleteKey: IAgentService_IDeleteKey; + deleteSecret: IAgentService_IDeleteSecret; + deleteVault: IAgentService_IDeleteVault; + deriveKey: IAgentService_IDeriveKey; + encryptFile: IAgentService_IEncryptFile; + findPeer: IAgentService_IFindPeer; + findSocialPeer: IAgentService_IFindSocialPeer; + getKey: IAgentService_IGetKey; + getLocalPeerInfo: IAgentService_IGetLocalPeerInfo; + getPeerInfo: IAgentService_IGetPeerInfo; + getPrimaryKeyPair: IAgentService_IGetPrimaryKeyPair; + getSecret: IAgentService_IGetSecret; + getStatus: IAgentService_IGetStatus; + listKeys: IAgentService_IListKeys; + listNodes: IAgentService_IListNodes; + listPeers: IAgentService_IListPeers; + listSecrets: IAgentService_IListSecrets; + listVaults: IAgentService_IListVaults; + newNode: IAgentService_INewNode; + newSecret: IAgentService_INewSecret; + newVault: IAgentService_INewVault; + pingPeer: IAgentService_IPingPeer; + pullVault: IAgentService_IPullVault; + registerNode: IAgentService_IRegisterNode; + requestHolePunch: IAgentService_IRequestHolePunch; + requestRelay: IAgentService_IRequestRelay; + scanVaultNames: IAgentService_IScanVaultNames; + signFile: IAgentService_ISignFile; + stopAgent: IAgentService_IStopAgent; + toggleStealthMode: IAgentService_IToggleStealthMode; + updateLocalPeerInfo: IAgentService_IUpdateLocalPeerInfo; + updatePeerInfo: IAgentService_IUpdatePeerInfo; + updateSecret: IAgentService_IUpdateSecret; + verifyFile: IAgentService_IVerifyFile; +} + +interface IAgentService_IAddPeer extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/AddPeer" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IDecryptFile extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/DecryptFile" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IDeleteKey extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/DeleteKey" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IDeleteSecret extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/DeleteSecret" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IDeleteVault extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/DeleteVault" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IDeriveKey extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/DeriveKey" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IEncryptFile extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/EncryptFile" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IFindPeer extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/FindPeer" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IFindSocialPeer extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/FindSocialPeer" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IGetKey extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/GetKey" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IGetLocalPeerInfo extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/GetLocalPeerInfo" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IGetPeerInfo extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/GetPeerInfo" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IGetPrimaryKeyPair extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/GetPrimaryKeyPair" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IGetSecret extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/GetSecret" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IGetStatus extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/GetStatus" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IListKeys extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/ListKeys" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IListNodes extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/ListNodes" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IListPeers extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/ListPeers" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IListSecrets extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/ListSecrets" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IListVaults extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/ListVaults" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_INewNode extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/NewNode" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_INewSecret extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/NewSecret" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_INewVault extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/NewVault" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IPingPeer extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/PingPeer" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IPullVault extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/PullVault" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IRegisterNode extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/RegisterNode" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IRequestHolePunch extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/RequestHolePunch" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IRequestRelay extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/RequestRelay" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IScanVaultNames extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/ScanVaultNames" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_ISignFile extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/SignFile" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IStopAgent extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/StopAgent" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IToggleStealthMode extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/ToggleStealthMode" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IUpdateLocalPeerInfo extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/UpdateLocalPeerInfo" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IUpdatePeerInfo extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/UpdatePeerInfo" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IUpdateSecret extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/UpdateSecret" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IAgentService_IVerifyFile extends grpc.MethodDefinition { + path: string; // "/agentInterface.Agent/VerifyFile" + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const AgentService: IAgentService; + +export interface IAgentServer { + addPeer: grpc.handleUnaryCall; + decryptFile: grpc.handleUnaryCall; + deleteKey: grpc.handleUnaryCall; + deleteSecret: grpc.handleUnaryCall; + deleteVault: grpc.handleUnaryCall; + deriveKey: grpc.handleUnaryCall; + encryptFile: grpc.handleUnaryCall; + findPeer: grpc.handleUnaryCall; + findSocialPeer: grpc.handleUnaryCall; + getKey: grpc.handleUnaryCall; + getLocalPeerInfo: grpc.handleUnaryCall; + getPeerInfo: grpc.handleUnaryCall; + getPrimaryKeyPair: grpc.handleUnaryCall; + getSecret: grpc.handleUnaryCall; + getStatus: grpc.handleUnaryCall; + listKeys: grpc.handleUnaryCall; + listNodes: grpc.handleUnaryCall; + listPeers: grpc.handleUnaryCall; + listSecrets: grpc.handleUnaryCall; + listVaults: grpc.handleUnaryCall; + newNode: grpc.handleUnaryCall; + newSecret: grpc.handleUnaryCall; + newVault: grpc.handleUnaryCall; + pingPeer: grpc.handleUnaryCall; + pullVault: grpc.handleUnaryCall; + registerNode: grpc.handleUnaryCall; + requestHolePunch: grpc.handleUnaryCall; + requestRelay: grpc.handleUnaryCall; + scanVaultNames: grpc.handleUnaryCall; + signFile: grpc.handleUnaryCall; + stopAgent: grpc.handleUnaryCall; + toggleStealthMode: grpc.handleUnaryCall; + updateLocalPeerInfo: grpc.handleUnaryCall; + updatePeerInfo: grpc.handleUnaryCall; + updateSecret: grpc.handleUnaryCall; + verifyFile: grpc.handleUnaryCall; +} + +export interface IAgentClient { + addPeer(request: Agent_pb.PeerInfoMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + addPeer(request: Agent_pb.PeerInfoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + addPeer(request: Agent_pb.PeerInfoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + decryptFile(request: Agent_pb.DecryptFileMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + decryptFile(request: Agent_pb.DecryptFileMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + decryptFile(request: Agent_pb.DecryptFileMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + deleteKey(request: Agent_pb.StringMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + deleteKey(request: Agent_pb.StringMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + deleteKey(request: Agent_pb.StringMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + deleteSecret(request: Agent_pb.SecretPathMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + deleteSecret(request: Agent_pb.SecretPathMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + deleteSecret(request: Agent_pb.SecretPathMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + deleteVault(request: Agent_pb.StringMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + deleteVault(request: Agent_pb.StringMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + deleteVault(request: Agent_pb.StringMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + deriveKey(request: Agent_pb.DeriveKeyMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + deriveKey(request: Agent_pb.DeriveKeyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + deriveKey(request: Agent_pb.DeriveKeyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + encryptFile(request: Agent_pb.EncryptFileMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + encryptFile(request: Agent_pb.EncryptFileMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + encryptFile(request: Agent_pb.EncryptFileMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + findPeer(request: Agent_pb.ContactPeerMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + findPeer(request: Agent_pb.ContactPeerMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + findPeer(request: Agent_pb.ContactPeerMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + findSocialPeer(request: Agent_pb.ContactPeerMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + findSocialPeer(request: Agent_pb.ContactPeerMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + findSocialPeer(request: Agent_pb.ContactPeerMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + getKey(request: Agent_pb.StringMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + getKey(request: Agent_pb.StringMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + getKey(request: Agent_pb.StringMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + getLocalPeerInfo(request: Agent_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.PeerInfoMessage) => void): grpc.ClientUnaryCall; + getLocalPeerInfo(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.PeerInfoMessage) => void): grpc.ClientUnaryCall; + getLocalPeerInfo(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.PeerInfoMessage) => void): grpc.ClientUnaryCall; + getPeerInfo(request: Agent_pb.StringMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.PeerInfoMessage) => void): grpc.ClientUnaryCall; + getPeerInfo(request: Agent_pb.StringMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.PeerInfoMessage) => void): grpc.ClientUnaryCall; + getPeerInfo(request: Agent_pb.StringMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.PeerInfoMessage) => void): grpc.ClientUnaryCall; + getPrimaryKeyPair(request: Agent_pb.BooleanMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.KeyPairMessage) => void): grpc.ClientUnaryCall; + getPrimaryKeyPair(request: Agent_pb.BooleanMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.KeyPairMessage) => void): grpc.ClientUnaryCall; + getPrimaryKeyPair(request: Agent_pb.BooleanMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.KeyPairMessage) => void): grpc.ClientUnaryCall; + getSecret(request: Agent_pb.SecretPathMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + getSecret(request: Agent_pb.SecretPathMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + getSecret(request: Agent_pb.SecretPathMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + getStatus(request: Agent_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.AgentStatusMessage) => void): grpc.ClientUnaryCall; + getStatus(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.AgentStatusMessage) => void): grpc.ClientUnaryCall; + getStatus(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.AgentStatusMessage) => void): grpc.ClientUnaryCall; + listKeys(request: Agent_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + listKeys(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + listKeys(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + listNodes(request: Agent_pb.BooleanMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + listNodes(request: Agent_pb.BooleanMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + listNodes(request: Agent_pb.BooleanMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + listPeers(request: Agent_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + listPeers(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + listPeers(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + listSecrets(request: Agent_pb.StringMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + listSecrets(request: Agent_pb.StringMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + listSecrets(request: Agent_pb.StringMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + listVaults(request: Agent_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + listVaults(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + listVaults(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + newNode(request: Agent_pb.NewNodeMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + newNode(request: Agent_pb.NewNodeMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + newNode(request: Agent_pb.NewNodeMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + newSecret(request: Agent_pb.SecretContentMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + newSecret(request: Agent_pb.SecretContentMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + newSecret(request: Agent_pb.SecretContentMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + newVault(request: Agent_pb.StringMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + newVault(request: Agent_pb.StringMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + newVault(request: Agent_pb.StringMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + pingPeer(request: Agent_pb.ContactPeerMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + pingPeer(request: Agent_pb.ContactPeerMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + pingPeer(request: Agent_pb.ContactPeerMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + pullVault(request: Agent_pb.VaultPathMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + pullVault(request: Agent_pb.VaultPathMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + pullVault(request: Agent_pb.VaultPathMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + registerNode(request: Agent_pb.StringMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + registerNode(request: Agent_pb.StringMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + registerNode(request: Agent_pb.StringMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + requestHolePunch(request: Agent_pb.StringMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + requestHolePunch(request: Agent_pb.StringMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + requestHolePunch(request: Agent_pb.StringMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + requestRelay(request: Agent_pb.StringMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + requestRelay(request: Agent_pb.StringMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + requestRelay(request: Agent_pb.StringMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + scanVaultNames(request: Agent_pb.StringMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + scanVaultNames(request: Agent_pb.StringMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + scanVaultNames(request: Agent_pb.StringMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + signFile(request: Agent_pb.SignFileMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + signFile(request: Agent_pb.SignFileMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + signFile(request: Agent_pb.SignFileMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + stopAgent(request: Agent_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + stopAgent(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + stopAgent(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + toggleStealthMode(request: Agent_pb.BooleanMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + toggleStealthMode(request: Agent_pb.BooleanMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + toggleStealthMode(request: Agent_pb.BooleanMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + updateLocalPeerInfo(request: Agent_pb.PeerInfoMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + updateLocalPeerInfo(request: Agent_pb.PeerInfoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + updateLocalPeerInfo(request: Agent_pb.PeerInfoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + updatePeerInfo(request: Agent_pb.PeerInfoMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + updatePeerInfo(request: Agent_pb.PeerInfoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + updatePeerInfo(request: Agent_pb.PeerInfoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + updateSecret(request: Agent_pb.SecretContentMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + updateSecret(request: Agent_pb.SecretContentMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + updateSecret(request: Agent_pb.SecretContentMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + verifyFile(request: Agent_pb.VerifyFileMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + verifyFile(request: Agent_pb.VerifyFileMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + verifyFile(request: Agent_pb.VerifyFileMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; +} + +export class AgentClient extends grpc.Client implements IAgentClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + public addPeer(request: Agent_pb.PeerInfoMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public addPeer(request: Agent_pb.PeerInfoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public addPeer(request: Agent_pb.PeerInfoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public decryptFile(request: Agent_pb.DecryptFileMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + public decryptFile(request: Agent_pb.DecryptFileMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + public decryptFile(request: Agent_pb.DecryptFileMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + public deleteKey(request: Agent_pb.StringMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public deleteKey(request: Agent_pb.StringMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public deleteKey(request: Agent_pb.StringMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public deleteSecret(request: Agent_pb.SecretPathMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public deleteSecret(request: Agent_pb.SecretPathMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public deleteSecret(request: Agent_pb.SecretPathMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public deleteVault(request: Agent_pb.StringMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public deleteVault(request: Agent_pb.StringMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public deleteVault(request: Agent_pb.StringMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public deriveKey(request: Agent_pb.DeriveKeyMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public deriveKey(request: Agent_pb.DeriveKeyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public deriveKey(request: Agent_pb.DeriveKeyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public encryptFile(request: Agent_pb.EncryptFileMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + public encryptFile(request: Agent_pb.EncryptFileMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + public encryptFile(request: Agent_pb.EncryptFileMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + public findPeer(request: Agent_pb.ContactPeerMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public findPeer(request: Agent_pb.ContactPeerMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public findPeer(request: Agent_pb.ContactPeerMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public findSocialPeer(request: Agent_pb.ContactPeerMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public findSocialPeer(request: Agent_pb.ContactPeerMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public findSocialPeer(request: Agent_pb.ContactPeerMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public getKey(request: Agent_pb.StringMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + public getKey(request: Agent_pb.StringMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + public getKey(request: Agent_pb.StringMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + public getLocalPeerInfo(request: Agent_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.PeerInfoMessage) => void): grpc.ClientUnaryCall; + public getLocalPeerInfo(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.PeerInfoMessage) => void): grpc.ClientUnaryCall; + public getLocalPeerInfo(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.PeerInfoMessage) => void): grpc.ClientUnaryCall; + public getPeerInfo(request: Agent_pb.StringMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.PeerInfoMessage) => void): grpc.ClientUnaryCall; + public getPeerInfo(request: Agent_pb.StringMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.PeerInfoMessage) => void): grpc.ClientUnaryCall; + public getPeerInfo(request: Agent_pb.StringMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.PeerInfoMessage) => void): grpc.ClientUnaryCall; + public getPrimaryKeyPair(request: Agent_pb.BooleanMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.KeyPairMessage) => void): grpc.ClientUnaryCall; + public getPrimaryKeyPair(request: Agent_pb.BooleanMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.KeyPairMessage) => void): grpc.ClientUnaryCall; + public getPrimaryKeyPair(request: Agent_pb.BooleanMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.KeyPairMessage) => void): grpc.ClientUnaryCall; + public getSecret(request: Agent_pb.SecretPathMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + public getSecret(request: Agent_pb.SecretPathMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + public getSecret(request: Agent_pb.SecretPathMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + public getStatus(request: Agent_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.AgentStatusMessage) => void): grpc.ClientUnaryCall; + public getStatus(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.AgentStatusMessage) => void): grpc.ClientUnaryCall; + public getStatus(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.AgentStatusMessage) => void): grpc.ClientUnaryCall; + public listKeys(request: Agent_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + public listKeys(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + public listKeys(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + public listNodes(request: Agent_pb.BooleanMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + public listNodes(request: Agent_pb.BooleanMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + public listNodes(request: Agent_pb.BooleanMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + public listPeers(request: Agent_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + public listPeers(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + public listPeers(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + public listSecrets(request: Agent_pb.StringMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + public listSecrets(request: Agent_pb.StringMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + public listSecrets(request: Agent_pb.StringMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + public listVaults(request: Agent_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + public listVaults(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + public listVaults(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + public newNode(request: Agent_pb.NewNodeMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public newNode(request: Agent_pb.NewNodeMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public newNode(request: Agent_pb.NewNodeMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public newSecret(request: Agent_pb.SecretContentMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public newSecret(request: Agent_pb.SecretContentMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public newSecret(request: Agent_pb.SecretContentMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public newVault(request: Agent_pb.StringMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public newVault(request: Agent_pb.StringMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public newVault(request: Agent_pb.StringMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public pingPeer(request: Agent_pb.ContactPeerMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public pingPeer(request: Agent_pb.ContactPeerMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public pingPeer(request: Agent_pb.ContactPeerMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public pullVault(request: Agent_pb.VaultPathMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public pullVault(request: Agent_pb.VaultPathMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public pullVault(request: Agent_pb.VaultPathMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public registerNode(request: Agent_pb.StringMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public registerNode(request: Agent_pb.StringMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public registerNode(request: Agent_pb.StringMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public requestHolePunch(request: Agent_pb.StringMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public requestHolePunch(request: Agent_pb.StringMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public requestHolePunch(request: Agent_pb.StringMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public requestRelay(request: Agent_pb.StringMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public requestRelay(request: Agent_pb.StringMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public requestRelay(request: Agent_pb.StringMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public scanVaultNames(request: Agent_pb.StringMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + public scanVaultNames(request: Agent_pb.StringMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + public scanVaultNames(request: Agent_pb.StringMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringListMessage) => void): grpc.ClientUnaryCall; + public signFile(request: Agent_pb.SignFileMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + public signFile(request: Agent_pb.SignFileMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + public signFile(request: Agent_pb.SignFileMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.StringMessage) => void): grpc.ClientUnaryCall; + public stopAgent(request: Agent_pb.EmptyMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public stopAgent(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public stopAgent(request: Agent_pb.EmptyMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public toggleStealthMode(request: Agent_pb.BooleanMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public toggleStealthMode(request: Agent_pb.BooleanMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public toggleStealthMode(request: Agent_pb.BooleanMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public updateLocalPeerInfo(request: Agent_pb.PeerInfoMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public updateLocalPeerInfo(request: Agent_pb.PeerInfoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public updateLocalPeerInfo(request: Agent_pb.PeerInfoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public updatePeerInfo(request: Agent_pb.PeerInfoMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public updatePeerInfo(request: Agent_pb.PeerInfoMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public updatePeerInfo(request: Agent_pb.PeerInfoMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public updateSecret(request: Agent_pb.SecretContentMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public updateSecret(request: Agent_pb.SecretContentMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public updateSecret(request: Agent_pb.SecretContentMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public verifyFile(request: Agent_pb.VerifyFileMessage, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public verifyFile(request: Agent_pb.VerifyFileMessage, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; + public verifyFile(request: Agent_pb.VerifyFileMessage, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Agent_pb.BooleanMessage) => void): grpc.ClientUnaryCall; +} diff --git a/proto/compiled/Agent_grpc_pb.js b/proto/compiled/Agent_grpc_pb.js index 97b3a2461d..2a2cecd48c 100644 --- a/proto/compiled/Agent_grpc_pb.js +++ b/proto/compiled/Agent_grpc_pb.js @@ -1 +1,597 @@ -// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('@grpc/grpc-js'); +var Agent_pb = require('./Agent_pb.js'); + +function serialize_agentInterface_AgentStatusMessage(arg) { + if (!(arg instanceof Agent_pb.AgentStatusMessage)) { + throw new Error('Expected argument of type agentInterface.AgentStatusMessage'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_agentInterface_AgentStatusMessage(buffer_arg) { + return Agent_pb.AgentStatusMessage.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_agentInterface_BooleanMessage(arg) { + if (!(arg instanceof Agent_pb.BooleanMessage)) { + throw new Error('Expected argument of type agentInterface.BooleanMessage'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_agentInterface_BooleanMessage(buffer_arg) { + return Agent_pb.BooleanMessage.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_agentInterface_ContactPeerMessage(arg) { + if (!(arg instanceof Agent_pb.ContactPeerMessage)) { + throw new Error('Expected argument of type agentInterface.ContactPeerMessage'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_agentInterface_ContactPeerMessage(buffer_arg) { + return Agent_pb.ContactPeerMessage.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_agentInterface_DecryptFileMessage(arg) { + if (!(arg instanceof Agent_pb.DecryptFileMessage)) { + throw new Error('Expected argument of type agentInterface.DecryptFileMessage'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_agentInterface_DecryptFileMessage(buffer_arg) { + return Agent_pb.DecryptFileMessage.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_agentInterface_DeriveKeyMessage(arg) { + if (!(arg instanceof Agent_pb.DeriveKeyMessage)) { + throw new Error('Expected argument of type agentInterface.DeriveKeyMessage'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_agentInterface_DeriveKeyMessage(buffer_arg) { + return Agent_pb.DeriveKeyMessage.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_agentInterface_EmptyMessage(arg) { + if (!(arg instanceof Agent_pb.EmptyMessage)) { + throw new Error('Expected argument of type agentInterface.EmptyMessage'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_agentInterface_EmptyMessage(buffer_arg) { + return Agent_pb.EmptyMessage.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_agentInterface_EncryptFileMessage(arg) { + if (!(arg instanceof Agent_pb.EncryptFileMessage)) { + throw new Error('Expected argument of type agentInterface.EncryptFileMessage'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_agentInterface_EncryptFileMessage(buffer_arg) { + return Agent_pb.EncryptFileMessage.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_agentInterface_KeyPairMessage(arg) { + if (!(arg instanceof Agent_pb.KeyPairMessage)) { + throw new Error('Expected argument of type agentInterface.KeyPairMessage'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_agentInterface_KeyPairMessage(buffer_arg) { + return Agent_pb.KeyPairMessage.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_agentInterface_NewNodeMessage(arg) { + if (!(arg instanceof Agent_pb.NewNodeMessage)) { + throw new Error('Expected argument of type agentInterface.NewNodeMessage'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_agentInterface_NewNodeMessage(buffer_arg) { + return Agent_pb.NewNodeMessage.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_agentInterface_PeerInfoMessage(arg) { + if (!(arg instanceof Agent_pb.PeerInfoMessage)) { + throw new Error('Expected argument of type agentInterface.PeerInfoMessage'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_agentInterface_PeerInfoMessage(buffer_arg) { + return Agent_pb.PeerInfoMessage.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_agentInterface_SecretContentMessage(arg) { + if (!(arg instanceof Agent_pb.SecretContentMessage)) { + throw new Error('Expected argument of type agentInterface.SecretContentMessage'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_agentInterface_SecretContentMessage(buffer_arg) { + return Agent_pb.SecretContentMessage.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_agentInterface_SecretPathMessage(arg) { + if (!(arg instanceof Agent_pb.SecretPathMessage)) { + throw new Error('Expected argument of type agentInterface.SecretPathMessage'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_agentInterface_SecretPathMessage(buffer_arg) { + return Agent_pb.SecretPathMessage.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_agentInterface_SignFileMessage(arg) { + if (!(arg instanceof Agent_pb.SignFileMessage)) { + throw new Error('Expected argument of type agentInterface.SignFileMessage'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_agentInterface_SignFileMessage(buffer_arg) { + return Agent_pb.SignFileMessage.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_agentInterface_StringListMessage(arg) { + if (!(arg instanceof Agent_pb.StringListMessage)) { + throw new Error('Expected argument of type agentInterface.StringListMessage'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_agentInterface_StringListMessage(buffer_arg) { + return Agent_pb.StringListMessage.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_agentInterface_StringMessage(arg) { + if (!(arg instanceof Agent_pb.StringMessage)) { + throw new Error('Expected argument of type agentInterface.StringMessage'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_agentInterface_StringMessage(buffer_arg) { + return Agent_pb.StringMessage.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_agentInterface_VaultPathMessage(arg) { + if (!(arg instanceof Agent_pb.VaultPathMessage)) { + throw new Error('Expected argument of type agentInterface.VaultPathMessage'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_agentInterface_VaultPathMessage(buffer_arg) { + return Agent_pb.VaultPathMessage.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_agentInterface_VerifyFileMessage(arg) { + if (!(arg instanceof Agent_pb.VerifyFileMessage)) { + throw new Error('Expected argument of type agentInterface.VerifyFileMessage'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_agentInterface_VerifyFileMessage(buffer_arg) { + return Agent_pb.VerifyFileMessage.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +// ///////////////// +// Agent Service // +// ///////////////// +var AgentService = exports.AgentService = { + addPeer: { + path: '/agentInterface.Agent/AddPeer', + requestStream: false, + responseStream: false, + requestType: Agent_pb.PeerInfoMessage, + responseType: Agent_pb.BooleanMessage, + requestSerialize: serialize_agentInterface_PeerInfoMessage, + requestDeserialize: deserialize_agentInterface_PeerInfoMessage, + responseSerialize: serialize_agentInterface_BooleanMessage, + responseDeserialize: deserialize_agentInterface_BooleanMessage, + }, + decryptFile: { + path: '/agentInterface.Agent/DecryptFile', + requestStream: false, + responseStream: false, + requestType: Agent_pb.DecryptFileMessage, + responseType: Agent_pb.StringMessage, + requestSerialize: serialize_agentInterface_DecryptFileMessage, + requestDeserialize: deserialize_agentInterface_DecryptFileMessage, + responseSerialize: serialize_agentInterface_StringMessage, + responseDeserialize: deserialize_agentInterface_StringMessage, + }, + deleteKey: { + path: '/agentInterface.Agent/DeleteKey', + requestStream: false, + responseStream: false, + requestType: Agent_pb.StringMessage, + responseType: Agent_pb.BooleanMessage, + requestSerialize: serialize_agentInterface_StringMessage, + requestDeserialize: deserialize_agentInterface_StringMessage, + responseSerialize: serialize_agentInterface_BooleanMessage, + responseDeserialize: deserialize_agentInterface_BooleanMessage, + }, + deleteSecret: { + path: '/agentInterface.Agent/DeleteSecret', + requestStream: false, + responseStream: false, + requestType: Agent_pb.SecretPathMessage, + responseType: Agent_pb.BooleanMessage, + requestSerialize: serialize_agentInterface_SecretPathMessage, + requestDeserialize: deserialize_agentInterface_SecretPathMessage, + responseSerialize: serialize_agentInterface_BooleanMessage, + responseDeserialize: deserialize_agentInterface_BooleanMessage, + }, + deleteVault: { + path: '/agentInterface.Agent/DeleteVault', + requestStream: false, + responseStream: false, + requestType: Agent_pb.StringMessage, + responseType: Agent_pb.BooleanMessage, + requestSerialize: serialize_agentInterface_StringMessage, + requestDeserialize: deserialize_agentInterface_StringMessage, + responseSerialize: serialize_agentInterface_BooleanMessage, + responseDeserialize: deserialize_agentInterface_BooleanMessage, + }, + deriveKey: { + path: '/agentInterface.Agent/DeriveKey', + requestStream: false, + responseStream: false, + requestType: Agent_pb.DeriveKeyMessage, + responseType: Agent_pb.BooleanMessage, + requestSerialize: serialize_agentInterface_DeriveKeyMessage, + requestDeserialize: deserialize_agentInterface_DeriveKeyMessage, + responseSerialize: serialize_agentInterface_BooleanMessage, + responseDeserialize: deserialize_agentInterface_BooleanMessage, + }, + encryptFile: { + path: '/agentInterface.Agent/EncryptFile', + requestStream: false, + responseStream: false, + requestType: Agent_pb.EncryptFileMessage, + responseType: Agent_pb.StringMessage, + requestSerialize: serialize_agentInterface_EncryptFileMessage, + requestDeserialize: deserialize_agentInterface_EncryptFileMessage, + responseSerialize: serialize_agentInterface_StringMessage, + responseDeserialize: deserialize_agentInterface_StringMessage, + }, + findPeer: { + path: '/agentInterface.Agent/FindPeer', + requestStream: false, + responseStream: false, + requestType: Agent_pb.ContactPeerMessage, + responseType: Agent_pb.BooleanMessage, + requestSerialize: serialize_agentInterface_ContactPeerMessage, + requestDeserialize: deserialize_agentInterface_ContactPeerMessage, + responseSerialize: serialize_agentInterface_BooleanMessage, + responseDeserialize: deserialize_agentInterface_BooleanMessage, + }, + findSocialPeer: { + path: '/agentInterface.Agent/FindSocialPeer', + requestStream: false, + responseStream: false, + requestType: Agent_pb.ContactPeerMessage, + responseType: Agent_pb.BooleanMessage, + requestSerialize: serialize_agentInterface_ContactPeerMessage, + requestDeserialize: deserialize_agentInterface_ContactPeerMessage, + responseSerialize: serialize_agentInterface_BooleanMessage, + responseDeserialize: deserialize_agentInterface_BooleanMessage, + }, + getKey: { + path: '/agentInterface.Agent/GetKey', + requestStream: false, + responseStream: false, + requestType: Agent_pb.StringMessage, + responseType: Agent_pb.StringMessage, + requestSerialize: serialize_agentInterface_StringMessage, + requestDeserialize: deserialize_agentInterface_StringMessage, + responseSerialize: serialize_agentInterface_StringMessage, + responseDeserialize: deserialize_agentInterface_StringMessage, + }, + getLocalPeerInfo: { + path: '/agentInterface.Agent/GetLocalPeerInfo', + requestStream: false, + responseStream: false, + requestType: Agent_pb.EmptyMessage, + responseType: Agent_pb.PeerInfoMessage, + requestSerialize: serialize_agentInterface_EmptyMessage, + requestDeserialize: deserialize_agentInterface_EmptyMessage, + responseSerialize: serialize_agentInterface_PeerInfoMessage, + responseDeserialize: deserialize_agentInterface_PeerInfoMessage, + }, + getPeerInfo: { + path: '/agentInterface.Agent/GetPeerInfo', + requestStream: false, + responseStream: false, + requestType: Agent_pb.StringMessage, + responseType: Agent_pb.PeerInfoMessage, + requestSerialize: serialize_agentInterface_StringMessage, + requestDeserialize: deserialize_agentInterface_StringMessage, + responseSerialize: serialize_agentInterface_PeerInfoMessage, + responseDeserialize: deserialize_agentInterface_PeerInfoMessage, + }, + getPrimaryKeyPair: { + path: '/agentInterface.Agent/GetPrimaryKeyPair', + requestStream: false, + responseStream: false, + requestType: Agent_pb.BooleanMessage, + responseType: Agent_pb.KeyPairMessage, + requestSerialize: serialize_agentInterface_BooleanMessage, + requestDeserialize: deserialize_agentInterface_BooleanMessage, + responseSerialize: serialize_agentInterface_KeyPairMessage, + responseDeserialize: deserialize_agentInterface_KeyPairMessage, + }, + getSecret: { + path: '/agentInterface.Agent/GetSecret', + requestStream: false, + responseStream: false, + requestType: Agent_pb.SecretPathMessage, + responseType: Agent_pb.StringMessage, + requestSerialize: serialize_agentInterface_SecretPathMessage, + requestDeserialize: deserialize_agentInterface_SecretPathMessage, + responseSerialize: serialize_agentInterface_StringMessage, + responseDeserialize: deserialize_agentInterface_StringMessage, + }, + getStatus: { + path: '/agentInterface.Agent/GetStatus', + requestStream: false, + responseStream: false, + requestType: Agent_pb.EmptyMessage, + responseType: Agent_pb.AgentStatusMessage, + requestSerialize: serialize_agentInterface_EmptyMessage, + requestDeserialize: deserialize_agentInterface_EmptyMessage, + responseSerialize: serialize_agentInterface_AgentStatusMessage, + responseDeserialize: deserialize_agentInterface_AgentStatusMessage, + }, + listKeys: { + path: '/agentInterface.Agent/ListKeys', + requestStream: false, + responseStream: false, + requestType: Agent_pb.EmptyMessage, + responseType: Agent_pb.StringListMessage, + requestSerialize: serialize_agentInterface_EmptyMessage, + requestDeserialize: deserialize_agentInterface_EmptyMessage, + responseSerialize: serialize_agentInterface_StringListMessage, + responseDeserialize: deserialize_agentInterface_StringListMessage, + }, + listNodes: { + path: '/agentInterface.Agent/ListNodes', + requestStream: false, + responseStream: false, + requestType: Agent_pb.BooleanMessage, + responseType: Agent_pb.StringListMessage, + requestSerialize: serialize_agentInterface_BooleanMessage, + requestDeserialize: deserialize_agentInterface_BooleanMessage, + responseSerialize: serialize_agentInterface_StringListMessage, + responseDeserialize: deserialize_agentInterface_StringListMessage, + }, + listPeers: { + path: '/agentInterface.Agent/ListPeers', + requestStream: false, + responseStream: false, + requestType: Agent_pb.EmptyMessage, + responseType: Agent_pb.StringListMessage, + requestSerialize: serialize_agentInterface_EmptyMessage, + requestDeserialize: deserialize_agentInterface_EmptyMessage, + responseSerialize: serialize_agentInterface_StringListMessage, + responseDeserialize: deserialize_agentInterface_StringListMessage, + }, + listSecrets: { + path: '/agentInterface.Agent/ListSecrets', + requestStream: false, + responseStream: false, + requestType: Agent_pb.StringMessage, + responseType: Agent_pb.StringListMessage, + requestSerialize: serialize_agentInterface_StringMessage, + requestDeserialize: deserialize_agentInterface_StringMessage, + responseSerialize: serialize_agentInterface_StringListMessage, + responseDeserialize: deserialize_agentInterface_StringListMessage, + }, + listVaults: { + path: '/agentInterface.Agent/ListVaults', + requestStream: false, + responseStream: false, + requestType: Agent_pb.EmptyMessage, + responseType: Agent_pb.StringListMessage, + requestSerialize: serialize_agentInterface_EmptyMessage, + requestDeserialize: deserialize_agentInterface_EmptyMessage, + responseSerialize: serialize_agentInterface_StringListMessage, + responseDeserialize: deserialize_agentInterface_StringListMessage, + }, + newNode: { + path: '/agentInterface.Agent/NewNode', + requestStream: false, + responseStream: false, + requestType: Agent_pb.NewNodeMessage, + responseType: Agent_pb.BooleanMessage, + requestSerialize: serialize_agentInterface_NewNodeMessage, + requestDeserialize: deserialize_agentInterface_NewNodeMessage, + responseSerialize: serialize_agentInterface_BooleanMessage, + responseDeserialize: deserialize_agentInterface_BooleanMessage, + }, + newSecret: { + path: '/agentInterface.Agent/NewSecret', + requestStream: false, + responseStream: false, + requestType: Agent_pb.SecretContentMessage, + responseType: Agent_pb.BooleanMessage, + requestSerialize: serialize_agentInterface_SecretContentMessage, + requestDeserialize: deserialize_agentInterface_SecretContentMessage, + responseSerialize: serialize_agentInterface_BooleanMessage, + responseDeserialize: deserialize_agentInterface_BooleanMessage, + }, + newVault: { + path: '/agentInterface.Agent/NewVault', + requestStream: false, + responseStream: false, + requestType: Agent_pb.StringMessage, + responseType: Agent_pb.BooleanMessage, + requestSerialize: serialize_agentInterface_StringMessage, + requestDeserialize: deserialize_agentInterface_StringMessage, + responseSerialize: serialize_agentInterface_BooleanMessage, + responseDeserialize: deserialize_agentInterface_BooleanMessage, + }, + pingPeer: { + path: '/agentInterface.Agent/PingPeer', + requestStream: false, + responseStream: false, + requestType: Agent_pb.ContactPeerMessage, + responseType: Agent_pb.BooleanMessage, + requestSerialize: serialize_agentInterface_ContactPeerMessage, + requestDeserialize: deserialize_agentInterface_ContactPeerMessage, + responseSerialize: serialize_agentInterface_BooleanMessage, + responseDeserialize: deserialize_agentInterface_BooleanMessage, + }, + pullVault: { + path: '/agentInterface.Agent/PullVault', + requestStream: false, + responseStream: false, + requestType: Agent_pb.VaultPathMessage, + responseType: Agent_pb.BooleanMessage, + requestSerialize: serialize_agentInterface_VaultPathMessage, + requestDeserialize: deserialize_agentInterface_VaultPathMessage, + responseSerialize: serialize_agentInterface_BooleanMessage, + responseDeserialize: deserialize_agentInterface_BooleanMessage, + }, + registerNode: { + path: '/agentInterface.Agent/RegisterNode', + requestStream: false, + responseStream: false, + requestType: Agent_pb.StringMessage, + responseType: Agent_pb.BooleanMessage, + requestSerialize: serialize_agentInterface_StringMessage, + requestDeserialize: deserialize_agentInterface_StringMessage, + responseSerialize: serialize_agentInterface_BooleanMessage, + responseDeserialize: deserialize_agentInterface_BooleanMessage, + }, + requestHolePunch: { + path: '/agentInterface.Agent/RequestHolePunch', + requestStream: false, + responseStream: false, + requestType: Agent_pb.StringMessage, + responseType: Agent_pb.BooleanMessage, + requestSerialize: serialize_agentInterface_StringMessage, + requestDeserialize: deserialize_agentInterface_StringMessage, + responseSerialize: serialize_agentInterface_BooleanMessage, + responseDeserialize: deserialize_agentInterface_BooleanMessage, + }, + requestRelay: { + path: '/agentInterface.Agent/RequestRelay', + requestStream: false, + responseStream: false, + requestType: Agent_pb.StringMessage, + responseType: Agent_pb.BooleanMessage, + requestSerialize: serialize_agentInterface_StringMessage, + requestDeserialize: deserialize_agentInterface_StringMessage, + responseSerialize: serialize_agentInterface_BooleanMessage, + responseDeserialize: deserialize_agentInterface_BooleanMessage, + }, + scanVaultNames: { + path: '/agentInterface.Agent/ScanVaultNames', + requestStream: false, + responseStream: false, + requestType: Agent_pb.StringMessage, + responseType: Agent_pb.StringListMessage, + requestSerialize: serialize_agentInterface_StringMessage, + requestDeserialize: deserialize_agentInterface_StringMessage, + responseSerialize: serialize_agentInterface_StringListMessage, + responseDeserialize: deserialize_agentInterface_StringListMessage, + }, + signFile: { + path: '/agentInterface.Agent/SignFile', + requestStream: false, + responseStream: false, + requestType: Agent_pb.SignFileMessage, + responseType: Agent_pb.StringMessage, + requestSerialize: serialize_agentInterface_SignFileMessage, + requestDeserialize: deserialize_agentInterface_SignFileMessage, + responseSerialize: serialize_agentInterface_StringMessage, + responseDeserialize: deserialize_agentInterface_StringMessage, + }, + stopAgent: { + path: '/agentInterface.Agent/StopAgent', + requestStream: false, + responseStream: false, + requestType: Agent_pb.EmptyMessage, + responseType: Agent_pb.BooleanMessage, + requestSerialize: serialize_agentInterface_EmptyMessage, + requestDeserialize: deserialize_agentInterface_EmptyMessage, + responseSerialize: serialize_agentInterface_BooleanMessage, + responseDeserialize: deserialize_agentInterface_BooleanMessage, + }, + toggleStealthMode: { + path: '/agentInterface.Agent/ToggleStealthMode', + requestStream: false, + responseStream: false, + requestType: Agent_pb.BooleanMessage, + responseType: Agent_pb.BooleanMessage, + requestSerialize: serialize_agentInterface_BooleanMessage, + requestDeserialize: deserialize_agentInterface_BooleanMessage, + responseSerialize: serialize_agentInterface_BooleanMessage, + responseDeserialize: deserialize_agentInterface_BooleanMessage, + }, + updateLocalPeerInfo: { + path: '/agentInterface.Agent/UpdateLocalPeerInfo', + requestStream: false, + responseStream: false, + requestType: Agent_pb.PeerInfoMessage, + responseType: Agent_pb.BooleanMessage, + requestSerialize: serialize_agentInterface_PeerInfoMessage, + requestDeserialize: deserialize_agentInterface_PeerInfoMessage, + responseSerialize: serialize_agentInterface_BooleanMessage, + responseDeserialize: deserialize_agentInterface_BooleanMessage, + }, + updatePeerInfo: { + path: '/agentInterface.Agent/UpdatePeerInfo', + requestStream: false, + responseStream: false, + requestType: Agent_pb.PeerInfoMessage, + responseType: Agent_pb.BooleanMessage, + requestSerialize: serialize_agentInterface_PeerInfoMessage, + requestDeserialize: deserialize_agentInterface_PeerInfoMessage, + responseSerialize: serialize_agentInterface_BooleanMessage, + responseDeserialize: deserialize_agentInterface_BooleanMessage, + }, + updateSecret: { + path: '/agentInterface.Agent/UpdateSecret', + requestStream: false, + responseStream: false, + requestType: Agent_pb.SecretContentMessage, + responseType: Agent_pb.BooleanMessage, + requestSerialize: serialize_agentInterface_SecretContentMessage, + requestDeserialize: deserialize_agentInterface_SecretContentMessage, + responseSerialize: serialize_agentInterface_BooleanMessage, + responseDeserialize: deserialize_agentInterface_BooleanMessage, + }, + verifyFile: { + path: '/agentInterface.Agent/VerifyFile', + requestStream: false, + responseStream: false, + requestType: Agent_pb.VerifyFileMessage, + responseType: Agent_pb.BooleanMessage, + requestSerialize: serialize_agentInterface_VerifyFileMessage, + requestDeserialize: deserialize_agentInterface_VerifyFileMessage, + responseSerialize: serialize_agentInterface_BooleanMessage, + responseDeserialize: deserialize_agentInterface_BooleanMessage, + }, +}; + +exports.AgentClient = grpc.makeGenericClientConstructor(AgentService); diff --git a/proto/compiled/Agent_pb.d.ts b/proto/compiled/Agent_pb.d.ts index ae596fa2ff..e25f94455e 100644 --- a/proto/compiled/Agent_pb.d.ts +++ b/proto/compiled/Agent_pb.d.ts @@ -1,4 +1,4 @@ -// package: agent +// package: agentInterface // file: Agent.proto /* tslint:disable */ @@ -6,370 +6,222 @@ import * as jspb from "google-protobuf"; -export class AgentMessage extends jspb.Message { - getType(): AgentMessageType; - setType(value: AgentMessageType): AgentMessage; - - getIsresponse(): boolean; - setIsresponse(value: boolean): AgentMessage; - - getNodePath(): string; - setNodePath(value: string): AgentMessage; - - getSubMessage(): Uint8Array | string; - getSubMessage_asU8(): Uint8Array; - getSubMessage_asB64(): string; - setSubMessage(value: Uint8Array | string): AgentMessage; - +export class EmptyMessage extends jspb.Message { serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AgentMessage.AsObject; - static toObject(includeInstance: boolean, msg: AgentMessage): AgentMessage.AsObject; + toObject(includeInstance?: boolean): EmptyMessage.AsObject; + static toObject(includeInstance: boolean, msg: EmptyMessage): EmptyMessage.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AgentMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AgentMessage; - static deserializeBinaryFromReader(message: AgentMessage, reader: jspb.BinaryReader): AgentMessage; + static serializeBinaryToWriter(message: EmptyMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EmptyMessage; + static deserializeBinaryFromReader(message: EmptyMessage, reader: jspb.BinaryReader): EmptyMessage; } -export namespace AgentMessage { +export namespace EmptyMessage { export type AsObject = { - type: AgentMessageType, - isresponse: boolean, - nodePath: string, - subMessage: Uint8Array | string, } } -export class ErrorMessage extends jspb.Message { - getError(): string; - setError(value: string): ErrorMessage; +export class StringMessage extends jspb.Message { + getS(): string; + setS(value: string): StringMessage; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ErrorMessage.AsObject; - static toObject(includeInstance: boolean, msg: ErrorMessage): ErrorMessage.AsObject; + toObject(includeInstance?: boolean): StringMessage.AsObject; + static toObject(includeInstance: boolean, msg: StringMessage): StringMessage.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ErrorMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ErrorMessage; - static deserializeBinaryFromReader(message: ErrorMessage, reader: jspb.BinaryReader): ErrorMessage; + static serializeBinaryToWriter(message: StringMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StringMessage; + static deserializeBinaryFromReader(message: StringMessage, reader: jspb.BinaryReader): StringMessage; } -export namespace ErrorMessage { +export namespace StringMessage { export type AsObject = { - error: string, + s: string, } } -export class RegisterNodeRequestMessage extends jspb.Message { - getPassphrase(): string; - setPassphrase(value: string): RegisterNodeRequestMessage; +export class BooleanMessage extends jspb.Message { + getB(): boolean; + setB(value: boolean): BooleanMessage; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RegisterNodeRequestMessage.AsObject; - static toObject(includeInstance: boolean, msg: RegisterNodeRequestMessage): RegisterNodeRequestMessage.AsObject; + toObject(includeInstance?: boolean): BooleanMessage.AsObject; + static toObject(includeInstance: boolean, msg: BooleanMessage): BooleanMessage.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RegisterNodeRequestMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RegisterNodeRequestMessage; - static deserializeBinaryFromReader(message: RegisterNodeRequestMessage, reader: jspb.BinaryReader): RegisterNodeRequestMessage; + static serializeBinaryToWriter(message: BooleanMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BooleanMessage; + static deserializeBinaryFromReader(message: BooleanMessage, reader: jspb.BinaryReader): BooleanMessage; } -export namespace RegisterNodeRequestMessage { +export namespace BooleanMessage { export type AsObject = { - passphrase: string, + b: boolean, } } -export class RegisterNodeResponseMessage extends jspb.Message { - getSuccessful(): boolean; - setSuccessful(value: boolean): RegisterNodeResponseMessage; +export class StringListMessage extends jspb.Message { + clearSList(): void; + getSList(): Array; + setSList(value: Array): StringListMessage; + addS(value: string, index?: number): string; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RegisterNodeResponseMessage.AsObject; - static toObject(includeInstance: boolean, msg: RegisterNodeResponseMessage): RegisterNodeResponseMessage.AsObject; + toObject(includeInstance?: boolean): StringListMessage.AsObject; + static toObject(includeInstance: boolean, msg: StringListMessage): StringListMessage.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RegisterNodeResponseMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RegisterNodeResponseMessage; - static deserializeBinaryFromReader(message: RegisterNodeResponseMessage, reader: jspb.BinaryReader): RegisterNodeResponseMessage; + static serializeBinaryToWriter(message: StringListMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StringListMessage; + static deserializeBinaryFromReader(message: StringListMessage, reader: jspb.BinaryReader): StringListMessage; } -export namespace RegisterNodeResponseMessage { +export namespace StringListMessage { export type AsObject = { - successful: boolean, + sList: Array, } } -export class NewNodeRequestMessage extends jspb.Message { - getName(): string; - setName(value: string): NewNodeRequestMessage; +export class PeerInfoMessage extends jspb.Message { + getPublicKey(): string; + setPublicKey(value: string): PeerInfoMessage; - getEmail(): string; - setEmail(value: string): NewNodeRequestMessage; + getRelayPublicKey(): string; + setRelayPublicKey(value: string): PeerInfoMessage; - getPassphrase(): string; - setPassphrase(value: string): NewNodeRequestMessage; + getPeerAddress(): string; + setPeerAddress(value: string): PeerInfoMessage; - getNbits(): number; - setNbits(value: number): NewNodeRequestMessage; + getApiAddress(): string; + setApiAddress(value: string): PeerInfoMessage; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NewNodeRequestMessage.AsObject; - static toObject(includeInstance: boolean, msg: NewNodeRequestMessage): NewNodeRequestMessage.AsObject; + toObject(includeInstance?: boolean): PeerInfoMessage.AsObject; + static toObject(includeInstance: boolean, msg: PeerInfoMessage): PeerInfoMessage.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NewNodeRequestMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NewNodeRequestMessage; - static deserializeBinaryFromReader(message: NewNodeRequestMessage, reader: jspb.BinaryReader): NewNodeRequestMessage; + static serializeBinaryToWriter(message: PeerInfoMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PeerInfoMessage; + static deserializeBinaryFromReader(message: PeerInfoMessage, reader: jspb.BinaryReader): PeerInfoMessage; } -export namespace NewNodeRequestMessage { +export namespace PeerInfoMessage { export type AsObject = { - name: string, - email: string, - passphrase: string, - nbits: number, + publicKey: string, + relayPublicKey: string, + peerAddress: string, + apiAddress: string, } } -export class NewNodeResponseMessage extends jspb.Message { - getSuccessful(): boolean; - setSuccessful(value: boolean): NewNodeResponseMessage; +export class AgentStatusMessage extends jspb.Message { + getStatus(): AgentStatusType; + setStatus(value: AgentStatusType): AgentStatusMessage; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NewNodeResponseMessage.AsObject; - static toObject(includeInstance: boolean, msg: NewNodeResponseMessage): NewNodeResponseMessage.AsObject; + toObject(includeInstance?: boolean): AgentStatusMessage.AsObject; + static toObject(includeInstance: boolean, msg: AgentStatusMessage): AgentStatusMessage.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NewNodeResponseMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NewNodeResponseMessage; - static deserializeBinaryFromReader(message: NewNodeResponseMessage, reader: jspb.BinaryReader): NewNodeResponseMessage; + static serializeBinaryToWriter(message: AgentStatusMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AgentStatusMessage; + static deserializeBinaryFromReader(message: AgentStatusMessage, reader: jspb.BinaryReader): AgentStatusMessage; } -export namespace NewNodeResponseMessage { +export namespace AgentStatusMessage { export type AsObject = { - successful: boolean, + status: AgentStatusType, } } -export class ListNodesRequestMessage extends jspb.Message { - getUnlockedOnly(): boolean; - setUnlockedOnly(value: boolean): ListNodesRequestMessage; - +export class NewNodeMessage extends jspb.Message { + getUserid(): string; + setUserid(value: string): NewNodeMessage; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListNodesRequestMessage.AsObject; - static toObject(includeInstance: boolean, msg: ListNodesRequestMessage): ListNodesRequestMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListNodesRequestMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListNodesRequestMessage; - static deserializeBinaryFromReader(message: ListNodesRequestMessage, reader: jspb.BinaryReader): ListNodesRequestMessage; -} - -export namespace ListNodesRequestMessage { - export type AsObject = { - unlockedOnly: boolean, - } -} + getPassphrase(): string; + setPassphrase(value: string): NewNodeMessage; -export class ListNodesResponseMessage extends jspb.Message { - clearNodesList(): void; - getNodesList(): Array; - setNodesList(value: Array): ListNodesResponseMessage; - addNodes(value: string, index?: number): string; + getNbits(): number; + setNbits(value: number): NewNodeMessage; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListNodesResponseMessage.AsObject; - static toObject(includeInstance: boolean, msg: ListNodesResponseMessage): ListNodesResponseMessage.AsObject; + toObject(includeInstance?: boolean): NewNodeMessage.AsObject; + static toObject(includeInstance: boolean, msg: NewNodeMessage): NewNodeMessage.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListNodesResponseMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListNodesResponseMessage; - static deserializeBinaryFromReader(message: ListNodesResponseMessage, reader: jspb.BinaryReader): ListNodesResponseMessage; + static serializeBinaryToWriter(message: NewNodeMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NewNodeMessage; + static deserializeBinaryFromReader(message: NewNodeMessage, reader: jspb.BinaryReader): NewNodeMessage; } -export namespace ListNodesResponseMessage { +export namespace NewNodeMessage { export type AsObject = { - nodesList: Array, + userid: string, + passphrase: string, + nbits: number, } } -export class SignFileRequestMessage extends jspb.Message { - getFilePath(): string; - setFilePath(value: string): SignFileRequestMessage; +export class DeriveKeyMessage extends jspb.Message { + getVaultName(): string; + setVaultName(value: string): DeriveKeyMessage; - getPrivateKeyPath(): string; - setPrivateKeyPath(value: string): SignFileRequestMessage; + getKeyName(): string; + setKeyName(value: string): DeriveKeyMessage; getPassphrase(): string; - setPassphrase(value: string): SignFileRequestMessage; + setPassphrase(value: string): DeriveKeyMessage; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SignFileRequestMessage.AsObject; - static toObject(includeInstance: boolean, msg: SignFileRequestMessage): SignFileRequestMessage.AsObject; + toObject(includeInstance?: boolean): DeriveKeyMessage.AsObject; + static toObject(includeInstance: boolean, msg: DeriveKeyMessage): DeriveKeyMessage.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SignFileRequestMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SignFileRequestMessage; - static deserializeBinaryFromReader(message: SignFileRequestMessage, reader: jspb.BinaryReader): SignFileRequestMessage; + static serializeBinaryToWriter(message: DeriveKeyMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeriveKeyMessage; + static deserializeBinaryFromReader(message: DeriveKeyMessage, reader: jspb.BinaryReader): DeriveKeyMessage; } -export namespace SignFileRequestMessage { +export namespace DeriveKeyMessage { export type AsObject = { - filePath: string, - privateKeyPath: string, + vaultName: string, + keyName: string, passphrase: string, } } -export class SignFileResponseMessage extends jspb.Message { - getSignaturePath(): string; - setSignaturePath(value: string): SignFileResponseMessage; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SignFileResponseMessage.AsObject; - static toObject(includeInstance: boolean, msg: SignFileResponseMessage): SignFileResponseMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SignFileResponseMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SignFileResponseMessage; - static deserializeBinaryFromReader(message: SignFileResponseMessage, reader: jspb.BinaryReader): SignFileResponseMessage; -} - -export namespace SignFileResponseMessage { - export type AsObject = { - signaturePath: string, - } -} - -export class VerifyFileRequestMessage extends jspb.Message { +export class SignFileMessage extends jspb.Message { getFilePath(): string; - setFilePath(value: string): VerifyFileRequestMessage; - - getSignaturePath(): string; - setSignaturePath(value: string): VerifyFileRequestMessage; - - getPublicKeyPath(): string; - setPublicKeyPath(value: string): VerifyFileRequestMessage; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VerifyFileRequestMessage.AsObject; - static toObject(includeInstance: boolean, msg: VerifyFileRequestMessage): VerifyFileRequestMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VerifyFileRequestMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VerifyFileRequestMessage; - static deserializeBinaryFromReader(message: VerifyFileRequestMessage, reader: jspb.BinaryReader): VerifyFileRequestMessage; -} - -export namespace VerifyFileRequestMessage { - export type AsObject = { - filePath: string, - signaturePath: string, - publicKeyPath: string, - } -} - -export class VerifyFileResponseMessage extends jspb.Message { - getVerified(): boolean; - setVerified(value: boolean): VerifyFileResponseMessage; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): VerifyFileResponseMessage.AsObject; - static toObject(includeInstance: boolean, msg: VerifyFileResponseMessage): VerifyFileResponseMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: VerifyFileResponseMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): VerifyFileResponseMessage; - static deserializeBinaryFromReader(message: VerifyFileResponseMessage, reader: jspb.BinaryReader): VerifyFileResponseMessage; -} - -export namespace VerifyFileResponseMessage { - export type AsObject = { - verified: boolean, - } -} - -export class EncryptFileRequestMessage extends jspb.Message { - getFilePath(): string; - setFilePath(value: string): EncryptFileRequestMessage; - - getPublicKeyPath(): string; - setPublicKeyPath(value: string): EncryptFileRequestMessage; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EncryptFileRequestMessage.AsObject; - static toObject(includeInstance: boolean, msg: EncryptFileRequestMessage): EncryptFileRequestMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EncryptFileRequestMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EncryptFileRequestMessage; - static deserializeBinaryFromReader(message: EncryptFileRequestMessage, reader: jspb.BinaryReader): EncryptFileRequestMessage; -} - -export namespace EncryptFileRequestMessage { - export type AsObject = { - filePath: string, - publicKeyPath: string, - } -} - -export class EncryptFileResponseMessage extends jspb.Message { - getEncryptedpath(): string; - setEncryptedpath(value: string): EncryptFileResponseMessage; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EncryptFileResponseMessage.AsObject; - static toObject(includeInstance: boolean, msg: EncryptFileResponseMessage): EncryptFileResponseMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EncryptFileResponseMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EncryptFileResponseMessage; - static deserializeBinaryFromReader(message: EncryptFileResponseMessage, reader: jspb.BinaryReader): EncryptFileResponseMessage; -} - -export namespace EncryptFileResponseMessage { - export type AsObject = { - encryptedpath: string, - } -} - -export class DecryptFileRequestMessage extends jspb.Message { - getFilePath(): string; - setFilePath(value: string): DecryptFileRequestMessage; + setFilePath(value: string): SignFileMessage; getPrivateKeyPath(): string; - setPrivateKeyPath(value: string): DecryptFileRequestMessage; + setPrivateKeyPath(value: string): SignFileMessage; getPassphrase(): string; - setPassphrase(value: string): DecryptFileRequestMessage; + setPassphrase(value: string): SignFileMessage; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DecryptFileRequestMessage.AsObject; - static toObject(includeInstance: boolean, msg: DecryptFileRequestMessage): DecryptFileRequestMessage.AsObject; + toObject(includeInstance?: boolean): SignFileMessage.AsObject; + static toObject(includeInstance: boolean, msg: SignFileMessage): SignFileMessage.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DecryptFileRequestMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DecryptFileRequestMessage; - static deserializeBinaryFromReader(message: DecryptFileRequestMessage, reader: jspb.BinaryReader): DecryptFileRequestMessage; + static serializeBinaryToWriter(message: SignFileMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SignFileMessage; + static deserializeBinaryFromReader(message: SignFileMessage, reader: jspb.BinaryReader): SignFileMessage; } -export namespace DecryptFileRequestMessage { +export namespace SignFileMessage { export type AsObject = { filePath: string, privateKeyPath: string, @@ -377,765 +229,219 @@ export namespace DecryptFileRequestMessage { } } -export class DecryptFileResponseMessage extends jspb.Message { - getDecryptedpath(): string; - setDecryptedpath(value: string): DecryptFileResponseMessage; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DecryptFileResponseMessage.AsObject; - static toObject(includeInstance: boolean, msg: DecryptFileResponseMessage): DecryptFileResponseMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DecryptFileResponseMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DecryptFileResponseMessage; - static deserializeBinaryFromReader(message: DecryptFileResponseMessage, reader: jspb.BinaryReader): DecryptFileResponseMessage; -} - -export namespace DecryptFileResponseMessage { - export type AsObject = { - decryptedpath: string, - } -} - -export class ListVaultsRequestMessage extends jspb.Message { - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListVaultsRequestMessage.AsObject; - static toObject(includeInstance: boolean, msg: ListVaultsRequestMessage): ListVaultsRequestMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListVaultsRequestMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListVaultsRequestMessage; - static deserializeBinaryFromReader(message: ListVaultsRequestMessage, reader: jspb.BinaryReader): ListVaultsRequestMessage; -} - -export namespace ListVaultsRequestMessage { - export type AsObject = { - } -} - -export class ListVaultsResponseMessage extends jspb.Message { - clearVaultNamesList(): void; - getVaultNamesList(): Array; - setVaultNamesList(value: Array): ListVaultsResponseMessage; - addVaultNames(value: string, index?: number): string; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListVaultsResponseMessage.AsObject; - static toObject(includeInstance: boolean, msg: ListVaultsResponseMessage): ListVaultsResponseMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListVaultsResponseMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListVaultsResponseMessage; - static deserializeBinaryFromReader(message: ListVaultsResponseMessage, reader: jspb.BinaryReader): ListVaultsResponseMessage; -} - -export namespace ListVaultsResponseMessage { - export type AsObject = { - vaultNamesList: Array, - } -} - -export class NewVaultRequestMessage extends jspb.Message { - getVaultName(): string; - setVaultName(value: string): NewVaultRequestMessage; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NewVaultRequestMessage.AsObject; - static toObject(includeInstance: boolean, msg: NewVaultRequestMessage): NewVaultRequestMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NewVaultRequestMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NewVaultRequestMessage; - static deserializeBinaryFromReader(message: NewVaultRequestMessage, reader: jspb.BinaryReader): NewVaultRequestMessage; -} - -export namespace NewVaultRequestMessage { - export type AsObject = { - vaultName: string, - } -} - -export class NewVaultResponseMessage extends jspb.Message { - getSuccessful(): boolean; - setSuccessful(value: boolean): NewVaultResponseMessage; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NewVaultResponseMessage.AsObject; - static toObject(includeInstance: boolean, msg: NewVaultResponseMessage): NewVaultResponseMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NewVaultResponseMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NewVaultResponseMessage; - static deserializeBinaryFromReader(message: NewVaultResponseMessage, reader: jspb.BinaryReader): NewVaultResponseMessage; -} - -export namespace NewVaultResponseMessage { - export type AsObject = { - successful: boolean, - } -} - -export class DestroyVaultRequestMessage extends jspb.Message { - getVaultName(): string; - setVaultName(value: string): DestroyVaultRequestMessage; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DestroyVaultRequestMessage.AsObject; - static toObject(includeInstance: boolean, msg: DestroyVaultRequestMessage): DestroyVaultRequestMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DestroyVaultRequestMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DestroyVaultRequestMessage; - static deserializeBinaryFromReader(message: DestroyVaultRequestMessage, reader: jspb.BinaryReader): DestroyVaultRequestMessage; -} - -export namespace DestroyVaultRequestMessage { - export type AsObject = { - vaultName: string, - } -} - -export class DestroyVaultResponseMessage extends jspb.Message { - getSuccessful(): boolean; - setSuccessful(value: boolean): DestroyVaultResponseMessage; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DestroyVaultResponseMessage.AsObject; - static toObject(includeInstance: boolean, msg: DestroyVaultResponseMessage): DestroyVaultResponseMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DestroyVaultResponseMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DestroyVaultResponseMessage; - static deserializeBinaryFromReader(message: DestroyVaultResponseMessage, reader: jspb.BinaryReader): DestroyVaultResponseMessage; -} - -export namespace DestroyVaultResponseMessage { - export type AsObject = { - successful: boolean, - } -} - -export class ListSecretsRequestMessage extends jspb.Message { - getVaultName(): string; - setVaultName(value: string): ListSecretsRequestMessage; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListSecretsRequestMessage.AsObject; - static toObject(includeInstance: boolean, msg: ListSecretsRequestMessage): ListSecretsRequestMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListSecretsRequestMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListSecretsRequestMessage; - static deserializeBinaryFromReader(message: ListSecretsRequestMessage, reader: jspb.BinaryReader): ListSecretsRequestMessage; -} - -export namespace ListSecretsRequestMessage { - export type AsObject = { - vaultName: string, - } -} +export class VerifyFileMessage extends jspb.Message { + getFilePath(): string; + setFilePath(value: string): VerifyFileMessage; -export class ListSecretsResponseMessage extends jspb.Message { - clearSecretNamesList(): void; - getSecretNamesList(): Array; - setSecretNamesList(value: Array): ListSecretsResponseMessage; - addSecretNames(value: string, index?: number): string; + getPublicKeyPath(): string; + setPublicKeyPath(value: string): VerifyFileMessage; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListSecretsResponseMessage.AsObject; - static toObject(includeInstance: boolean, msg: ListSecretsResponseMessage): ListSecretsResponseMessage.AsObject; + toObject(includeInstance?: boolean): VerifyFileMessage.AsObject; + static toObject(includeInstance: boolean, msg: VerifyFileMessage): VerifyFileMessage.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListSecretsResponseMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListSecretsResponseMessage; - static deserializeBinaryFromReader(message: ListSecretsResponseMessage, reader: jspb.BinaryReader): ListSecretsResponseMessage; + static serializeBinaryToWriter(message: VerifyFileMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): VerifyFileMessage; + static deserializeBinaryFromReader(message: VerifyFileMessage, reader: jspb.BinaryReader): VerifyFileMessage; } -export namespace ListSecretsResponseMessage { +export namespace VerifyFileMessage { export type AsObject = { - secretNamesList: Array, + filePath: string, + publicKeyPath: string, } } -export class CreateSecretRequestMessage extends jspb.Message { +export class SecretPathMessage extends jspb.Message { getVaultName(): string; - setVaultName(value: string): CreateSecretRequestMessage; + setVaultName(value: string): SecretPathMessage; getSecretName(): string; - setSecretName(value: string): CreateSecretRequestMessage; - - getSecretPath(): string; - setSecretPath(value: string): CreateSecretRequestMessage; - - getSecretContent(): Uint8Array | string; - getSecretContent_asU8(): Uint8Array; - getSecretContent_asB64(): string; - setSecretContent(value: Uint8Array | string): CreateSecretRequestMessage; + setSecretName(value: string): SecretPathMessage; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateSecretRequestMessage.AsObject; - static toObject(includeInstance: boolean, msg: CreateSecretRequestMessage): CreateSecretRequestMessage.AsObject; + toObject(includeInstance?: boolean): SecretPathMessage.AsObject; + static toObject(includeInstance: boolean, msg: SecretPathMessage): SecretPathMessage.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateSecretRequestMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateSecretRequestMessage; - static deserializeBinaryFromReader(message: CreateSecretRequestMessage, reader: jspb.BinaryReader): CreateSecretRequestMessage; + static serializeBinaryToWriter(message: SecretPathMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SecretPathMessage; + static deserializeBinaryFromReader(message: SecretPathMessage, reader: jspb.BinaryReader): SecretPathMessage; } -export namespace CreateSecretRequestMessage { +export namespace SecretPathMessage { export type AsObject = { vaultName: string, secretName: string, - secretPath: string, - secretContent: Uint8Array | string, - } -} - -export class CreateSecretResponseMessage extends jspb.Message { - getSuccessful(): boolean; - setSuccessful(value: boolean): CreateSecretResponseMessage; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateSecretResponseMessage.AsObject; - static toObject(includeInstance: boolean, msg: CreateSecretResponseMessage): CreateSecretResponseMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateSecretResponseMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateSecretResponseMessage; - static deserializeBinaryFromReader(message: CreateSecretResponseMessage, reader: jspb.BinaryReader): CreateSecretResponseMessage; -} - -export namespace CreateSecretResponseMessage { - export type AsObject = { - successful: boolean, } } -export class DestroySecretRequestMessage extends jspb.Message { - getVaultName(): string; - setVaultName(value: string): DestroySecretRequestMessage; - - getSecretName(): string; - setSecretName(value: string): DestroySecretRequestMessage; +export class SecretContentMessage extends jspb.Message { + hasSecretPath(): boolean; + clearSecretPath(): void; + getSecretPath(): SecretPathMessage | undefined; + setSecretPath(value?: SecretPathMessage): SecretContentMessage; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DestroySecretRequestMessage.AsObject; - static toObject(includeInstance: boolean, msg: DestroySecretRequestMessage): DestroySecretRequestMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DestroySecretRequestMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DestroySecretRequestMessage; - static deserializeBinaryFromReader(message: DestroySecretRequestMessage, reader: jspb.BinaryReader): DestroySecretRequestMessage; -} - -export namespace DestroySecretRequestMessage { - export type AsObject = { - vaultName: string, - secretName: string, - } -} + getSecretFilePath(): string; + setSecretFilePath(value: string): SecretContentMessage; -export class DestroySecretResponseMessage extends jspb.Message { - getSuccessful(): boolean; - setSuccessful(value: boolean): DestroySecretResponseMessage; + getSecretContent(): string; + setSecretContent(value: string): SecretContentMessage; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DestroySecretResponseMessage.AsObject; - static toObject(includeInstance: boolean, msg: DestroySecretResponseMessage): DestroySecretResponseMessage.AsObject; + toObject(includeInstance?: boolean): SecretContentMessage.AsObject; + static toObject(includeInstance: boolean, msg: SecretContentMessage): SecretContentMessage.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DestroySecretResponseMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DestroySecretResponseMessage; - static deserializeBinaryFromReader(message: DestroySecretResponseMessage, reader: jspb.BinaryReader): DestroySecretResponseMessage; + static serializeBinaryToWriter(message: SecretContentMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SecretContentMessage; + static deserializeBinaryFromReader(message: SecretContentMessage, reader: jspb.BinaryReader): SecretContentMessage; } -export namespace DestroySecretResponseMessage { +export namespace SecretContentMessage { export type AsObject = { - successful: boolean, + secretPath?: SecretPathMessage.AsObject, + secretFilePath: string, + secretContent: string, } } -export class GetSecretRequestMessage extends jspb.Message { - getVaultName(): string; - setVaultName(value: string): GetSecretRequestMessage; - - getSecretName(): string; - setSecretName(value: string): GetSecretRequestMessage; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetSecretRequestMessage.AsObject; - static toObject(includeInstance: boolean, msg: GetSecretRequestMessage): GetSecretRequestMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetSecretRequestMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetSecretRequestMessage; - static deserializeBinaryFromReader(message: GetSecretRequestMessage, reader: jspb.BinaryReader): GetSecretRequestMessage; -} - -export namespace GetSecretRequestMessage { - export type AsObject = { - vaultName: string, - secretName: string, - } -} +export class EncryptFileMessage extends jspb.Message { + getFilePath(): string; + setFilePath(value: string): EncryptFileMessage; -export class GetSecretResponseMessage extends jspb.Message { - getSecret(): Uint8Array | string; - getSecret_asU8(): Uint8Array; - getSecret_asB64(): string; - setSecret(value: Uint8Array | string): GetSecretResponseMessage; + getPublicKeyPath(): string; + setPublicKeyPath(value: string): EncryptFileMessage; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetSecretResponseMessage.AsObject; - static toObject(includeInstance: boolean, msg: GetSecretResponseMessage): GetSecretResponseMessage.AsObject; + toObject(includeInstance?: boolean): EncryptFileMessage.AsObject; + static toObject(includeInstance: boolean, msg: EncryptFileMessage): EncryptFileMessage.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetSecretResponseMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetSecretResponseMessage; - static deserializeBinaryFromReader(message: GetSecretResponseMessage, reader: jspb.BinaryReader): GetSecretResponseMessage; + static serializeBinaryToWriter(message: EncryptFileMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EncryptFileMessage; + static deserializeBinaryFromReader(message: EncryptFileMessage, reader: jspb.BinaryReader): EncryptFileMessage; } -export namespace GetSecretResponseMessage { +export namespace EncryptFileMessage { export type AsObject = { - secret: Uint8Array | string, + filePath: string, + publicKeyPath: string, } } -export class DeriveKeyRequestMessage extends jspb.Message { - getVaultName(): string; - setVaultName(value: string): DeriveKeyRequestMessage; +export class DecryptFileMessage extends jspb.Message { + getFilePath(): string; + setFilePath(value: string): DecryptFileMessage; - getKeyName(): string; - setKeyName(value: string): DeriveKeyRequestMessage; + getPrivateKeyPath(): string; + setPrivateKeyPath(value: string): DecryptFileMessage; getPassphrase(): string; - setPassphrase(value: string): DeriveKeyRequestMessage; + setPassphrase(value: string): DecryptFileMessage; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeriveKeyRequestMessage.AsObject; - static toObject(includeInstance: boolean, msg: DeriveKeyRequestMessage): DeriveKeyRequestMessage.AsObject; + toObject(includeInstance?: boolean): DecryptFileMessage.AsObject; + static toObject(includeInstance: boolean, msg: DecryptFileMessage): DecryptFileMessage.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeriveKeyRequestMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeriveKeyRequestMessage; - static deserializeBinaryFromReader(message: DeriveKeyRequestMessage, reader: jspb.BinaryReader): DeriveKeyRequestMessage; + static serializeBinaryToWriter(message: DecryptFileMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DecryptFileMessage; + static deserializeBinaryFromReader(message: DecryptFileMessage, reader: jspb.BinaryReader): DecryptFileMessage; } -export namespace DeriveKeyRequestMessage { +export namespace DecryptFileMessage { export type AsObject = { - vaultName: string, - keyName: string, + filePath: string, + privateKeyPath: string, passphrase: string, } } -export class DeriveKeyResponseMessage extends jspb.Message { - getSuccessful(): boolean; - setSuccessful(value: boolean): DeriveKeyResponseMessage; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeriveKeyResponseMessage.AsObject; - static toObject(includeInstance: boolean, msg: DeriveKeyResponseMessage): DeriveKeyResponseMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeriveKeyResponseMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeriveKeyResponseMessage; - static deserializeBinaryFromReader(message: DeriveKeyResponseMessage, reader: jspb.BinaryReader): DeriveKeyResponseMessage; -} - -export namespace DeriveKeyResponseMessage { - export type AsObject = { - successful: boolean, - } -} - -export class ListKeysRequestMessage extends jspb.Message { - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListKeysRequestMessage.AsObject; - static toObject(includeInstance: boolean, msg: ListKeysRequestMessage): ListKeysRequestMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListKeysRequestMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListKeysRequestMessage; - static deserializeBinaryFromReader(message: ListKeysRequestMessage, reader: jspb.BinaryReader): ListKeysRequestMessage; -} - -export namespace ListKeysRequestMessage { - export type AsObject = { - } -} - -export class ListKeysResponseMessage extends jspb.Message { - clearKeyNamesList(): void; - getKeyNamesList(): Array; - setKeyNamesList(value: Array): ListKeysResponseMessage; - addKeyNames(value: string, index?: number): string; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListKeysResponseMessage.AsObject; - static toObject(includeInstance: boolean, msg: ListKeysResponseMessage): ListKeysResponseMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListKeysResponseMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListKeysResponseMessage; - static deserializeBinaryFromReader(message: ListKeysResponseMessage, reader: jspb.BinaryReader): ListKeysResponseMessage; -} - -export namespace ListKeysResponseMessage { - export type AsObject = { - keyNamesList: Array, - } -} - -export class GetKeyRequestMessage extends jspb.Message { - getKeyName(): string; - setKeyName(value: string): GetKeyRequestMessage; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetKeyRequestMessage.AsObject; - static toObject(includeInstance: boolean, msg: GetKeyRequestMessage): GetKeyRequestMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetKeyRequestMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetKeyRequestMessage; - static deserializeBinaryFromReader(message: GetKeyRequestMessage, reader: jspb.BinaryReader): GetKeyRequestMessage; -} - -export namespace GetKeyRequestMessage { - export type AsObject = { - keyName: string, - } -} - -export class GetKeyResponseMessage extends jspb.Message { - getKeyName(): string; - setKeyName(value: string): GetKeyResponseMessage; - - getKeyContent(): string; - setKeyContent(value: string): GetKeyResponseMessage; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetKeyResponseMessage.AsObject; - static toObject(includeInstance: boolean, msg: GetKeyResponseMessage): GetKeyResponseMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetKeyResponseMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetKeyResponseMessage; - static deserializeBinaryFromReader(message: GetKeyResponseMessage, reader: jspb.BinaryReader): GetKeyResponseMessage; -} - -export namespace GetKeyResponseMessage { - export type AsObject = { - keyName: string, - keyContent: string, - } -} - -export class GetPrimaryKeyPairRequestMessage extends jspb.Message { - getIncludePrivateKey(): boolean; - setIncludePrivateKey(value: boolean): GetPrimaryKeyPairRequestMessage; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetPrimaryKeyPairRequestMessage.AsObject; - static toObject(includeInstance: boolean, msg: GetPrimaryKeyPairRequestMessage): GetPrimaryKeyPairRequestMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetPrimaryKeyPairRequestMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetPrimaryKeyPairRequestMessage; - static deserializeBinaryFromReader(message: GetPrimaryKeyPairRequestMessage, reader: jspb.BinaryReader): GetPrimaryKeyPairRequestMessage; -} - -export namespace GetPrimaryKeyPairRequestMessage { - export type AsObject = { - includePrivateKey: boolean, - } -} - -export class GetPrimaryKeyPairResponseMessage extends jspb.Message { +export class KeyPairMessage extends jspb.Message { getPublicKey(): string; - setPublicKey(value: string): GetPrimaryKeyPairResponseMessage; + setPublicKey(value: string): KeyPairMessage; getPrivateKey(): string; - setPrivateKey(value: string): GetPrimaryKeyPairResponseMessage; + setPrivateKey(value: string): KeyPairMessage; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetPrimaryKeyPairResponseMessage.AsObject; - static toObject(includeInstance: boolean, msg: GetPrimaryKeyPairResponseMessage): GetPrimaryKeyPairResponseMessage.AsObject; + toObject(includeInstance?: boolean): KeyPairMessage.AsObject; + static toObject(includeInstance: boolean, msg: KeyPairMessage): KeyPairMessage.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetPrimaryKeyPairResponseMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetPrimaryKeyPairResponseMessage; - static deserializeBinaryFromReader(message: GetPrimaryKeyPairResponseMessage, reader: jspb.BinaryReader): GetPrimaryKeyPairResponseMessage; + static serializeBinaryToWriter(message: KeyPairMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): KeyPairMessage; + static deserializeBinaryFromReader(message: KeyPairMessage, reader: jspb.BinaryReader): KeyPairMessage; } -export namespace GetPrimaryKeyPairResponseMessage { +export namespace KeyPairMessage { export type AsObject = { publicKey: string, privateKey: string, } } -export class UpdateSecretRequestMessage extends jspb.Message { +export class VaultPathMessage extends jspb.Message { getVaultName(): string; - setVaultName(value: string): UpdateSecretRequestMessage; - - getSecretName(): string; - setSecretName(value: string): UpdateSecretRequestMessage; - - getSecretPath(): string; - setSecretPath(value: string): UpdateSecretRequestMessage; - - getSecretContent(): Uint8Array | string; - getSecretContent_asU8(): Uint8Array; - getSecretContent_asB64(): string; - setSecretContent(value: Uint8Array | string): UpdateSecretRequestMessage; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateSecretRequestMessage.AsObject; - static toObject(includeInstance: boolean, msg: UpdateSecretRequestMessage): UpdateSecretRequestMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateSecretRequestMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateSecretRequestMessage; - static deserializeBinaryFromReader(message: UpdateSecretRequestMessage, reader: jspb.BinaryReader): UpdateSecretRequestMessage; -} - -export namespace UpdateSecretRequestMessage { - export type AsObject = { - vaultName: string, - secretName: string, - secretPath: string, - secretContent: Uint8Array | string, - } -} - -export class UpdateSecretResponseMessage extends jspb.Message { - getSuccessful(): boolean; - setSuccessful(value: boolean): UpdateSecretResponseMessage; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateSecretResponseMessage.AsObject; - static toObject(includeInstance: boolean, msg: UpdateSecretResponseMessage): UpdateSecretResponseMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateSecretResponseMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateSecretResponseMessage; - static deserializeBinaryFromReader(message: UpdateSecretResponseMessage, reader: jspb.BinaryReader): UpdateSecretResponseMessage; -} - -export namespace UpdateSecretResponseMessage { - export type AsObject = { - successful: boolean, - } -} - -export class DeleteKeyRequestMessage extends jspb.Message { - getKeyName(): string; - setKeyName(value: string): DeleteKeyRequestMessage; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteKeyRequestMessage.AsObject; - static toObject(includeInstance: boolean, msg: DeleteKeyRequestMessage): DeleteKeyRequestMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeleteKeyRequestMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeleteKeyRequestMessage; - static deserializeBinaryFromReader(message: DeleteKeyRequestMessage, reader: jspb.BinaryReader): DeleteKeyRequestMessage; -} - -export namespace DeleteKeyRequestMessage { - export type AsObject = { - keyName: string, - } -} - -export class DeleteKeyResponseMessage extends jspb.Message { - getSuccessful(): boolean; - setSuccessful(value: boolean): DeleteKeyResponseMessage; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteKeyResponseMessage.AsObject; - static toObject(includeInstance: boolean, msg: DeleteKeyResponseMessage): DeleteKeyResponseMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: DeleteKeyResponseMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeleteKeyResponseMessage; - static deserializeBinaryFromReader(message: DeleteKeyResponseMessage, reader: jspb.BinaryReader): DeleteKeyResponseMessage; -} - -export namespace DeleteKeyResponseMessage { - export type AsObject = { - successful: boolean, - } -} - -export class PeerInfoRequestMessage extends jspb.Message { - getCurrent(): boolean; - setCurrent(value: boolean): PeerInfoRequestMessage; - - getPublicKey(): string; - setPublicKey(value: string): PeerInfoRequestMessage; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PeerInfoRequestMessage.AsObject; - static toObject(includeInstance: boolean, msg: PeerInfoRequestMessage): PeerInfoRequestMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PeerInfoRequestMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PeerInfoRequestMessage; - static deserializeBinaryFromReader(message: PeerInfoRequestMessage, reader: jspb.BinaryReader): PeerInfoRequestMessage; -} + setVaultName(value: string): VaultPathMessage; -export namespace PeerInfoRequestMessage { - export type AsObject = { - current: boolean, - publicKey: string, - } -} - -export class PeerInfoResponseMessage extends jspb.Message { getPublicKey(): string; - setPublicKey(value: string): PeerInfoResponseMessage; - - clearAddressesList(): void; - getAddressesList(): Array; - setAddressesList(value: Array): PeerInfoResponseMessage; - addAddresses(value: string, index?: number): string; - - getConnectedAddress(): string; - setConnectedAddress(value: string): PeerInfoResponseMessage; - - getRelayAddress(): string; - setRelayAddress(value: string): PeerInfoResponseMessage; + setPublicKey(value: string): VaultPathMessage; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PeerInfoResponseMessage.AsObject; - static toObject(includeInstance: boolean, msg: PeerInfoResponseMessage): PeerInfoResponseMessage.AsObject; + toObject(includeInstance?: boolean): VaultPathMessage.AsObject; + static toObject(includeInstance: boolean, msg: VaultPathMessage): VaultPathMessage.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PeerInfoResponseMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PeerInfoResponseMessage; - static deserializeBinaryFromReader(message: PeerInfoResponseMessage, reader: jspb.BinaryReader): PeerInfoResponseMessage; + static serializeBinaryToWriter(message: VaultPathMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): VaultPathMessage; + static deserializeBinaryFromReader(message: VaultPathMessage, reader: jspb.BinaryReader): VaultPathMessage; } -export namespace PeerInfoResponseMessage { +export namespace VaultPathMessage { export type AsObject = { + vaultName: string, publicKey: string, - addressesList: Array, - connectedAddress: string, - relayAddress: string, } } -export class AddPeerRequestMessage extends jspb.Message { - getPublicKey(): string; - setPublicKey(value: string): AddPeerRequestMessage; - - clearAddressesList(): void; - getAddressesList(): Array; - setAddressesList(value: Array): AddPeerRequestMessage; - addAddresses(value: string, index?: number): string; - - getConnectedAddress(): string; - setConnectedAddress(value: string): AddPeerRequestMessage; - - getRelayAddress(): string; - setRelayAddress(value: string): AddPeerRequestMessage; - - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddPeerRequestMessage.AsObject; - static toObject(includeInstance: boolean, msg: AddPeerRequestMessage): AddPeerRequestMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddPeerRequestMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddPeerRequestMessage; - static deserializeBinaryFromReader(message: AddPeerRequestMessage, reader: jspb.BinaryReader): AddPeerRequestMessage; -} - -export namespace AddPeerRequestMessage { - export type AsObject = { - publicKey: string, - addressesList: Array, - connectedAddress: string, - relayAddress: string, - } -} +export class ContactPeerMessage extends jspb.Message { + getPublicKeyOrHandle(): string; + setPublicKeyOrHandle(value: string): ContactPeerMessage; -export class AddPeerResponseMessage extends jspb.Message { - getSuccessful(): boolean; - setSuccessful(value: boolean): AddPeerResponseMessage; + getTimeout(): number; + setTimeout(value: number): ContactPeerMessage; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddPeerResponseMessage.AsObject; - static toObject(includeInstance: boolean, msg: AddPeerResponseMessage): AddPeerResponseMessage.AsObject; + toObject(includeInstance?: boolean): ContactPeerMessage.AsObject; + static toObject(includeInstance: boolean, msg: ContactPeerMessage): ContactPeerMessage.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddPeerResponseMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddPeerResponseMessage; - static deserializeBinaryFromReader(message: AddPeerResponseMessage, reader: jspb.BinaryReader): AddPeerResponseMessage; + static serializeBinaryToWriter(message: ContactPeerMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ContactPeerMessage; + static deserializeBinaryFromReader(message: ContactPeerMessage, reader: jspb.BinaryReader): ContactPeerMessage; } -export namespace AddPeerResponseMessage { +export namespace ContactPeerMessage { export type AsObject = { - successful: boolean, + publicKeyOrHandle: string, + timeout: number, } } -export enum AgentMessageType { - ERROR = 0, - STOP_AGENT = 1, - STATUS = 2, - REGISTER_NODE = 3, - NEW_NODE = 4, - LIST_NODES = 5, - DERIVE_KEY = 6, - SIGN_FILE = 7, - VERIFY_FILE = 8, - LIST_VAULTS = 9, - NEW_VAULT = 10, - DESTROY_VAULT = 11, - LIST_SECRETS = 12, - CREATE_SECRET = 13, - DESTROY_SECRET = 14, - GET_SECRET = 15, - LIST_KEYS = 16, - GET_KEY = 17, - DELETE_KEY = 18, - ENCRYPT_FILE = 19, - DECRYPT_FILE = 20, - GET_PRIMARY_KEYPAIR = 21, - UPDATE_SECRET = 22, - GET_PEER_INFO = 23, - ADD_PEER = 24, +export enum AgentStatusType { + ONLINE = 0, + OFFLINE = 1, + ERRORED = 2, } diff --git a/proto/compiled/Agent_pb.js b/proto/compiled/Agent_pb.js index 9394a25b39..5517a78741 100644 --- a/proto/compiled/Agent_pb.js +++ b/proto/compiled/Agent_pb.js @@ -12,53 +12,24 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -goog.exportSymbol('proto.agent.AddPeerRequestMessage', null, global); -goog.exportSymbol('proto.agent.AddPeerResponseMessage', null, global); -goog.exportSymbol('proto.agent.AgentMessage', null, global); -goog.exportSymbol('proto.agent.AgentMessageType', null, global); -goog.exportSymbol('proto.agent.CreateSecretRequestMessage', null, global); -goog.exportSymbol('proto.agent.CreateSecretResponseMessage', null, global); -goog.exportSymbol('proto.agent.DecryptFileRequestMessage', null, global); -goog.exportSymbol('proto.agent.DecryptFileResponseMessage', null, global); -goog.exportSymbol('proto.agent.DeleteKeyRequestMessage', null, global); -goog.exportSymbol('proto.agent.DeleteKeyResponseMessage', null, global); -goog.exportSymbol('proto.agent.DeriveKeyRequestMessage', null, global); -goog.exportSymbol('proto.agent.DeriveKeyResponseMessage', null, global); -goog.exportSymbol('proto.agent.DestroySecretRequestMessage', null, global); -goog.exportSymbol('proto.agent.DestroySecretResponseMessage', null, global); -goog.exportSymbol('proto.agent.DestroyVaultRequestMessage', null, global); -goog.exportSymbol('proto.agent.DestroyVaultResponseMessage', null, global); -goog.exportSymbol('proto.agent.EncryptFileRequestMessage', null, global); -goog.exportSymbol('proto.agent.EncryptFileResponseMessage', null, global); -goog.exportSymbol('proto.agent.ErrorMessage', null, global); -goog.exportSymbol('proto.agent.GetKeyRequestMessage', null, global); -goog.exportSymbol('proto.agent.GetKeyResponseMessage', null, global); -goog.exportSymbol('proto.agent.GetPrimaryKeyPairRequestMessage', null, global); -goog.exportSymbol('proto.agent.GetPrimaryKeyPairResponseMessage', null, global); -goog.exportSymbol('proto.agent.GetSecretRequestMessage', null, global); -goog.exportSymbol('proto.agent.GetSecretResponseMessage', null, global); -goog.exportSymbol('proto.agent.ListKeysRequestMessage', null, global); -goog.exportSymbol('proto.agent.ListKeysResponseMessage', null, global); -goog.exportSymbol('proto.agent.ListNodesRequestMessage', null, global); -goog.exportSymbol('proto.agent.ListNodesResponseMessage', null, global); -goog.exportSymbol('proto.agent.ListSecretsRequestMessage', null, global); -goog.exportSymbol('proto.agent.ListSecretsResponseMessage', null, global); -goog.exportSymbol('proto.agent.ListVaultsRequestMessage', null, global); -goog.exportSymbol('proto.agent.ListVaultsResponseMessage', null, global); -goog.exportSymbol('proto.agent.NewNodeRequestMessage', null, global); -goog.exportSymbol('proto.agent.NewNodeResponseMessage', null, global); -goog.exportSymbol('proto.agent.NewVaultRequestMessage', null, global); -goog.exportSymbol('proto.agent.NewVaultResponseMessage', null, global); -goog.exportSymbol('proto.agent.PeerInfoRequestMessage', null, global); -goog.exportSymbol('proto.agent.PeerInfoResponseMessage', null, global); -goog.exportSymbol('proto.agent.RegisterNodeRequestMessage', null, global); -goog.exportSymbol('proto.agent.RegisterNodeResponseMessage', null, global); -goog.exportSymbol('proto.agent.SignFileRequestMessage', null, global); -goog.exportSymbol('proto.agent.SignFileResponseMessage', null, global); -goog.exportSymbol('proto.agent.UpdateSecretRequestMessage', null, global); -goog.exportSymbol('proto.agent.UpdateSecretResponseMessage', null, global); -goog.exportSymbol('proto.agent.VerifyFileRequestMessage', null, global); -goog.exportSymbol('proto.agent.VerifyFileResponseMessage', null, global); +goog.exportSymbol('proto.agentInterface.AgentStatusMessage', null, global); +goog.exportSymbol('proto.agentInterface.AgentStatusType', null, global); +goog.exportSymbol('proto.agentInterface.BooleanMessage', null, global); +goog.exportSymbol('proto.agentInterface.ContactPeerMessage', null, global); +goog.exportSymbol('proto.agentInterface.DecryptFileMessage', null, global); +goog.exportSymbol('proto.agentInterface.DeriveKeyMessage', null, global); +goog.exportSymbol('proto.agentInterface.EmptyMessage', null, global); +goog.exportSymbol('proto.agentInterface.EncryptFileMessage', null, global); +goog.exportSymbol('proto.agentInterface.KeyPairMessage', null, global); +goog.exportSymbol('proto.agentInterface.NewNodeMessage', null, global); +goog.exportSymbol('proto.agentInterface.PeerInfoMessage', null, global); +goog.exportSymbol('proto.agentInterface.SecretContentMessage', null, global); +goog.exportSymbol('proto.agentInterface.SecretPathMessage', null, global); +goog.exportSymbol('proto.agentInterface.SignFileMessage', null, global); +goog.exportSymbol('proto.agentInterface.StringListMessage', null, global); +goog.exportSymbol('proto.agentInterface.StringMessage', null, global); +goog.exportSymbol('proto.agentInterface.VaultPathMessage', null, global); +goog.exportSymbol('proto.agentInterface.VerifyFileMessage', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -69,16 +40,16 @@ goog.exportSymbol('proto.agent.VerifyFileResponseMessage', null, global); * @extends {jspb.Message} * @constructor */ -proto.agent.AgentMessage = function(opt_data) { +proto.agentInterface.EmptyMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agent.AgentMessage, jspb.Message); +goog.inherits(proto.agentInterface.EmptyMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agent.AgentMessage.displayName = 'proto.agent.AgentMessage'; + proto.agentInterface.EmptyMessage.displayName = 'proto.agentInterface.EmptyMessage'; } /** * Generated by JsPbCodeGenerator. @@ -90,16 +61,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agent.ErrorMessage = function(opt_data) { +proto.agentInterface.StringMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agent.ErrorMessage, jspb.Message); +goog.inherits(proto.agentInterface.StringMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agent.ErrorMessage.displayName = 'proto.agent.ErrorMessage'; + proto.agentInterface.StringMessage.displayName = 'proto.agentInterface.StringMessage'; } /** * Generated by JsPbCodeGenerator. @@ -111,16 +82,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agent.RegisterNodeRequestMessage = function(opt_data) { +proto.agentInterface.BooleanMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agent.RegisterNodeRequestMessage, jspb.Message); +goog.inherits(proto.agentInterface.BooleanMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agent.RegisterNodeRequestMessage.displayName = 'proto.agent.RegisterNodeRequestMessage'; + proto.agentInterface.BooleanMessage.displayName = 'proto.agentInterface.BooleanMessage'; } /** * Generated by JsPbCodeGenerator. @@ -132,16 +103,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agent.RegisterNodeResponseMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.agentInterface.StringListMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.agentInterface.StringListMessage.repeatedFields_, null); }; -goog.inherits(proto.agent.RegisterNodeResponseMessage, jspb.Message); +goog.inherits(proto.agentInterface.StringListMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agent.RegisterNodeResponseMessage.displayName = 'proto.agent.RegisterNodeResponseMessage'; + proto.agentInterface.StringListMessage.displayName = 'proto.agentInterface.StringListMessage'; } /** * Generated by JsPbCodeGenerator. @@ -153,16 +124,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agent.NewNodeRequestMessage = function(opt_data) { +proto.agentInterface.PeerInfoMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agent.NewNodeRequestMessage, jspb.Message); +goog.inherits(proto.agentInterface.PeerInfoMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agent.NewNodeRequestMessage.displayName = 'proto.agent.NewNodeRequestMessage'; + proto.agentInterface.PeerInfoMessage.displayName = 'proto.agentInterface.PeerInfoMessage'; } /** * Generated by JsPbCodeGenerator. @@ -174,16 +145,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agent.NewNodeResponseMessage = function(opt_data) { +proto.agentInterface.AgentStatusMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agent.NewNodeResponseMessage, jspb.Message); +goog.inherits(proto.agentInterface.AgentStatusMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agent.NewNodeResponseMessage.displayName = 'proto.agent.NewNodeResponseMessage'; + proto.agentInterface.AgentStatusMessage.displayName = 'proto.agentInterface.AgentStatusMessage'; } /** * Generated by JsPbCodeGenerator. @@ -195,16 +166,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agent.ListNodesRequestMessage = function(opt_data) { +proto.agentInterface.NewNodeMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agent.ListNodesRequestMessage, jspb.Message); +goog.inherits(proto.agentInterface.NewNodeMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agent.ListNodesRequestMessage.displayName = 'proto.agent.ListNodesRequestMessage'; + proto.agentInterface.NewNodeMessage.displayName = 'proto.agentInterface.NewNodeMessage'; } /** * Generated by JsPbCodeGenerator. @@ -216,16 +187,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agent.ListNodesResponseMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.agent.ListNodesResponseMessage.repeatedFields_, null); +proto.agentInterface.DeriveKeyMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agent.ListNodesResponseMessage, jspb.Message); +goog.inherits(proto.agentInterface.DeriveKeyMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agent.ListNodesResponseMessage.displayName = 'proto.agent.ListNodesResponseMessage'; + proto.agentInterface.DeriveKeyMessage.displayName = 'proto.agentInterface.DeriveKeyMessage'; } /** * Generated by JsPbCodeGenerator. @@ -237,16 +208,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agent.SignFileRequestMessage = function(opt_data) { +proto.agentInterface.SignFileMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agent.SignFileRequestMessage, jspb.Message); +goog.inherits(proto.agentInterface.SignFileMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agent.SignFileRequestMessage.displayName = 'proto.agent.SignFileRequestMessage'; + proto.agentInterface.SignFileMessage.displayName = 'proto.agentInterface.SignFileMessage'; } /** * Generated by JsPbCodeGenerator. @@ -258,16 +229,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agent.SignFileResponseMessage = function(opt_data) { +proto.agentInterface.VerifyFileMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agent.SignFileResponseMessage, jspb.Message); +goog.inherits(proto.agentInterface.VerifyFileMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agent.SignFileResponseMessage.displayName = 'proto.agent.SignFileResponseMessage'; + proto.agentInterface.VerifyFileMessage.displayName = 'proto.agentInterface.VerifyFileMessage'; } /** * Generated by JsPbCodeGenerator. @@ -279,16 +250,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agent.VerifyFileRequestMessage = function(opt_data) { +proto.agentInterface.SecretPathMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agent.VerifyFileRequestMessage, jspb.Message); +goog.inherits(proto.agentInterface.SecretPathMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agent.VerifyFileRequestMessage.displayName = 'proto.agent.VerifyFileRequestMessage'; + proto.agentInterface.SecretPathMessage.displayName = 'proto.agentInterface.SecretPathMessage'; } /** * Generated by JsPbCodeGenerator. @@ -300,16 +271,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agent.VerifyFileResponseMessage = function(opt_data) { +proto.agentInterface.SecretContentMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agent.VerifyFileResponseMessage, jspb.Message); +goog.inherits(proto.agentInterface.SecretContentMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agent.VerifyFileResponseMessage.displayName = 'proto.agent.VerifyFileResponseMessage'; + proto.agentInterface.SecretContentMessage.displayName = 'proto.agentInterface.SecretContentMessage'; } /** * Generated by JsPbCodeGenerator. @@ -321,16 +292,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agent.EncryptFileRequestMessage = function(opt_data) { +proto.agentInterface.EncryptFileMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agent.EncryptFileRequestMessage, jspb.Message); +goog.inherits(proto.agentInterface.EncryptFileMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agent.EncryptFileRequestMessage.displayName = 'proto.agent.EncryptFileRequestMessage'; + proto.agentInterface.EncryptFileMessage.displayName = 'proto.agentInterface.EncryptFileMessage'; } /** * Generated by JsPbCodeGenerator. @@ -342,16 +313,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agent.EncryptFileResponseMessage = function(opt_data) { +proto.agentInterface.DecryptFileMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agent.EncryptFileResponseMessage, jspb.Message); +goog.inherits(proto.agentInterface.DecryptFileMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agent.EncryptFileResponseMessage.displayName = 'proto.agent.EncryptFileResponseMessage'; + proto.agentInterface.DecryptFileMessage.displayName = 'proto.agentInterface.DecryptFileMessage'; } /** * Generated by JsPbCodeGenerator. @@ -363,16 +334,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agent.DecryptFileRequestMessage = function(opt_data) { +proto.agentInterface.KeyPairMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agent.DecryptFileRequestMessage, jspb.Message); +goog.inherits(proto.agentInterface.KeyPairMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agent.DecryptFileRequestMessage.displayName = 'proto.agent.DecryptFileRequestMessage'; + proto.agentInterface.KeyPairMessage.displayName = 'proto.agentInterface.KeyPairMessage'; } /** * Generated by JsPbCodeGenerator. @@ -384,16 +355,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agent.DecryptFileResponseMessage = function(opt_data) { +proto.agentInterface.VaultPathMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agent.DecryptFileResponseMessage, jspb.Message); +goog.inherits(proto.agentInterface.VaultPathMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agent.DecryptFileResponseMessage.displayName = 'proto.agent.DecryptFileResponseMessage'; + proto.agentInterface.VaultPathMessage.displayName = 'proto.agentInterface.VaultPathMessage'; } /** * Generated by JsPbCodeGenerator. @@ -405,5252 +376,181 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.agent.ListVaultsRequestMessage = function(opt_data) { +proto.agentInterface.ContactPeerMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.agent.ListVaultsRequestMessage, jspb.Message); +goog.inherits(proto.agentInterface.ContactPeerMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.agent.ListVaultsRequestMessage.displayName = 'proto.agent.ListVaultsRequestMessage'; + proto.agentInterface.ContactPeerMessage.displayName = 'proto.agentInterface.ContactPeerMessage'; } + + + +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 + * 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.agent.ListVaultsResponseMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.agent.ListVaultsResponseMessage.repeatedFields_, null); +proto.agentInterface.EmptyMessage.prototype.toObject = function(opt_includeInstance) { + return proto.agentInterface.EmptyMessage.toObject(opt_includeInstance, this); }; -goog.inherits(proto.agent.ListVaultsResponseMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.ListVaultsResponseMessage.displayName = 'proto.agent.ListVaultsResponseMessage'; -} + + /** - * 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 + * 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.agentInterface.EmptyMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.NewVaultRequestMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.agentInterface.EmptyMessage.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; -goog.inherits(proto.agent.NewVaultRequestMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.NewVaultRequestMessage.displayName = 'proto.agent.NewVaultRequestMessage'; } + + /** - * 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 + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.agentInterface.EmptyMessage} */ -proto.agent.NewVaultResponseMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.agentInterface.EmptyMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.agentInterface.EmptyMessage; + return proto.agentInterface.EmptyMessage.deserializeBinaryFromReader(msg, reader); }; -goog.inherits(proto.agent.NewVaultResponseMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.NewVaultResponseMessage.displayName = 'proto.agent.NewVaultResponseMessage'; -} + + /** - * 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 + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.agentInterface.EmptyMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.agentInterface.EmptyMessage} */ -proto.agent.DestroyVaultRequestMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.agentInterface.EmptyMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; }; -goog.inherits(proto.agent.DestroyVaultRequestMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.DestroyVaultRequestMessage.displayName = 'proto.agent.DestroyVaultRequestMessage'; -} + + /** - * 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 + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.agent.DestroyVaultResponseMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.agentInterface.EmptyMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.agentInterface.EmptyMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; -goog.inherits(proto.agent.DestroyVaultResponseMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.DestroyVaultResponseMessage.displayName = 'proto.agent.DestroyVaultResponseMessage'; -} + + /** - * 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 + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.agentInterface.EmptyMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.ListSecretsRequestMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.agentInterface.EmptyMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; }; -goog.inherits(proto.agent.ListSecretsRequestMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.ListSecretsRequestMessage.displayName = 'proto.agent.ListSecretsRequestMessage'; -} + + + + + +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 + * 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.agent.ListSecretsResponseMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.agent.ListSecretsResponseMessage.repeatedFields_, null); +proto.agentInterface.StringMessage.prototype.toObject = function(opt_includeInstance) { + return proto.agentInterface.StringMessage.toObject(opt_includeInstance, this); }; -goog.inherits(proto.agent.ListSecretsResponseMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.ListSecretsResponseMessage.displayName = 'proto.agent.ListSecretsResponseMessage'; -} + + /** - * 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 + * 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.agentInterface.StringMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.CreateSecretRequestMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.agentInterface.StringMessage.toObject = function(includeInstance, msg) { + var f, obj = { + s: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; -goog.inherits(proto.agent.CreateSecretRequestMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.CreateSecretRequestMessage.displayName = 'proto.agent.CreateSecretRequestMessage'; } + + /** - * 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 + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.agentInterface.StringMessage} */ -proto.agent.CreateSecretResponseMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.agentInterface.StringMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.agentInterface.StringMessage; + return proto.agentInterface.StringMessage.deserializeBinaryFromReader(msg, reader); }; -goog.inherits(proto.agent.CreateSecretResponseMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.CreateSecretResponseMessage.displayName = 'proto.agent.CreateSecretResponseMessage'; -} + + /** - * 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 + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.agentInterface.StringMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.agentInterface.StringMessage} */ -proto.agent.DestroySecretRequestMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.agent.DestroySecretRequestMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.DestroySecretRequestMessage.displayName = 'proto.agent.DestroySecretRequestMessage'; -} -/** - * 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.agent.DestroySecretResponseMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.agent.DestroySecretResponseMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.DestroySecretResponseMessage.displayName = 'proto.agent.DestroySecretResponseMessage'; -} -/** - * 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.agent.GetSecretRequestMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.agent.GetSecretRequestMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.GetSecretRequestMessage.displayName = 'proto.agent.GetSecretRequestMessage'; -} -/** - * 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.agent.GetSecretResponseMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.agent.GetSecretResponseMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.GetSecretResponseMessage.displayName = 'proto.agent.GetSecretResponseMessage'; -} -/** - * 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.agent.DeriveKeyRequestMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.agent.DeriveKeyRequestMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.DeriveKeyRequestMessage.displayName = 'proto.agent.DeriveKeyRequestMessage'; -} -/** - * 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.agent.DeriveKeyResponseMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.agent.DeriveKeyResponseMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.DeriveKeyResponseMessage.displayName = 'proto.agent.DeriveKeyResponseMessage'; -} -/** - * 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.agent.ListKeysRequestMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.agent.ListKeysRequestMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.ListKeysRequestMessage.displayName = 'proto.agent.ListKeysRequestMessage'; -} -/** - * 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.agent.ListKeysResponseMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.agent.ListKeysResponseMessage.repeatedFields_, null); -}; -goog.inherits(proto.agent.ListKeysResponseMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.ListKeysResponseMessage.displayName = 'proto.agent.ListKeysResponseMessage'; -} -/** - * 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.agent.GetKeyRequestMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.agent.GetKeyRequestMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.GetKeyRequestMessage.displayName = 'proto.agent.GetKeyRequestMessage'; -} -/** - * 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.agent.GetKeyResponseMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.agent.GetKeyResponseMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.GetKeyResponseMessage.displayName = 'proto.agent.GetKeyResponseMessage'; -} -/** - * 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.agent.GetPrimaryKeyPairRequestMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.agent.GetPrimaryKeyPairRequestMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.GetPrimaryKeyPairRequestMessage.displayName = 'proto.agent.GetPrimaryKeyPairRequestMessage'; -} -/** - * 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.agent.GetPrimaryKeyPairResponseMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.agent.GetPrimaryKeyPairResponseMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.GetPrimaryKeyPairResponseMessage.displayName = 'proto.agent.GetPrimaryKeyPairResponseMessage'; -} -/** - * 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.agent.UpdateSecretRequestMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.agent.UpdateSecretRequestMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.UpdateSecretRequestMessage.displayName = 'proto.agent.UpdateSecretRequestMessage'; -} -/** - * 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.agent.UpdateSecretResponseMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.agent.UpdateSecretResponseMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.UpdateSecretResponseMessage.displayName = 'proto.agent.UpdateSecretResponseMessage'; -} -/** - * 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.agent.DeleteKeyRequestMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.agent.DeleteKeyRequestMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.DeleteKeyRequestMessage.displayName = 'proto.agent.DeleteKeyRequestMessage'; -} -/** - * 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.agent.DeleteKeyResponseMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.agent.DeleteKeyResponseMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.DeleteKeyResponseMessage.displayName = 'proto.agent.DeleteKeyResponseMessage'; -} -/** - * 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.agent.PeerInfoRequestMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.agent.PeerInfoRequestMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.PeerInfoRequestMessage.displayName = 'proto.agent.PeerInfoRequestMessage'; -} -/** - * 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.agent.PeerInfoResponseMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.agent.PeerInfoResponseMessage.repeatedFields_, null); -}; -goog.inherits(proto.agent.PeerInfoResponseMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.PeerInfoResponseMessage.displayName = 'proto.agent.PeerInfoResponseMessage'; -} -/** - * 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.agent.AddPeerRequestMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.agent.AddPeerRequestMessage.repeatedFields_, null); -}; -goog.inherits(proto.agent.AddPeerRequestMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.AddPeerRequestMessage.displayName = 'proto.agent.AddPeerRequestMessage'; -} -/** - * 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.agent.AddPeerResponseMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.agent.AddPeerResponseMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.agent.AddPeerResponseMessage.displayName = 'proto.agent.AddPeerResponseMessage'; -} - - - -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.agent.AgentMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.AgentMessage.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.agent.AgentMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.AgentMessage.toObject = function(includeInstance, msg) { - var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - isresponse: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - nodePath: jspb.Message.getFieldWithDefault(msg, 3, ""), - subMessage: msg.getSubMessage_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.AgentMessage} - */ -proto.agent.AgentMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.AgentMessage; - return proto.agent.AgentMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.AgentMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.AgentMessage} - */ -proto.agent.AgentMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.agent.AgentMessageType} */ (reader.readEnum()); - msg.setType(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsresponse(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setNodePath(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSubMessage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.AgentMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.AgentMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.AgentMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.AgentMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getIsresponse(); - if (f) { - writer.writeBool( - 2, - f - ); - } - f = message.getNodePath(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getSubMessage_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } -}; - - -/** - * optional AgentMessageType type = 1; - * @return {!proto.agent.AgentMessageType} - */ -proto.agent.AgentMessage.prototype.getType = function() { - return /** @type {!proto.agent.AgentMessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.agent.AgentMessageType} value - * @return {!proto.agent.AgentMessage} returns this - */ -proto.agent.AgentMessage.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional bool isResponse = 2; - * @return {boolean} - */ -proto.agent.AgentMessage.prototype.getIsresponse = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.agent.AgentMessage} returns this - */ -proto.agent.AgentMessage.prototype.setIsresponse = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional string node_path = 3; - * @return {string} - */ -proto.agent.AgentMessage.prototype.getNodePath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.AgentMessage} returns this - */ -proto.agent.AgentMessage.prototype.setNodePath = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional bytes sub_message = 4; - * @return {!(string|Uint8Array)} - */ -proto.agent.AgentMessage.prototype.getSubMessage = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes sub_message = 4; - * This is a type-conversion wrapper around `getSubMessage()` - * @return {string} - */ -proto.agent.AgentMessage.prototype.getSubMessage_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSubMessage())); -}; - - -/** - * optional bytes sub_message = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSubMessage()` - * @return {!Uint8Array} - */ -proto.agent.AgentMessage.prototype.getSubMessage_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSubMessage())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.agent.AgentMessage} returns this - */ -proto.agent.AgentMessage.prototype.setSubMessage = function(value) { - return jspb.Message.setProto3BytesField(this, 4, 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.agent.ErrorMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.ErrorMessage.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.agent.ErrorMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.ErrorMessage.toObject = function(includeInstance, msg) { - var f, obj = { - error: 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.agent.ErrorMessage} - */ -proto.agent.ErrorMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.ErrorMessage; - return proto.agent.ErrorMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.ErrorMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.ErrorMessage} - */ -proto.agent.ErrorMessage.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.setError(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.ErrorMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.ErrorMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.ErrorMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.ErrorMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getError(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string error = 1; - * @return {string} - */ -proto.agent.ErrorMessage.prototype.getError = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.ErrorMessage} returns this - */ -proto.agent.ErrorMessage.prototype.setError = 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.agent.RegisterNodeRequestMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.RegisterNodeRequestMessage.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.agent.RegisterNodeRequestMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.RegisterNodeRequestMessage.toObject = function(includeInstance, msg) { - var f, obj = { - passphrase: 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.agent.RegisterNodeRequestMessage} - */ -proto.agent.RegisterNodeRequestMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.RegisterNodeRequestMessage; - return proto.agent.RegisterNodeRequestMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.RegisterNodeRequestMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.RegisterNodeRequestMessage} - */ -proto.agent.RegisterNodeRequestMessage.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.setPassphrase(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.RegisterNodeRequestMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.RegisterNodeRequestMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.RegisterNodeRequestMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.RegisterNodeRequestMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPassphrase(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string passphrase = 1; - * @return {string} - */ -proto.agent.RegisterNodeRequestMessage.prototype.getPassphrase = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.RegisterNodeRequestMessage} returns this - */ -proto.agent.RegisterNodeRequestMessage.prototype.setPassphrase = 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.agent.RegisterNodeResponseMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.RegisterNodeResponseMessage.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.agent.RegisterNodeResponseMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.RegisterNodeResponseMessage.toObject = function(includeInstance, msg) { - var f, obj = { - successful: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.RegisterNodeResponseMessage} - */ -proto.agent.RegisterNodeResponseMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.RegisterNodeResponseMessage; - return proto.agent.RegisterNodeResponseMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.RegisterNodeResponseMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.RegisterNodeResponseMessage} - */ -proto.agent.RegisterNodeResponseMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuccessful(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.RegisterNodeResponseMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.RegisterNodeResponseMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.RegisterNodeResponseMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.RegisterNodeResponseMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSuccessful(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool successful = 1; - * @return {boolean} - */ -proto.agent.RegisterNodeResponseMessage.prototype.getSuccessful = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.agent.RegisterNodeResponseMessage} returns this - */ -proto.agent.RegisterNodeResponseMessage.prototype.setSuccessful = function(value) { - return jspb.Message.setProto3BooleanField(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.agent.NewNodeRequestMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.NewNodeRequestMessage.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.agent.NewNodeRequestMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.NewNodeRequestMessage.toObject = function(includeInstance, msg) { - var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), - email: jspb.Message.getFieldWithDefault(msg, 2, ""), - passphrase: jspb.Message.getFieldWithDefault(msg, 3, ""), - nbits: 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.agent.NewNodeRequestMessage} - */ -proto.agent.NewNodeRequestMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.NewNodeRequestMessage; - return proto.agent.NewNodeRequestMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.NewNodeRequestMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.NewNodeRequestMessage} - */ -proto.agent.NewNodeRequestMessage.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.setName(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setEmail(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPassphrase(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setNbits(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.NewNodeRequestMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.NewNodeRequestMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.NewNodeRequestMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.NewNodeRequestMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getEmail(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getPassphrase(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getNbits(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.agent.NewNodeRequestMessage.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.NewNodeRequestMessage} returns this - */ -proto.agent.NewNodeRequestMessage.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string email = 2; - * @return {string} - */ -proto.agent.NewNodeRequestMessage.prototype.getEmail = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.NewNodeRequestMessage} returns this - */ -proto.agent.NewNodeRequestMessage.prototype.setEmail = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string passphrase = 3; - * @return {string} - */ -proto.agent.NewNodeRequestMessage.prototype.getPassphrase = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.NewNodeRequestMessage} returns this - */ -proto.agent.NewNodeRequestMessage.prototype.setPassphrase = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional int32 nbits = 4; - * @return {number} - */ -proto.agent.NewNodeRequestMessage.prototype.getNbits = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.agent.NewNodeRequestMessage} returns this - */ -proto.agent.NewNodeRequestMessage.prototype.setNbits = function(value) { - return jspb.Message.setProto3IntField(this, 4, 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.agent.NewNodeResponseMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.NewNodeResponseMessage.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.agent.NewNodeResponseMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.NewNodeResponseMessage.toObject = function(includeInstance, msg) { - var f, obj = { - successful: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.NewNodeResponseMessage} - */ -proto.agent.NewNodeResponseMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.NewNodeResponseMessage; - return proto.agent.NewNodeResponseMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.NewNodeResponseMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.NewNodeResponseMessage} - */ -proto.agent.NewNodeResponseMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuccessful(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.NewNodeResponseMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.NewNodeResponseMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.NewNodeResponseMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.NewNodeResponseMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSuccessful(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool successful = 1; - * @return {boolean} - */ -proto.agent.NewNodeResponseMessage.prototype.getSuccessful = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.agent.NewNodeResponseMessage} returns this - */ -proto.agent.NewNodeResponseMessage.prototype.setSuccessful = function(value) { - return jspb.Message.setProto3BooleanField(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.agent.ListNodesRequestMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.ListNodesRequestMessage.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.agent.ListNodesRequestMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.ListNodesRequestMessage.toObject = function(includeInstance, msg) { - var f, obj = { - unlockedOnly: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.ListNodesRequestMessage} - */ -proto.agent.ListNodesRequestMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.ListNodesRequestMessage; - return proto.agent.ListNodesRequestMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.ListNodesRequestMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.ListNodesRequestMessage} - */ -proto.agent.ListNodesRequestMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setUnlockedOnly(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.ListNodesRequestMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.ListNodesRequestMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.ListNodesRequestMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.ListNodesRequestMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUnlockedOnly(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool unlocked_only = 1; - * @return {boolean} - */ -proto.agent.ListNodesRequestMessage.prototype.getUnlockedOnly = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.agent.ListNodesRequestMessage} returns this - */ -proto.agent.ListNodesRequestMessage.prototype.setUnlockedOnly = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.agent.ListNodesResponseMessage.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.agent.ListNodesResponseMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.ListNodesResponseMessage.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.agent.ListNodesResponseMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.ListNodesResponseMessage.toObject = function(includeInstance, msg) { - var f, obj = { - nodesList: (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.agent.ListNodesResponseMessage} - */ -proto.agent.ListNodesResponseMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.ListNodesResponseMessage; - return proto.agent.ListNodesResponseMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.ListNodesResponseMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.ListNodesResponseMessage} - */ -proto.agent.ListNodesResponseMessage.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.addNodes(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.ListNodesResponseMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.ListNodesResponseMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.ListNodesResponseMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.ListNodesResponseMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNodesList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } -}; - - -/** - * repeated string nodes = 1; - * @return {!Array} - */ -proto.agent.ListNodesResponseMessage.prototype.getNodesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.agent.ListNodesResponseMessage} returns this - */ -proto.agent.ListNodesResponseMessage.prototype.setNodesList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.agent.ListNodesResponseMessage} returns this - */ -proto.agent.ListNodesResponseMessage.prototype.addNodes = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.agent.ListNodesResponseMessage} returns this - */ -proto.agent.ListNodesResponseMessage.prototype.clearNodesList = function() { - return this.setNodesList([]); -}; - - - - - -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.agent.SignFileRequestMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.SignFileRequestMessage.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.agent.SignFileRequestMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.SignFileRequestMessage.toObject = function(includeInstance, msg) { - var f, obj = { - filePath: jspb.Message.getFieldWithDefault(msg, 1, ""), - privateKeyPath: jspb.Message.getFieldWithDefault(msg, 2, ""), - passphrase: 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.agent.SignFileRequestMessage} - */ -proto.agent.SignFileRequestMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.SignFileRequestMessage; - return proto.agent.SignFileRequestMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.SignFileRequestMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.SignFileRequestMessage} - */ -proto.agent.SignFileRequestMessage.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.setFilePath(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPrivateKeyPath(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPassphrase(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.SignFileRequestMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.SignFileRequestMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.SignFileRequestMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.SignFileRequestMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFilePath(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getPrivateKeyPath(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getPassphrase(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string file_path = 1; - * @return {string} - */ -proto.agent.SignFileRequestMessage.prototype.getFilePath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.SignFileRequestMessage} returns this - */ -proto.agent.SignFileRequestMessage.prototype.setFilePath = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string private_key_path = 2; - * @return {string} - */ -proto.agent.SignFileRequestMessage.prototype.getPrivateKeyPath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.SignFileRequestMessage} returns this - */ -proto.agent.SignFileRequestMessage.prototype.setPrivateKeyPath = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string passphrase = 3; - * @return {string} - */ -proto.agent.SignFileRequestMessage.prototype.getPassphrase = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.SignFileRequestMessage} returns this - */ -proto.agent.SignFileRequestMessage.prototype.setPassphrase = 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.agent.SignFileResponseMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.SignFileResponseMessage.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.agent.SignFileResponseMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.SignFileResponseMessage.toObject = function(includeInstance, msg) { - var f, obj = { - signaturePath: 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.agent.SignFileResponseMessage} - */ -proto.agent.SignFileResponseMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.SignFileResponseMessage; - return proto.agent.SignFileResponseMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.SignFileResponseMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.SignFileResponseMessage} - */ -proto.agent.SignFileResponseMessage.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.setSignaturePath(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.SignFileResponseMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.SignFileResponseMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.SignFileResponseMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.SignFileResponseMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSignaturePath(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string signature_path = 1; - * @return {string} - */ -proto.agent.SignFileResponseMessage.prototype.getSignaturePath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.SignFileResponseMessage} returns this - */ -proto.agent.SignFileResponseMessage.prototype.setSignaturePath = 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.agent.VerifyFileRequestMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.VerifyFileRequestMessage.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.agent.VerifyFileRequestMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.VerifyFileRequestMessage.toObject = function(includeInstance, msg) { - var f, obj = { - filePath: jspb.Message.getFieldWithDefault(msg, 1, ""), - signaturePath: jspb.Message.getFieldWithDefault(msg, 2, ""), - publicKeyPath: 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.agent.VerifyFileRequestMessage} - */ -proto.agent.VerifyFileRequestMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.VerifyFileRequestMessage; - return proto.agent.VerifyFileRequestMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.VerifyFileRequestMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.VerifyFileRequestMessage} - */ -proto.agent.VerifyFileRequestMessage.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.setFilePath(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setSignaturePath(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPublicKeyPath(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.VerifyFileRequestMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.VerifyFileRequestMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.VerifyFileRequestMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.VerifyFileRequestMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFilePath(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSignaturePath(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getPublicKeyPath(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string file_path = 1; - * @return {string} - */ -proto.agent.VerifyFileRequestMessage.prototype.getFilePath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.VerifyFileRequestMessage} returns this - */ -proto.agent.VerifyFileRequestMessage.prototype.setFilePath = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string signature_path = 2; - * @return {string} - */ -proto.agent.VerifyFileRequestMessage.prototype.getSignaturePath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.VerifyFileRequestMessage} returns this - */ -proto.agent.VerifyFileRequestMessage.prototype.setSignaturePath = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string public_key_path = 3; - * @return {string} - */ -proto.agent.VerifyFileRequestMessage.prototype.getPublicKeyPath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.VerifyFileRequestMessage} returns this - */ -proto.agent.VerifyFileRequestMessage.prototype.setPublicKeyPath = 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.agent.VerifyFileResponseMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.VerifyFileResponseMessage.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.agent.VerifyFileResponseMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.VerifyFileResponseMessage.toObject = function(includeInstance, msg) { - var f, obj = { - verified: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.VerifyFileResponseMessage} - */ -proto.agent.VerifyFileResponseMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.VerifyFileResponseMessage; - return proto.agent.VerifyFileResponseMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.VerifyFileResponseMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.VerifyFileResponseMessage} - */ -proto.agent.VerifyFileResponseMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setVerified(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.VerifyFileResponseMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.VerifyFileResponseMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.VerifyFileResponseMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.VerifyFileResponseMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVerified(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool verified = 1; - * @return {boolean} - */ -proto.agent.VerifyFileResponseMessage.prototype.getVerified = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.agent.VerifyFileResponseMessage} returns this - */ -proto.agent.VerifyFileResponseMessage.prototype.setVerified = function(value) { - return jspb.Message.setProto3BooleanField(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.agent.EncryptFileRequestMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.EncryptFileRequestMessage.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.agent.EncryptFileRequestMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.EncryptFileRequestMessage.toObject = function(includeInstance, msg) { - var f, obj = { - filePath: jspb.Message.getFieldWithDefault(msg, 1, ""), - publicKeyPath: 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.agent.EncryptFileRequestMessage} - */ -proto.agent.EncryptFileRequestMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.EncryptFileRequestMessage; - return proto.agent.EncryptFileRequestMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.EncryptFileRequestMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.EncryptFileRequestMessage} - */ -proto.agent.EncryptFileRequestMessage.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.setFilePath(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPublicKeyPath(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.EncryptFileRequestMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.EncryptFileRequestMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.EncryptFileRequestMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.EncryptFileRequestMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFilePath(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getPublicKeyPath(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string file_path = 1; - * @return {string} - */ -proto.agent.EncryptFileRequestMessage.prototype.getFilePath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.EncryptFileRequestMessage} returns this - */ -proto.agent.EncryptFileRequestMessage.prototype.setFilePath = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string public_key_path = 2; - * @return {string} - */ -proto.agent.EncryptFileRequestMessage.prototype.getPublicKeyPath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.EncryptFileRequestMessage} returns this - */ -proto.agent.EncryptFileRequestMessage.prototype.setPublicKeyPath = 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.agent.EncryptFileResponseMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.EncryptFileResponseMessage.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.agent.EncryptFileResponseMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.EncryptFileResponseMessage.toObject = function(includeInstance, msg) { - var f, obj = { - encryptedpath: 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.agent.EncryptFileResponseMessage} - */ -proto.agent.EncryptFileResponseMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.EncryptFileResponseMessage; - return proto.agent.EncryptFileResponseMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.EncryptFileResponseMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.EncryptFileResponseMessage} - */ -proto.agent.EncryptFileResponseMessage.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.setEncryptedpath(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.EncryptFileResponseMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.EncryptFileResponseMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.EncryptFileResponseMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.EncryptFileResponseMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEncryptedpath(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string encryptedPath = 1; - * @return {string} - */ -proto.agent.EncryptFileResponseMessage.prototype.getEncryptedpath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.EncryptFileResponseMessage} returns this - */ -proto.agent.EncryptFileResponseMessage.prototype.setEncryptedpath = 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.agent.DecryptFileRequestMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.DecryptFileRequestMessage.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.agent.DecryptFileRequestMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.DecryptFileRequestMessage.toObject = function(includeInstance, msg) { - var f, obj = { - filePath: jspb.Message.getFieldWithDefault(msg, 1, ""), - privateKeyPath: jspb.Message.getFieldWithDefault(msg, 2, ""), - passphrase: 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.agent.DecryptFileRequestMessage} - */ -proto.agent.DecryptFileRequestMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.DecryptFileRequestMessage; - return proto.agent.DecryptFileRequestMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.DecryptFileRequestMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.DecryptFileRequestMessage} - */ -proto.agent.DecryptFileRequestMessage.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.setFilePath(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPrivateKeyPath(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPassphrase(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.DecryptFileRequestMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.DecryptFileRequestMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.DecryptFileRequestMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.DecryptFileRequestMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFilePath(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getPrivateKeyPath(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getPassphrase(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string file_path = 1; - * @return {string} - */ -proto.agent.DecryptFileRequestMessage.prototype.getFilePath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.DecryptFileRequestMessage} returns this - */ -proto.agent.DecryptFileRequestMessage.prototype.setFilePath = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string private_key_path = 2; - * @return {string} - */ -proto.agent.DecryptFileRequestMessage.prototype.getPrivateKeyPath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.DecryptFileRequestMessage} returns this - */ -proto.agent.DecryptFileRequestMessage.prototype.setPrivateKeyPath = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string passphrase = 3; - * @return {string} - */ -proto.agent.DecryptFileRequestMessage.prototype.getPassphrase = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.DecryptFileRequestMessage} returns this - */ -proto.agent.DecryptFileRequestMessage.prototype.setPassphrase = 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.agent.DecryptFileResponseMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.DecryptFileResponseMessage.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.agent.DecryptFileResponseMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.DecryptFileResponseMessage.toObject = function(includeInstance, msg) { - var f, obj = { - decryptedpath: 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.agent.DecryptFileResponseMessage} - */ -proto.agent.DecryptFileResponseMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.DecryptFileResponseMessage; - return proto.agent.DecryptFileResponseMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.DecryptFileResponseMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.DecryptFileResponseMessage} - */ -proto.agent.DecryptFileResponseMessage.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.setDecryptedpath(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.DecryptFileResponseMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.DecryptFileResponseMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.DecryptFileResponseMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.DecryptFileResponseMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDecryptedpath(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string decryptedPath = 1; - * @return {string} - */ -proto.agent.DecryptFileResponseMessage.prototype.getDecryptedpath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.DecryptFileResponseMessage} returns this - */ -proto.agent.DecryptFileResponseMessage.prototype.setDecryptedpath = 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.agent.ListVaultsRequestMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.ListVaultsRequestMessage.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.agent.ListVaultsRequestMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.ListVaultsRequestMessage.toObject = function(includeInstance, msg) { - var f, 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.agent.ListVaultsRequestMessage} - */ -proto.agent.ListVaultsRequestMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.ListVaultsRequestMessage; - return proto.agent.ListVaultsRequestMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.ListVaultsRequestMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.ListVaultsRequestMessage} - */ -proto.agent.ListVaultsRequestMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.ListVaultsRequestMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.ListVaultsRequestMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.ListVaultsRequestMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.ListVaultsRequestMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.agent.ListVaultsResponseMessage.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.agent.ListVaultsResponseMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.ListVaultsResponseMessage.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.agent.ListVaultsResponseMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.ListVaultsResponseMessage.toObject = function(includeInstance, msg) { - var f, obj = { - vaultNamesList: (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.agent.ListVaultsResponseMessage} - */ -proto.agent.ListVaultsResponseMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.ListVaultsResponseMessage; - return proto.agent.ListVaultsResponseMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.ListVaultsResponseMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.ListVaultsResponseMessage} - */ -proto.agent.ListVaultsResponseMessage.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.addVaultNames(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.ListVaultsResponseMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.ListVaultsResponseMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.ListVaultsResponseMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.ListVaultsResponseMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVaultNamesList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } -}; - - -/** - * repeated string vault_names = 1; - * @return {!Array} - */ -proto.agent.ListVaultsResponseMessage.prototype.getVaultNamesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.agent.ListVaultsResponseMessage} returns this - */ -proto.agent.ListVaultsResponseMessage.prototype.setVaultNamesList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.agent.ListVaultsResponseMessage} returns this - */ -proto.agent.ListVaultsResponseMessage.prototype.addVaultNames = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.agent.ListVaultsResponseMessage} returns this - */ -proto.agent.ListVaultsResponseMessage.prototype.clearVaultNamesList = function() { - return this.setVaultNamesList([]); -}; - - - - - -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.agent.NewVaultRequestMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.NewVaultRequestMessage.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.agent.NewVaultRequestMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.NewVaultRequestMessage.toObject = function(includeInstance, msg) { - var f, obj = { - vaultName: 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.agent.NewVaultRequestMessage} - */ -proto.agent.NewVaultRequestMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.NewVaultRequestMessage; - return proto.agent.NewVaultRequestMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.NewVaultRequestMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.NewVaultRequestMessage} - */ -proto.agent.NewVaultRequestMessage.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.setVaultName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.NewVaultRequestMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.NewVaultRequestMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.NewVaultRequestMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.NewVaultRequestMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVaultName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string vault_name = 1; - * @return {string} - */ -proto.agent.NewVaultRequestMessage.prototype.getVaultName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.NewVaultRequestMessage} returns this - */ -proto.agent.NewVaultRequestMessage.prototype.setVaultName = 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.agent.NewVaultResponseMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.NewVaultResponseMessage.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.agent.NewVaultResponseMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.NewVaultResponseMessage.toObject = function(includeInstance, msg) { - var f, obj = { - successful: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.NewVaultResponseMessage} - */ -proto.agent.NewVaultResponseMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.NewVaultResponseMessage; - return proto.agent.NewVaultResponseMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.NewVaultResponseMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.NewVaultResponseMessage} - */ -proto.agent.NewVaultResponseMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuccessful(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.NewVaultResponseMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.NewVaultResponseMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.NewVaultResponseMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.NewVaultResponseMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSuccessful(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool successful = 1; - * @return {boolean} - */ -proto.agent.NewVaultResponseMessage.prototype.getSuccessful = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.agent.NewVaultResponseMessage} returns this - */ -proto.agent.NewVaultResponseMessage.prototype.setSuccessful = function(value) { - return jspb.Message.setProto3BooleanField(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.agent.DestroyVaultRequestMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.DestroyVaultRequestMessage.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.agent.DestroyVaultRequestMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.DestroyVaultRequestMessage.toObject = function(includeInstance, msg) { - var f, obj = { - vaultName: 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.agent.DestroyVaultRequestMessage} - */ -proto.agent.DestroyVaultRequestMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.DestroyVaultRequestMessage; - return proto.agent.DestroyVaultRequestMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.DestroyVaultRequestMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.DestroyVaultRequestMessage} - */ -proto.agent.DestroyVaultRequestMessage.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.setVaultName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.DestroyVaultRequestMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.DestroyVaultRequestMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.DestroyVaultRequestMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.DestroyVaultRequestMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVaultName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string vault_name = 1; - * @return {string} - */ -proto.agent.DestroyVaultRequestMessage.prototype.getVaultName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.DestroyVaultRequestMessage} returns this - */ -proto.agent.DestroyVaultRequestMessage.prototype.setVaultName = 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.agent.DestroyVaultResponseMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.DestroyVaultResponseMessage.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.agent.DestroyVaultResponseMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.DestroyVaultResponseMessage.toObject = function(includeInstance, msg) { - var f, obj = { - successful: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.DestroyVaultResponseMessage} - */ -proto.agent.DestroyVaultResponseMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.DestroyVaultResponseMessage; - return proto.agent.DestroyVaultResponseMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.DestroyVaultResponseMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.DestroyVaultResponseMessage} - */ -proto.agent.DestroyVaultResponseMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuccessful(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.DestroyVaultResponseMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.DestroyVaultResponseMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.DestroyVaultResponseMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.DestroyVaultResponseMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSuccessful(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool successful = 1; - * @return {boolean} - */ -proto.agent.DestroyVaultResponseMessage.prototype.getSuccessful = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.agent.DestroyVaultResponseMessage} returns this - */ -proto.agent.DestroyVaultResponseMessage.prototype.setSuccessful = function(value) { - return jspb.Message.setProto3BooleanField(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.agent.ListSecretsRequestMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.ListSecretsRequestMessage.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.agent.ListSecretsRequestMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.ListSecretsRequestMessage.toObject = function(includeInstance, msg) { - var f, obj = { - vaultName: 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.agent.ListSecretsRequestMessage} - */ -proto.agent.ListSecretsRequestMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.ListSecretsRequestMessage; - return proto.agent.ListSecretsRequestMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.ListSecretsRequestMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.ListSecretsRequestMessage} - */ -proto.agent.ListSecretsRequestMessage.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.setVaultName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.ListSecretsRequestMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.ListSecretsRequestMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.ListSecretsRequestMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.ListSecretsRequestMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVaultName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string vault_name = 1; - * @return {string} - */ -proto.agent.ListSecretsRequestMessage.prototype.getVaultName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.ListSecretsRequestMessage} returns this - */ -proto.agent.ListSecretsRequestMessage.prototype.setVaultName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.agent.ListSecretsResponseMessage.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.agent.ListSecretsResponseMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.ListSecretsResponseMessage.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.agent.ListSecretsResponseMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.ListSecretsResponseMessage.toObject = function(includeInstance, msg) { - var f, obj = { - secretNamesList: (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.agent.ListSecretsResponseMessage} - */ -proto.agent.ListSecretsResponseMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.ListSecretsResponseMessage; - return proto.agent.ListSecretsResponseMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.ListSecretsResponseMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.ListSecretsResponseMessage} - */ -proto.agent.ListSecretsResponseMessage.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.addSecretNames(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.ListSecretsResponseMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.ListSecretsResponseMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.ListSecretsResponseMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.ListSecretsResponseMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSecretNamesList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } -}; - - -/** - * repeated string secret_names = 1; - * @return {!Array} - */ -proto.agent.ListSecretsResponseMessage.prototype.getSecretNamesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.agent.ListSecretsResponseMessage} returns this - */ -proto.agent.ListSecretsResponseMessage.prototype.setSecretNamesList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.agent.ListSecretsResponseMessage} returns this - */ -proto.agent.ListSecretsResponseMessage.prototype.addSecretNames = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.agent.ListSecretsResponseMessage} returns this - */ -proto.agent.ListSecretsResponseMessage.prototype.clearSecretNamesList = function() { - return this.setSecretNamesList([]); -}; - - - - - -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.agent.CreateSecretRequestMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.CreateSecretRequestMessage.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.agent.CreateSecretRequestMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.CreateSecretRequestMessage.toObject = function(includeInstance, msg) { - var f, obj = { - vaultName: jspb.Message.getFieldWithDefault(msg, 1, ""), - secretName: jspb.Message.getFieldWithDefault(msg, 2, ""), - secretPath: jspb.Message.getFieldWithDefault(msg, 3, ""), - secretContent: msg.getSecretContent_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.CreateSecretRequestMessage} - */ -proto.agent.CreateSecretRequestMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.CreateSecretRequestMessage; - return proto.agent.CreateSecretRequestMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.CreateSecretRequestMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.CreateSecretRequestMessage} - */ -proto.agent.CreateSecretRequestMessage.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.setVaultName(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setSecretName(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setSecretPath(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSecretContent(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.CreateSecretRequestMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.CreateSecretRequestMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.CreateSecretRequestMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.CreateSecretRequestMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVaultName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSecretName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getSecretPath(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getSecretContent_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } -}; - - -/** - * optional string vault_name = 1; - * @return {string} - */ -proto.agent.CreateSecretRequestMessage.prototype.getVaultName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.CreateSecretRequestMessage} returns this - */ -proto.agent.CreateSecretRequestMessage.prototype.setVaultName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string secret_name = 2; - * @return {string} - */ -proto.agent.CreateSecretRequestMessage.prototype.getSecretName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.CreateSecretRequestMessage} returns this - */ -proto.agent.CreateSecretRequestMessage.prototype.setSecretName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string secret_path = 3; - * @return {string} - */ -proto.agent.CreateSecretRequestMessage.prototype.getSecretPath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.CreateSecretRequestMessage} returns this - */ -proto.agent.CreateSecretRequestMessage.prototype.setSecretPath = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional bytes secret_content = 4; - * @return {!(string|Uint8Array)} - */ -proto.agent.CreateSecretRequestMessage.prototype.getSecretContent = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes secret_content = 4; - * This is a type-conversion wrapper around `getSecretContent()` - * @return {string} - */ -proto.agent.CreateSecretRequestMessage.prototype.getSecretContent_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSecretContent())); -}; - - -/** - * optional bytes secret_content = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSecretContent()` - * @return {!Uint8Array} - */ -proto.agent.CreateSecretRequestMessage.prototype.getSecretContent_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSecretContent())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.agent.CreateSecretRequestMessage} returns this - */ -proto.agent.CreateSecretRequestMessage.prototype.setSecretContent = function(value) { - return jspb.Message.setProto3BytesField(this, 4, 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.agent.CreateSecretResponseMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.CreateSecretResponseMessage.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.agent.CreateSecretResponseMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.CreateSecretResponseMessage.toObject = function(includeInstance, msg) { - var f, obj = { - successful: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.CreateSecretResponseMessage} - */ -proto.agent.CreateSecretResponseMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.CreateSecretResponseMessage; - return proto.agent.CreateSecretResponseMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.CreateSecretResponseMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.CreateSecretResponseMessage} - */ -proto.agent.CreateSecretResponseMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuccessful(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.CreateSecretResponseMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.CreateSecretResponseMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.CreateSecretResponseMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.CreateSecretResponseMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSuccessful(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool successful = 1; - * @return {boolean} - */ -proto.agent.CreateSecretResponseMessage.prototype.getSuccessful = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.agent.CreateSecretResponseMessage} returns this - */ -proto.agent.CreateSecretResponseMessage.prototype.setSuccessful = function(value) { - return jspb.Message.setProto3BooleanField(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.agent.DestroySecretRequestMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.DestroySecretRequestMessage.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.agent.DestroySecretRequestMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.DestroySecretRequestMessage.toObject = function(includeInstance, msg) { - var f, obj = { - vaultName: jspb.Message.getFieldWithDefault(msg, 1, ""), - secretName: 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.agent.DestroySecretRequestMessage} - */ -proto.agent.DestroySecretRequestMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.DestroySecretRequestMessage; - return proto.agent.DestroySecretRequestMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.DestroySecretRequestMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.DestroySecretRequestMessage} - */ -proto.agent.DestroySecretRequestMessage.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.setVaultName(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setSecretName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.DestroySecretRequestMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.DestroySecretRequestMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.DestroySecretRequestMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.DestroySecretRequestMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVaultName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSecretName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string vault_name = 1; - * @return {string} - */ -proto.agent.DestroySecretRequestMessage.prototype.getVaultName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.DestroySecretRequestMessage} returns this - */ -proto.agent.DestroySecretRequestMessage.prototype.setVaultName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string secret_name = 2; - * @return {string} - */ -proto.agent.DestroySecretRequestMessage.prototype.getSecretName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.DestroySecretRequestMessage} returns this - */ -proto.agent.DestroySecretRequestMessage.prototype.setSecretName = 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.agent.DestroySecretResponseMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.DestroySecretResponseMessage.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.agent.DestroySecretResponseMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.DestroySecretResponseMessage.toObject = function(includeInstance, msg) { - var f, obj = { - successful: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.DestroySecretResponseMessage} - */ -proto.agent.DestroySecretResponseMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.DestroySecretResponseMessage; - return proto.agent.DestroySecretResponseMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.DestroySecretResponseMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.DestroySecretResponseMessage} - */ -proto.agent.DestroySecretResponseMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuccessful(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.DestroySecretResponseMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.DestroySecretResponseMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.DestroySecretResponseMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.DestroySecretResponseMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSuccessful(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool successful = 1; - * @return {boolean} - */ -proto.agent.DestroySecretResponseMessage.prototype.getSuccessful = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.agent.DestroySecretResponseMessage} returns this - */ -proto.agent.DestroySecretResponseMessage.prototype.setSuccessful = function(value) { - return jspb.Message.setProto3BooleanField(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.agent.GetSecretRequestMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.GetSecretRequestMessage.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.agent.GetSecretRequestMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.GetSecretRequestMessage.toObject = function(includeInstance, msg) { - var f, obj = { - vaultName: jspb.Message.getFieldWithDefault(msg, 1, ""), - secretName: 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.agent.GetSecretRequestMessage} - */ -proto.agent.GetSecretRequestMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.GetSecretRequestMessage; - return proto.agent.GetSecretRequestMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.GetSecretRequestMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.GetSecretRequestMessage} - */ -proto.agent.GetSecretRequestMessage.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.setVaultName(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setSecretName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.GetSecretRequestMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.GetSecretRequestMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.GetSecretRequestMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.GetSecretRequestMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVaultName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSecretName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string vault_name = 1; - * @return {string} - */ -proto.agent.GetSecretRequestMessage.prototype.getVaultName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.GetSecretRequestMessage} returns this - */ -proto.agent.GetSecretRequestMessage.prototype.setVaultName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string secret_name = 2; - * @return {string} - */ -proto.agent.GetSecretRequestMessage.prototype.getSecretName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.GetSecretRequestMessage} returns this - */ -proto.agent.GetSecretRequestMessage.prototype.setSecretName = 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.agent.GetSecretResponseMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.GetSecretResponseMessage.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.agent.GetSecretResponseMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.GetSecretResponseMessage.toObject = function(includeInstance, msg) { - var f, obj = { - secret: msg.getSecret_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.GetSecretResponseMessage} - */ -proto.agent.GetSecretResponseMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.GetSecretResponseMessage; - return proto.agent.GetSecretResponseMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.GetSecretResponseMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.GetSecretResponseMessage} - */ -proto.agent.GetSecretResponseMessage.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSecret(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.GetSecretResponseMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.GetSecretResponseMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.GetSecretResponseMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.GetSecretResponseMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSecret_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } -}; - - -/** - * optional bytes secret = 1; - * @return {!(string|Uint8Array)} - */ -proto.agent.GetSecretResponseMessage.prototype.getSecret = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes secret = 1; - * This is a type-conversion wrapper around `getSecret()` - * @return {string} - */ -proto.agent.GetSecretResponseMessage.prototype.getSecret_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSecret())); -}; - - -/** - * optional bytes secret = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSecret()` - * @return {!Uint8Array} - */ -proto.agent.GetSecretResponseMessage.prototype.getSecret_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSecret())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.agent.GetSecretResponseMessage} returns this - */ -proto.agent.GetSecretResponseMessage.prototype.setSecret = function(value) { - return jspb.Message.setProto3BytesField(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.agent.DeriveKeyRequestMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.DeriveKeyRequestMessage.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.agent.DeriveKeyRequestMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.DeriveKeyRequestMessage.toObject = function(includeInstance, msg) { - var f, obj = { - vaultName: jspb.Message.getFieldWithDefault(msg, 1, ""), - keyName: jspb.Message.getFieldWithDefault(msg, 2, ""), - passphrase: 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.agent.DeriveKeyRequestMessage} - */ -proto.agent.DeriveKeyRequestMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.DeriveKeyRequestMessage; - return proto.agent.DeriveKeyRequestMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.agent.DeriveKeyRequestMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.DeriveKeyRequestMessage} - */ -proto.agent.DeriveKeyRequestMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.agentInterface.StringMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5659,120 +559,62 @@ proto.agent.DeriveKeyRequestMessage.deserializeBinaryFromReader = function(msg, switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setVaultName(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setKeyName(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPassphrase(value); + msg.setS(value); break; default: reader.skipField(); break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.agent.DeriveKeyRequestMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.agent.DeriveKeyRequestMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.agent.DeriveKeyRequestMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.agent.DeriveKeyRequestMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVaultName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getKeyName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getPassphrase(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string vault_name = 1; - * @return {string} - */ -proto.agent.DeriveKeyRequestMessage.prototype.getVaultName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.DeriveKeyRequestMessage} returns this - */ -proto.agent.DeriveKeyRequestMessage.prototype.setVaultName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + } + } + return msg; }; /** - * optional string key_name = 2; - * @return {string} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.agent.DeriveKeyRequestMessage.prototype.getKeyName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.agentInterface.StringMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.agentInterface.StringMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {string} value - * @return {!proto.agent.DeriveKeyRequestMessage} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.agentInterface.StringMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.DeriveKeyRequestMessage.prototype.setKeyName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.agentInterface.StringMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getS(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } }; /** - * optional string passphrase = 3; + * optional string s = 1; * @return {string} */ -proto.agent.DeriveKeyRequestMessage.prototype.getPassphrase = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.agentInterface.StringMessage.prototype.getS = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.agent.DeriveKeyRequestMessage} returns this + * @return {!proto.agentInterface.StringMessage} returns this */ -proto.agent.DeriveKeyRequestMessage.prototype.setPassphrase = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.agentInterface.StringMessage.prototype.setS = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -5792,8 +634,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agent.DeriveKeyResponseMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.DeriveKeyResponseMessage.toObject(opt_includeInstance, this); +proto.agentInterface.BooleanMessage.prototype.toObject = function(opt_includeInstance) { + return proto.agentInterface.BooleanMessage.toObject(opt_includeInstance, this); }; @@ -5802,13 +644,13 @@ proto.agent.DeriveKeyResponseMessage.prototype.toObject = function(opt_includeIn * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agent.DeriveKeyResponseMessage} msg The msg instance to transform. + * @param {!proto.agentInterface.BooleanMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.DeriveKeyResponseMessage.toObject = function(includeInstance, msg) { +proto.agentInterface.BooleanMessage.toObject = function(includeInstance, msg) { var f, obj = { - successful: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + b: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) }; if (includeInstance) { @@ -5822,23 +664,23 @@ proto.agent.DeriveKeyResponseMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.DeriveKeyResponseMessage} + * @return {!proto.agentInterface.BooleanMessage} */ -proto.agent.DeriveKeyResponseMessage.deserializeBinary = function(bytes) { +proto.agentInterface.BooleanMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.DeriveKeyResponseMessage; - return proto.agent.DeriveKeyResponseMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.agentInterface.BooleanMessage; + return proto.agentInterface.BooleanMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agent.DeriveKeyResponseMessage} msg The message object to deserialize into. + * @param {!proto.agentInterface.BooleanMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.DeriveKeyResponseMessage} + * @return {!proto.agentInterface.BooleanMessage} */ -proto.agent.DeriveKeyResponseMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.agentInterface.BooleanMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5847,7 +689,7 @@ proto.agent.DeriveKeyResponseMessage.deserializeBinaryFromReader = function(msg, switch (field) { case 1: var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuccessful(value); + msg.setB(value); break; default: reader.skipField(); @@ -5862,9 +704,9 @@ proto.agent.DeriveKeyResponseMessage.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agent.DeriveKeyResponseMessage.prototype.serializeBinary = function() { +proto.agentInterface.BooleanMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agent.DeriveKeyResponseMessage.serializeBinaryToWriter(this, writer); + proto.agentInterface.BooleanMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5872,13 +714,13 @@ proto.agent.DeriveKeyResponseMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agent.DeriveKeyResponseMessage} message + * @param {!proto.agentInterface.BooleanMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.DeriveKeyResponseMessage.serializeBinaryToWriter = function(message, writer) { +proto.agentInterface.BooleanMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSuccessful(); + f = message.getB(); if (f) { writer.writeBool( 1, @@ -5889,24 +731,31 @@ proto.agent.DeriveKeyResponseMessage.serializeBinaryToWriter = function(message, /** - * optional bool successful = 1; + * optional bool b = 1; * @return {boolean} */ -proto.agent.DeriveKeyResponseMessage.prototype.getSuccessful = function() { +proto.agentInterface.BooleanMessage.prototype.getB = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** * @param {boolean} value - * @return {!proto.agent.DeriveKeyResponseMessage} returns this + * @return {!proto.agentInterface.BooleanMessage} returns this */ -proto.agent.DeriveKeyResponseMessage.prototype.setSuccessful = function(value) { +proto.agentInterface.BooleanMessage.prototype.setB = function(value) { return jspb.Message.setProto3BooleanField(this, 1, value); }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.agentInterface.StringListMessage.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -5922,8 +771,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agent.ListKeysRequestMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.ListKeysRequestMessage.toObject(opt_includeInstance, this); +proto.agentInterface.StringListMessage.prototype.toObject = function(opt_includeInstance) { + return proto.agentInterface.StringListMessage.toObject(opt_includeInstance, this); }; @@ -5932,13 +781,13 @@ proto.agent.ListKeysRequestMessage.prototype.toObject = function(opt_includeInst * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agent.ListKeysRequestMessage} msg The msg instance to transform. + * @param {!proto.agentInterface.StringListMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.ListKeysRequestMessage.toObject = function(includeInstance, msg) { +proto.agentInterface.StringListMessage.toObject = function(includeInstance, msg) { var f, obj = { - + sList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; if (includeInstance) { @@ -5952,29 +801,33 @@ proto.agent.ListKeysRequestMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.ListKeysRequestMessage} + * @return {!proto.agentInterface.StringListMessage} */ -proto.agent.ListKeysRequestMessage.deserializeBinary = function(bytes) { +proto.agentInterface.StringListMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.ListKeysRequestMessage; - return proto.agent.ListKeysRequestMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.agentInterface.StringListMessage; + return proto.agentInterface.StringListMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agent.ListKeysRequestMessage} msg The message object to deserialize into. + * @param {!proto.agentInterface.StringListMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.ListKeysRequestMessage} + * @return {!proto.agentInterface.StringListMessage} */ -proto.agent.ListKeysRequestMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.agentInterface.StringListMessage.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.addS(value); + break; default: reader.skipField(); break; @@ -5988,9 +841,9 @@ proto.agent.ListKeysRequestMessage.deserializeBinaryFromReader = function(msg, r * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agent.ListKeysRequestMessage.prototype.serializeBinary = function() { +proto.agentInterface.StringListMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agent.ListKeysRequestMessage.serializeBinaryToWriter(this, writer); + proto.agentInterface.StringListMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5998,22 +851,59 @@ proto.agent.ListKeysRequestMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agent.ListKeysRequestMessage} message + * @param {!proto.agentInterface.StringListMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.ListKeysRequestMessage.serializeBinaryToWriter = function(message, writer) { +proto.agentInterface.StringListMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getSList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string s = 1; + * @return {!Array} + */ +proto.agentInterface.StringListMessage.prototype.getSList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; +/** + * @param {!Array} value + * @return {!proto.agentInterface.StringListMessage} returns this + */ +proto.agentInterface.StringListMessage.prototype.setSList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @param {string} value + * @param {number=} opt_index + * @return {!proto.agentInterface.StringListMessage} returns this + */ +proto.agentInterface.StringListMessage.prototype.addS = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.agentInterface.StringListMessage} returns this */ -proto.agent.ListKeysResponseMessage.repeatedFields_ = [1]; +proto.agentInterface.StringListMessage.prototype.clearSList = function() { + return this.setSList([]); +}; + + @@ -6030,8 +920,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agent.ListKeysResponseMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.ListKeysResponseMessage.toObject(opt_includeInstance, this); +proto.agentInterface.PeerInfoMessage.prototype.toObject = function(opt_includeInstance) { + return proto.agentInterface.PeerInfoMessage.toObject(opt_includeInstance, this); }; @@ -6040,13 +930,16 @@ proto.agent.ListKeysResponseMessage.prototype.toObject = function(opt_includeIns * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agent.ListKeysResponseMessage} msg The msg instance to transform. + * @param {!proto.agentInterface.PeerInfoMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.ListKeysResponseMessage.toObject = function(includeInstance, msg) { +proto.agentInterface.PeerInfoMessage.toObject = function(includeInstance, msg) { var f, obj = { - keyNamesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + publicKey: jspb.Message.getFieldWithDefault(msg, 1, ""), + relayPublicKey: jspb.Message.getFieldWithDefault(msg, 2, ""), + peerAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), + apiAddress: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { @@ -6060,23 +953,23 @@ proto.agent.ListKeysResponseMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.ListKeysResponseMessage} + * @return {!proto.agentInterface.PeerInfoMessage} */ -proto.agent.ListKeysResponseMessage.deserializeBinary = function(bytes) { +proto.agentInterface.PeerInfoMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.ListKeysResponseMessage; - return proto.agent.ListKeysResponseMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.agentInterface.PeerInfoMessage; + return proto.agentInterface.PeerInfoMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agent.ListKeysResponseMessage} msg The message object to deserialize into. + * @param {!proto.agentInterface.PeerInfoMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.ListKeysResponseMessage} + * @return {!proto.agentInterface.PeerInfoMessage} */ -proto.agent.ListKeysResponseMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.agentInterface.PeerInfoMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6085,7 +978,19 @@ proto.agent.ListKeysResponseMessage.deserializeBinaryFromReader = function(msg, switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.addKeyNames(value); + msg.setPublicKey(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRelayPublicKey(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPeerAddress(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setApiAddress(value); break; default: reader.skipField(); @@ -6100,9 +1005,9 @@ proto.agent.ListKeysResponseMessage.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agent.ListKeysResponseMessage.prototype.serializeBinary = function() { +proto.agentInterface.PeerInfoMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agent.ListKeysResponseMessage.serializeBinaryToWriter(this, writer); + proto.agentInterface.PeerInfoMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6110,56 +1015,112 @@ proto.agent.ListKeysResponseMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agent.ListKeysResponseMessage} message + * @param {!proto.agentInterface.PeerInfoMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.ListKeysResponseMessage.serializeBinaryToWriter = function(message, writer) { +proto.agentInterface.PeerInfoMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getKeyNamesList(); + f = message.getPublicKey(); if (f.length > 0) { - writer.writeRepeatedString( + writer.writeString( 1, f ); } + f = message.getRelayPublicKey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPeerAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getApiAddress(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } }; /** - * repeated string key_names = 1; - * @return {!Array} + * optional string public_key = 1; + * @return {string} */ -proto.agent.ListKeysResponseMessage.prototype.getKeyNamesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +proto.agentInterface.PeerInfoMessage.prototype.getPublicKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!Array} value - * @return {!proto.agent.ListKeysResponseMessage} returns this + * @param {string} value + * @return {!proto.agentInterface.PeerInfoMessage} returns this */ -proto.agent.ListKeysResponseMessage.prototype.setKeyNamesList = function(value) { - return jspb.Message.setField(this, 1, value || []); +proto.agentInterface.PeerInfoMessage.prototype.setPublicKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string relay_public_key = 2; + * @return {string} + */ +proto.agentInterface.PeerInfoMessage.prototype.getRelayPublicKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @param {number=} opt_index - * @return {!proto.agent.ListKeysResponseMessage} returns this + * @return {!proto.agentInterface.PeerInfoMessage} returns this */ -proto.agent.ListKeysResponseMessage.prototype.addKeyNames = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.agentInterface.PeerInfoMessage.prototype.setRelayPublicKey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.agent.ListKeysResponseMessage} returns this + * optional string peer_address = 3; + * @return {string} + */ +proto.agentInterface.PeerInfoMessage.prototype.getPeerAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.agentInterface.PeerInfoMessage} returns this + */ +proto.agentInterface.PeerInfoMessage.prototype.setPeerAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string api_address = 4; + * @return {string} + */ +proto.agentInterface.PeerInfoMessage.prototype.getApiAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.agentInterface.PeerInfoMessage} returns this */ -proto.agent.ListKeysResponseMessage.prototype.clearKeyNamesList = function() { - return this.setKeyNamesList([]); +proto.agentInterface.PeerInfoMessage.prototype.setApiAddress = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); }; @@ -6179,8 +1140,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agent.GetKeyRequestMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.GetKeyRequestMessage.toObject(opt_includeInstance, this); +proto.agentInterface.AgentStatusMessage.prototype.toObject = function(opt_includeInstance) { + return proto.agentInterface.AgentStatusMessage.toObject(opt_includeInstance, this); }; @@ -6189,13 +1150,13 @@ proto.agent.GetKeyRequestMessage.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agent.GetKeyRequestMessage} msg The msg instance to transform. + * @param {!proto.agentInterface.AgentStatusMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.GetKeyRequestMessage.toObject = function(includeInstance, msg) { +proto.agentInterface.AgentStatusMessage.toObject = function(includeInstance, msg) { var f, obj = { - keyName: jspb.Message.getFieldWithDefault(msg, 1, "") + status: jspb.Message.getFieldWithDefault(msg, 1, 0) }; if (includeInstance) { @@ -6209,23 +1170,23 @@ proto.agent.GetKeyRequestMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.GetKeyRequestMessage} + * @return {!proto.agentInterface.AgentStatusMessage} */ -proto.agent.GetKeyRequestMessage.deserializeBinary = function(bytes) { +proto.agentInterface.AgentStatusMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.GetKeyRequestMessage; - return proto.agent.GetKeyRequestMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.agentInterface.AgentStatusMessage; + return proto.agentInterface.AgentStatusMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agent.GetKeyRequestMessage} msg The message object to deserialize into. + * @param {!proto.agentInterface.AgentStatusMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.GetKeyRequestMessage} + * @return {!proto.agentInterface.AgentStatusMessage} */ -proto.agent.GetKeyRequestMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.agentInterface.AgentStatusMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6233,8 +1194,8 @@ proto.agent.GetKeyRequestMessage.deserializeBinaryFromReader = function(msg, rea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setKeyName(value); + var value = /** @type {!proto.agentInterface.AgentStatusType} */ (reader.readEnum()); + msg.setStatus(value); break; default: reader.skipField(); @@ -6249,9 +1210,9 @@ proto.agent.GetKeyRequestMessage.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agent.GetKeyRequestMessage.prototype.serializeBinary = function() { +proto.agentInterface.AgentStatusMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agent.GetKeyRequestMessage.serializeBinaryToWriter(this, writer); + proto.agentInterface.AgentStatusMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6259,15 +1220,15 @@ proto.agent.GetKeyRequestMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agent.GetKeyRequestMessage} message + * @param {!proto.agentInterface.AgentStatusMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.GetKeyRequestMessage.serializeBinaryToWriter = function(message, writer) { +proto.agentInterface.AgentStatusMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getKeyName(); - if (f.length > 0) { - writer.writeString( + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( 1, f ); @@ -6276,20 +1237,20 @@ proto.agent.GetKeyRequestMessage.serializeBinaryToWriter = function(message, wri /** - * optional string key_name = 1; - * @return {string} + * optional AgentStatusType status = 1; + * @return {!proto.agentInterface.AgentStatusType} */ -proto.agent.GetKeyRequestMessage.prototype.getKeyName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.agentInterface.AgentStatusMessage.prototype.getStatus = function() { + return /** @type {!proto.agentInterface.AgentStatusType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {string} value - * @return {!proto.agent.GetKeyRequestMessage} returns this + * @param {!proto.agentInterface.AgentStatusType} value + * @return {!proto.agentInterface.AgentStatusMessage} returns this */ -proto.agent.GetKeyRequestMessage.prototype.setKeyName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.agentInterface.AgentStatusMessage.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); }; @@ -6309,8 +1270,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agent.GetKeyResponseMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.GetKeyResponseMessage.toObject(opt_includeInstance, this); +proto.agentInterface.NewNodeMessage.prototype.toObject = function(opt_includeInstance) { + return proto.agentInterface.NewNodeMessage.toObject(opt_includeInstance, this); }; @@ -6319,14 +1280,15 @@ proto.agent.GetKeyResponseMessage.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agent.GetKeyResponseMessage} msg The msg instance to transform. + * @param {!proto.agentInterface.NewNodeMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.GetKeyResponseMessage.toObject = function(includeInstance, msg) { +proto.agentInterface.NewNodeMessage.toObject = function(includeInstance, msg) { var f, obj = { - keyName: jspb.Message.getFieldWithDefault(msg, 1, ""), - keyContent: jspb.Message.getFieldWithDefault(msg, 2, "") + userid: jspb.Message.getFieldWithDefault(msg, 1, ""), + passphrase: jspb.Message.getFieldWithDefault(msg, 2, ""), + nbits: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -6340,23 +1302,23 @@ proto.agent.GetKeyResponseMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.GetKeyResponseMessage} + * @return {!proto.agentInterface.NewNodeMessage} */ -proto.agent.GetKeyResponseMessage.deserializeBinary = function(bytes) { +proto.agentInterface.NewNodeMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.GetKeyResponseMessage; - return proto.agent.GetKeyResponseMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.agentInterface.NewNodeMessage; + return proto.agentInterface.NewNodeMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agent.GetKeyResponseMessage} msg The message object to deserialize into. + * @param {!proto.agentInterface.NewNodeMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.GetKeyResponseMessage} + * @return {!proto.agentInterface.NewNodeMessage} */ -proto.agent.GetKeyResponseMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.agentInterface.NewNodeMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6365,11 +1327,15 @@ proto.agent.GetKeyResponseMessage.deserializeBinaryFromReader = function(msg, re switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setKeyName(value); + msg.setUserid(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setKeyContent(value); + msg.setPassphrase(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setNbits(value); break; default: reader.skipField(); @@ -6384,9 +1350,9 @@ proto.agent.GetKeyResponseMessage.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agent.GetKeyResponseMessage.prototype.serializeBinary = function() { +proto.agentInterface.NewNodeMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agent.GetKeyResponseMessage.serializeBinaryToWriter(this, writer); + proto.agentInterface.NewNodeMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6394,65 +1360,90 @@ proto.agent.GetKeyResponseMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agent.GetKeyResponseMessage} message + * @param {!proto.agentInterface.NewNodeMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.GetKeyResponseMessage.serializeBinaryToWriter = function(message, writer) { +proto.agentInterface.NewNodeMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getKeyName(); + f = message.getUserid(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getKeyContent(); + f = message.getPassphrase(); if (f.length > 0) { writer.writeString( 2, f ); } + f = message.getNbits(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } }; /** - * optional string key_name = 1; + * optional string userId = 1; * @return {string} */ -proto.agent.GetKeyResponseMessage.prototype.getKeyName = function() { +proto.agentInterface.NewNodeMessage.prototype.getUserid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.agent.GetKeyResponseMessage} returns this + * @return {!proto.agentInterface.NewNodeMessage} returns this */ -proto.agent.GetKeyResponseMessage.prototype.setKeyName = function(value) { +proto.agentInterface.NewNodeMessage.prototype.setUserid = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string key_content = 2; + * optional string passphrase = 2; * @return {string} */ -proto.agent.GetKeyResponseMessage.prototype.getKeyContent = function() { +proto.agentInterface.NewNodeMessage.prototype.getPassphrase = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.agent.GetKeyResponseMessage} returns this + * @return {!proto.agentInterface.NewNodeMessage} returns this */ -proto.agent.GetKeyResponseMessage.prototype.setKeyContent = function(value) { +proto.agentInterface.NewNodeMessage.prototype.setPassphrase = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; +/** + * optional int32 nbits = 3; + * @return {number} + */ +proto.agentInterface.NewNodeMessage.prototype.getNbits = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.agentInterface.NewNodeMessage} returns this + */ +proto.agentInterface.NewNodeMessage.prototype.setNbits = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + @@ -6469,8 +1460,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agent.GetPrimaryKeyPairRequestMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.GetPrimaryKeyPairRequestMessage.toObject(opt_includeInstance, this); +proto.agentInterface.DeriveKeyMessage.prototype.toObject = function(opt_includeInstance) { + return proto.agentInterface.DeriveKeyMessage.toObject(opt_includeInstance, this); }; @@ -6479,13 +1470,15 @@ proto.agent.GetPrimaryKeyPairRequestMessage.prototype.toObject = function(opt_in * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agent.GetPrimaryKeyPairRequestMessage} msg The msg instance to transform. + * @param {!proto.agentInterface.DeriveKeyMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.GetPrimaryKeyPairRequestMessage.toObject = function(includeInstance, msg) { +proto.agentInterface.DeriveKeyMessage.toObject = function(includeInstance, msg) { var f, obj = { - includePrivateKey: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + vaultName: jspb.Message.getFieldWithDefault(msg, 1, ""), + keyName: jspb.Message.getFieldWithDefault(msg, 2, ""), + passphrase: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -6499,23 +1492,23 @@ proto.agent.GetPrimaryKeyPairRequestMessage.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.GetPrimaryKeyPairRequestMessage} + * @return {!proto.agentInterface.DeriveKeyMessage} */ -proto.agent.GetPrimaryKeyPairRequestMessage.deserializeBinary = function(bytes) { +proto.agentInterface.DeriveKeyMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.GetPrimaryKeyPairRequestMessage; - return proto.agent.GetPrimaryKeyPairRequestMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.agentInterface.DeriveKeyMessage; + return proto.agentInterface.DeriveKeyMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agent.GetPrimaryKeyPairRequestMessage} msg The message object to deserialize into. + * @param {!proto.agentInterface.DeriveKeyMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.GetPrimaryKeyPairRequestMessage} + * @return {!proto.agentInterface.DeriveKeyMessage} */ -proto.agent.GetPrimaryKeyPairRequestMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.agentInterface.DeriveKeyMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6523,8 +1516,16 @@ proto.agent.GetPrimaryKeyPairRequestMessage.deserializeBinaryFromReader = functi var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIncludePrivateKey(value); + var value = /** @type {string} */ (reader.readString()); + msg.setVaultName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setKeyName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPassphrase(value); break; default: reader.skipField(); @@ -6539,9 +1540,9 @@ proto.agent.GetPrimaryKeyPairRequestMessage.deserializeBinaryFromReader = functi * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agent.GetPrimaryKeyPairRequestMessage.prototype.serializeBinary = function() { +proto.agentInterface.DeriveKeyMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agent.GetPrimaryKeyPairRequestMessage.serializeBinaryToWriter(this, writer); + proto.agentInterface.DeriveKeyMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6549,37 +1550,87 @@ proto.agent.GetPrimaryKeyPairRequestMessage.prototype.serializeBinary = function /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agent.GetPrimaryKeyPairRequestMessage} message + * @param {!proto.agentInterface.DeriveKeyMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.GetPrimaryKeyPairRequestMessage.serializeBinaryToWriter = function(message, writer) { +proto.agentInterface.DeriveKeyMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIncludePrivateKey(); - if (f) { - writer.writeBool( + f = message.getVaultName(); + if (f.length > 0) { + writer.writeString( 1, f ); } + f = message.getKeyName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPassphrase(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } }; /** - * optional bool include_private_key = 1; - * @return {boolean} + * optional string vault_name = 1; + * @return {string} */ -proto.agent.GetPrimaryKeyPairRequestMessage.prototype.getIncludePrivateKey = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.agentInterface.DeriveKeyMessage.prototype.getVaultName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {boolean} value - * @return {!proto.agent.GetPrimaryKeyPairRequestMessage} returns this + * @param {string} value + * @return {!proto.agentInterface.DeriveKeyMessage} returns this + */ +proto.agentInterface.DeriveKeyMessage.prototype.setVaultName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string key_name = 2; + * @return {string} + */ +proto.agentInterface.DeriveKeyMessage.prototype.getKeyName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.agentInterface.DeriveKeyMessage} returns this + */ +proto.agentInterface.DeriveKeyMessage.prototype.setKeyName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string passphrase = 3; + * @return {string} + */ +proto.agentInterface.DeriveKeyMessage.prototype.getPassphrase = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.agentInterface.DeriveKeyMessage} returns this */ -proto.agent.GetPrimaryKeyPairRequestMessage.prototype.setIncludePrivateKey = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); +proto.agentInterface.DeriveKeyMessage.prototype.setPassphrase = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -6599,8 +1650,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agent.GetPrimaryKeyPairResponseMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.GetPrimaryKeyPairResponseMessage.toObject(opt_includeInstance, this); +proto.agentInterface.SignFileMessage.prototype.toObject = function(opt_includeInstance) { + return proto.agentInterface.SignFileMessage.toObject(opt_includeInstance, this); }; @@ -6609,14 +1660,15 @@ proto.agent.GetPrimaryKeyPairResponseMessage.prototype.toObject = function(opt_i * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agent.GetPrimaryKeyPairResponseMessage} msg The msg instance to transform. + * @param {!proto.agentInterface.SignFileMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.GetPrimaryKeyPairResponseMessage.toObject = function(includeInstance, msg) { +proto.agentInterface.SignFileMessage.toObject = function(includeInstance, msg) { var f, obj = { - publicKey: jspb.Message.getFieldWithDefault(msg, 1, ""), - privateKey: jspb.Message.getFieldWithDefault(msg, 2, "") + filePath: jspb.Message.getFieldWithDefault(msg, 1, ""), + privateKeyPath: jspb.Message.getFieldWithDefault(msg, 2, ""), + passphrase: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -6630,23 +1682,23 @@ proto.agent.GetPrimaryKeyPairResponseMessage.toObject = function(includeInstance /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.GetPrimaryKeyPairResponseMessage} + * @return {!proto.agentInterface.SignFileMessage} */ -proto.agent.GetPrimaryKeyPairResponseMessage.deserializeBinary = function(bytes) { +proto.agentInterface.SignFileMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.GetPrimaryKeyPairResponseMessage; - return proto.agent.GetPrimaryKeyPairResponseMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.agentInterface.SignFileMessage; + return proto.agentInterface.SignFileMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agent.GetPrimaryKeyPairResponseMessage} msg The message object to deserialize into. + * @param {!proto.agentInterface.SignFileMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.GetPrimaryKeyPairResponseMessage} + * @return {!proto.agentInterface.SignFileMessage} */ -proto.agent.GetPrimaryKeyPairResponseMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.agentInterface.SignFileMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6655,11 +1707,15 @@ proto.agent.GetPrimaryKeyPairResponseMessage.deserializeBinaryFromReader = funct switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPublicKey(value); + msg.setFilePath(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setPrivateKey(value); + msg.setPrivateKeyPath(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPassphrase(value); break; default: reader.skipField(); @@ -6674,9 +1730,9 @@ proto.agent.GetPrimaryKeyPairResponseMessage.deserializeBinaryFromReader = funct * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agent.GetPrimaryKeyPairResponseMessage.prototype.serializeBinary = function() { +proto.agentInterface.SignFileMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agent.GetPrimaryKeyPairResponseMessage.serializeBinaryToWriter(this, writer); + proto.agentInterface.SignFileMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6684,65 +1740,90 @@ proto.agent.GetPrimaryKeyPairResponseMessage.prototype.serializeBinary = functio /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agent.GetPrimaryKeyPairResponseMessage} message + * @param {!proto.agentInterface.SignFileMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.GetPrimaryKeyPairResponseMessage.serializeBinaryToWriter = function(message, writer) { +proto.agentInterface.SignFileMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPublicKey(); + f = message.getFilePath(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getPrivateKey(); + f = message.getPrivateKeyPath(); if (f.length > 0) { writer.writeString( 2, f ); } + f = message.getPassphrase(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } }; /** - * optional string public_key = 1; + * optional string file_path = 1; * @return {string} */ -proto.agent.GetPrimaryKeyPairResponseMessage.prototype.getPublicKey = function() { +proto.agentInterface.SignFileMessage.prototype.getFilePath = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.agent.GetPrimaryKeyPairResponseMessage} returns this + * @return {!proto.agentInterface.SignFileMessage} returns this */ -proto.agent.GetPrimaryKeyPairResponseMessage.prototype.setPublicKey = function(value) { +proto.agentInterface.SignFileMessage.prototype.setFilePath = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string private_key = 2; + * optional string private_key_path = 2; * @return {string} */ -proto.agent.GetPrimaryKeyPairResponseMessage.prototype.getPrivateKey = function() { +proto.agentInterface.SignFileMessage.prototype.getPrivateKeyPath = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.agent.GetPrimaryKeyPairResponseMessage} returns this + * @return {!proto.agentInterface.SignFileMessage} returns this */ -proto.agent.GetPrimaryKeyPairResponseMessage.prototype.setPrivateKey = function(value) { +proto.agentInterface.SignFileMessage.prototype.setPrivateKeyPath = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; +/** + * optional string passphrase = 3; + * @return {string} + */ +proto.agentInterface.SignFileMessage.prototype.getPassphrase = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.agentInterface.SignFileMessage} returns this + */ +proto.agentInterface.SignFileMessage.prototype.setPassphrase = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + @@ -6759,8 +1840,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agent.UpdateSecretRequestMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.UpdateSecretRequestMessage.toObject(opt_includeInstance, this); +proto.agentInterface.VerifyFileMessage.prototype.toObject = function(opt_includeInstance) { + return proto.agentInterface.VerifyFileMessage.toObject(opt_includeInstance, this); }; @@ -6769,16 +1850,14 @@ proto.agent.UpdateSecretRequestMessage.prototype.toObject = function(opt_include * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agent.UpdateSecretRequestMessage} msg The msg instance to transform. + * @param {!proto.agentInterface.VerifyFileMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.UpdateSecretRequestMessage.toObject = function(includeInstance, msg) { +proto.agentInterface.VerifyFileMessage.toObject = function(includeInstance, msg) { var f, obj = { - vaultName: jspb.Message.getFieldWithDefault(msg, 1, ""), - secretName: jspb.Message.getFieldWithDefault(msg, 2, ""), - secretPath: jspb.Message.getFieldWithDefault(msg, 3, ""), - secretContent: msg.getSecretContent_asB64() + filePath: jspb.Message.getFieldWithDefault(msg, 1, ""), + publicKeyPath: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -6792,23 +1871,23 @@ proto.agent.UpdateSecretRequestMessage.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.UpdateSecretRequestMessage} + * @return {!proto.agentInterface.VerifyFileMessage} */ -proto.agent.UpdateSecretRequestMessage.deserializeBinary = function(bytes) { +proto.agentInterface.VerifyFileMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.UpdateSecretRequestMessage; - return proto.agent.UpdateSecretRequestMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.agentInterface.VerifyFileMessage; + return proto.agentInterface.VerifyFileMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agent.UpdateSecretRequestMessage} msg The message object to deserialize into. + * @param {!proto.agentInterface.VerifyFileMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.UpdateSecretRequestMessage} + * @return {!proto.agentInterface.VerifyFileMessage} */ -proto.agent.UpdateSecretRequestMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.agentInterface.VerifyFileMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6817,19 +1896,11 @@ proto.agent.UpdateSecretRequestMessage.deserializeBinaryFromReader = function(ms switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setVaultName(value); + msg.setFilePath(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setSecretName(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setSecretPath(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSecretContent(value); + msg.setPublicKeyPath(value); break; default: reader.skipField(); @@ -6844,9 +1915,9 @@ proto.agent.UpdateSecretRequestMessage.deserializeBinaryFromReader = function(ms * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agent.UpdateSecretRequestMessage.prototype.serializeBinary = function() { +proto.agentInterface.VerifyFileMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agent.UpdateSecretRequestMessage.serializeBinaryToWriter(this, writer); + proto.agentInterface.VerifyFileMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6854,139 +1925,65 @@ proto.agent.UpdateSecretRequestMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agent.UpdateSecretRequestMessage} message + * @param {!proto.agentInterface.VerifyFileMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.UpdateSecretRequestMessage.serializeBinaryToWriter = function(message, writer) { +proto.agentInterface.VerifyFileMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getVaultName(); + f = message.getFilePath(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getSecretName(); + f = message.getPublicKeyPath(); if (f.length > 0) { writer.writeString( 2, f ); } - f = message.getSecretPath(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getSecretContent_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } }; /** - * optional string vault_name = 1; + * optional string file_path = 1; * @return {string} */ -proto.agent.UpdateSecretRequestMessage.prototype.getVaultName = function() { +proto.agentInterface.VerifyFileMessage.prototype.getFilePath = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.agent.UpdateSecretRequestMessage} returns this + * @return {!proto.agentInterface.VerifyFileMessage} returns this */ -proto.agent.UpdateSecretRequestMessage.prototype.setVaultName = function(value) { +proto.agentInterface.VerifyFileMessage.prototype.setFilePath = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string secret_name = 2; + * optional string public_key_path = 2; * @return {string} */ -proto.agent.UpdateSecretRequestMessage.prototype.getSecretName = function() { +proto.agentInterface.VerifyFileMessage.prototype.getPublicKeyPath = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.agent.UpdateSecretRequestMessage} returns this + * @return {!proto.agentInterface.VerifyFileMessage} returns this */ -proto.agent.UpdateSecretRequestMessage.prototype.setSecretName = function(value) { +proto.agentInterface.VerifyFileMessage.prototype.setPublicKeyPath = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; -/** - * optional string secret_path = 3; - * @return {string} - */ -proto.agent.UpdateSecretRequestMessage.prototype.getSecretPath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.UpdateSecretRequestMessage} returns this - */ -proto.agent.UpdateSecretRequestMessage.prototype.setSecretPath = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional bytes secret_content = 4; - * @return {!(string|Uint8Array)} - */ -proto.agent.UpdateSecretRequestMessage.prototype.getSecretContent = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes secret_content = 4; - * This is a type-conversion wrapper around `getSecretContent()` - * @return {string} - */ -proto.agent.UpdateSecretRequestMessage.prototype.getSecretContent_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSecretContent())); -}; - - -/** - * optional bytes secret_content = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSecretContent()` - * @return {!Uint8Array} - */ -proto.agent.UpdateSecretRequestMessage.prototype.getSecretContent_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSecretContent())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.agent.UpdateSecretRequestMessage} returns this - */ -proto.agent.UpdateSecretRequestMessage.prototype.setSecretContent = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - @@ -7003,8 +2000,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agent.UpdateSecretResponseMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.UpdateSecretResponseMessage.toObject(opt_includeInstance, this); +proto.agentInterface.SecretPathMessage.prototype.toObject = function(opt_includeInstance) { + return proto.agentInterface.SecretPathMessage.toObject(opt_includeInstance, this); }; @@ -7013,13 +2010,14 @@ proto.agent.UpdateSecretResponseMessage.prototype.toObject = function(opt_includ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agent.UpdateSecretResponseMessage} msg The msg instance to transform. + * @param {!proto.agentInterface.SecretPathMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.UpdateSecretResponseMessage.toObject = function(includeInstance, msg) { +proto.agentInterface.SecretPathMessage.toObject = function(includeInstance, msg) { var f, obj = { - successful: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + vaultName: jspb.Message.getFieldWithDefault(msg, 1, ""), + secretName: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -7033,23 +2031,23 @@ proto.agent.UpdateSecretResponseMessage.toObject = function(includeInstance, msg /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.UpdateSecretResponseMessage} + * @return {!proto.agentInterface.SecretPathMessage} */ -proto.agent.UpdateSecretResponseMessage.deserializeBinary = function(bytes) { +proto.agentInterface.SecretPathMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.UpdateSecretResponseMessage; - return proto.agent.UpdateSecretResponseMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.agentInterface.SecretPathMessage; + return proto.agentInterface.SecretPathMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agent.UpdateSecretResponseMessage} msg The message object to deserialize into. + * @param {!proto.agentInterface.SecretPathMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.UpdateSecretResponseMessage} + * @return {!proto.agentInterface.SecretPathMessage} */ -proto.agent.UpdateSecretResponseMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.agentInterface.SecretPathMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7057,8 +2055,12 @@ proto.agent.UpdateSecretResponseMessage.deserializeBinaryFromReader = function(m var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuccessful(value); + var value = /** @type {string} */ (reader.readString()); + msg.setVaultName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSecretName(value); break; default: reader.skipField(); @@ -7073,9 +2075,9 @@ proto.agent.UpdateSecretResponseMessage.deserializeBinaryFromReader = function(m * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agent.UpdateSecretResponseMessage.prototype.serializeBinary = function() { +proto.agentInterface.SecretPathMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agent.UpdateSecretResponseMessage.serializeBinaryToWriter(this, writer); + proto.agentInterface.SecretPathMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7083,37 +2085,62 @@ proto.agent.UpdateSecretResponseMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agent.UpdateSecretResponseMessage} message + * @param {!proto.agentInterface.SecretPathMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.UpdateSecretResponseMessage.serializeBinaryToWriter = function(message, writer) { +proto.agentInterface.SecretPathMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSuccessful(); - if (f) { - writer.writeBool( + f = message.getVaultName(); + if (f.length > 0) { + writer.writeString( 1, f ); } + f = message.getSecretName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } }; /** - * optional bool successful = 1; - * @return {boolean} + * optional string vault_name = 1; + * @return {string} */ -proto.agent.UpdateSecretResponseMessage.prototype.getSuccessful = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.agentInterface.SecretPathMessage.prototype.getVaultName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {boolean} value - * @return {!proto.agent.UpdateSecretResponseMessage} returns this + * @param {string} value + * @return {!proto.agentInterface.SecretPathMessage} returns this */ -proto.agent.UpdateSecretResponseMessage.prototype.setSuccessful = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); +proto.agentInterface.SecretPathMessage.prototype.setVaultName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string secret_name = 2; + * @return {string} + */ +proto.agentInterface.SecretPathMessage.prototype.getSecretName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.agentInterface.SecretPathMessage} returns this + */ +proto.agentInterface.SecretPathMessage.prototype.setSecretName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -7133,8 +2160,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agent.DeleteKeyRequestMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.DeleteKeyRequestMessage.toObject(opt_includeInstance, this); +proto.agentInterface.SecretContentMessage.prototype.toObject = function(opt_includeInstance) { + return proto.agentInterface.SecretContentMessage.toObject(opt_includeInstance, this); }; @@ -7143,13 +2170,15 @@ proto.agent.DeleteKeyRequestMessage.prototype.toObject = function(opt_includeIns * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agent.DeleteKeyRequestMessage} msg The msg instance to transform. + * @param {!proto.agentInterface.SecretContentMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.DeleteKeyRequestMessage.toObject = function(includeInstance, msg) { +proto.agentInterface.SecretContentMessage.toObject = function(includeInstance, msg) { var f, obj = { - keyName: jspb.Message.getFieldWithDefault(msg, 1, "") + secretPath: (f = msg.getSecretPath()) && proto.agentInterface.SecretPathMessage.toObject(includeInstance, f), + secretFilePath: jspb.Message.getFieldWithDefault(msg, 2, ""), + secretContent: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -7163,23 +2192,23 @@ proto.agent.DeleteKeyRequestMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.DeleteKeyRequestMessage} + * @return {!proto.agentInterface.SecretContentMessage} */ -proto.agent.DeleteKeyRequestMessage.deserializeBinary = function(bytes) { +proto.agentInterface.SecretContentMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.DeleteKeyRequestMessage; - return proto.agent.DeleteKeyRequestMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.agentInterface.SecretContentMessage; + return proto.agentInterface.SecretContentMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agent.DeleteKeyRequestMessage} msg The message object to deserialize into. + * @param {!proto.agentInterface.SecretContentMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.DeleteKeyRequestMessage} + * @return {!proto.agentInterface.SecretContentMessage} */ -proto.agent.DeleteKeyRequestMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.agentInterface.SecretContentMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7187,8 +2216,17 @@ proto.agent.DeleteKeyRequestMessage.deserializeBinaryFromReader = function(msg, var field = reader.getFieldNumber(); switch (field) { case 1: + var value = new proto.agentInterface.SecretPathMessage; + reader.readMessage(value,proto.agentInterface.SecretPathMessage.deserializeBinaryFromReader); + msg.setSecretPath(value); + break; + case 2: var value = /** @type {string} */ (reader.readString()); - msg.setKeyName(value); + msg.setSecretFilePath(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSecretContent(value); break; default: reader.skipField(); @@ -7203,9 +2241,9 @@ proto.agent.DeleteKeyRequestMessage.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agent.DeleteKeyRequestMessage.prototype.serializeBinary = function() { +proto.agentInterface.SecretContentMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agent.DeleteKeyRequestMessage.serializeBinaryToWriter(this, writer); + proto.agentInterface.SecretContentMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7213,16 +2251,31 @@ proto.agent.DeleteKeyRequestMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agent.DeleteKeyRequestMessage} message + * @param {!proto.agentInterface.SecretContentMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.DeleteKeyRequestMessage.serializeBinaryToWriter = function(message, writer) { +proto.agentInterface.SecretContentMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getKeyName(); + f = message.getSecretPath(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.agentInterface.SecretPathMessage.serializeBinaryToWriter + ); + } + f = message.getSecretFilePath(); if (f.length > 0) { writer.writeString( - 1, + 2, + f + ); + } + f = message.getSecretContent(); + if (f.length > 0) { + writer.writeString( + 3, f ); } @@ -7230,20 +2283,75 @@ proto.agent.DeleteKeyRequestMessage.serializeBinaryToWriter = function(message, /** - * optional string key_name = 1; + * optional SecretPathMessage secret_path = 1; + * @return {?proto.agentInterface.SecretPathMessage} + */ +proto.agentInterface.SecretContentMessage.prototype.getSecretPath = function() { + return /** @type{?proto.agentInterface.SecretPathMessage} */ ( + jspb.Message.getWrapperField(this, proto.agentInterface.SecretPathMessage, 1)); +}; + + +/** + * @param {?proto.agentInterface.SecretPathMessage|undefined} value + * @return {!proto.agentInterface.SecretContentMessage} returns this +*/ +proto.agentInterface.SecretContentMessage.prototype.setSecretPath = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.agentInterface.SecretContentMessage} returns this + */ +proto.agentInterface.SecretContentMessage.prototype.clearSecretPath = function() { + return this.setSecretPath(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.agentInterface.SecretContentMessage.prototype.hasSecretPath = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string secret_file_path = 2; * @return {string} */ -proto.agent.DeleteKeyRequestMessage.prototype.getKeyName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.agentInterface.SecretContentMessage.prototype.getSecretFilePath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.agent.DeleteKeyRequestMessage} returns this + * @return {!proto.agentInterface.SecretContentMessage} returns this */ -proto.agent.DeleteKeyRequestMessage.prototype.setKeyName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.agentInterface.SecretContentMessage.prototype.setSecretFilePath = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string secret_content = 3; + * @return {string} + */ +proto.agentInterface.SecretContentMessage.prototype.getSecretContent = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.agentInterface.SecretContentMessage} returns this + */ +proto.agentInterface.SecretContentMessage.prototype.setSecretContent = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -7263,8 +2371,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agent.DeleteKeyResponseMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.DeleteKeyResponseMessage.toObject(opt_includeInstance, this); +proto.agentInterface.EncryptFileMessage.prototype.toObject = function(opt_includeInstance) { + return proto.agentInterface.EncryptFileMessage.toObject(opt_includeInstance, this); }; @@ -7273,13 +2381,14 @@ proto.agent.DeleteKeyResponseMessage.prototype.toObject = function(opt_includeIn * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agent.DeleteKeyResponseMessage} msg The msg instance to transform. + * @param {!proto.agentInterface.EncryptFileMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.DeleteKeyResponseMessage.toObject = function(includeInstance, msg) { +proto.agentInterface.EncryptFileMessage.toObject = function(includeInstance, msg) { var f, obj = { - successful: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + filePath: jspb.Message.getFieldWithDefault(msg, 1, ""), + publicKeyPath: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -7293,23 +2402,23 @@ proto.agent.DeleteKeyResponseMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.DeleteKeyResponseMessage} + * @return {!proto.agentInterface.EncryptFileMessage} */ -proto.agent.DeleteKeyResponseMessage.deserializeBinary = function(bytes) { +proto.agentInterface.EncryptFileMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.DeleteKeyResponseMessage; - return proto.agent.DeleteKeyResponseMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.agentInterface.EncryptFileMessage; + return proto.agentInterface.EncryptFileMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agent.DeleteKeyResponseMessage} msg The message object to deserialize into. + * @param {!proto.agentInterface.EncryptFileMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.DeleteKeyResponseMessage} + * @return {!proto.agentInterface.EncryptFileMessage} */ -proto.agent.DeleteKeyResponseMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.agentInterface.EncryptFileMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7317,8 +2426,12 @@ proto.agent.DeleteKeyResponseMessage.deserializeBinaryFromReader = function(msg, var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuccessful(value); + var value = /** @type {string} */ (reader.readString()); + msg.setFilePath(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPublicKeyPath(value); break; default: reader.skipField(); @@ -7333,9 +2446,9 @@ proto.agent.DeleteKeyResponseMessage.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agent.DeleteKeyResponseMessage.prototype.serializeBinary = function() { +proto.agentInterface.EncryptFileMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agent.DeleteKeyResponseMessage.serializeBinaryToWriter(this, writer); + proto.agentInterface.EncryptFileMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7343,37 +2456,62 @@ proto.agent.DeleteKeyResponseMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agent.DeleteKeyResponseMessage} message + * @param {!proto.agentInterface.EncryptFileMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.DeleteKeyResponseMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSuccessful(); - if (f) { - writer.writeBool( - 1, - f - ); - } +proto.agentInterface.EncryptFileMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFilePath(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPublicKeyPath(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string file_path = 1; + * @return {string} + */ +proto.agentInterface.EncryptFileMessage.prototype.getFilePath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.agentInterface.EncryptFileMessage} returns this + */ +proto.agentInterface.EncryptFileMessage.prototype.setFilePath = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional bool successful = 1; - * @return {boolean} + * optional string public_key_path = 2; + * @return {string} */ -proto.agent.DeleteKeyResponseMessage.prototype.getSuccessful = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.agentInterface.EncryptFileMessage.prototype.getPublicKeyPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {boolean} value - * @return {!proto.agent.DeleteKeyResponseMessage} returns this + * @param {string} value + * @return {!proto.agentInterface.EncryptFileMessage} returns this */ -proto.agent.DeleteKeyResponseMessage.prototype.setSuccessful = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); +proto.agentInterface.EncryptFileMessage.prototype.setPublicKeyPath = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -7393,8 +2531,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agent.PeerInfoRequestMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.PeerInfoRequestMessage.toObject(opt_includeInstance, this); +proto.agentInterface.DecryptFileMessage.prototype.toObject = function(opt_includeInstance) { + return proto.agentInterface.DecryptFileMessage.toObject(opt_includeInstance, this); }; @@ -7403,14 +2541,15 @@ proto.agent.PeerInfoRequestMessage.prototype.toObject = function(opt_includeInst * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agent.PeerInfoRequestMessage} msg The msg instance to transform. + * @param {!proto.agentInterface.DecryptFileMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.PeerInfoRequestMessage.toObject = function(includeInstance, msg) { +proto.agentInterface.DecryptFileMessage.toObject = function(includeInstance, msg) { var f, obj = { - current: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - publicKey: jspb.Message.getFieldWithDefault(msg, 2, "") + filePath: jspb.Message.getFieldWithDefault(msg, 1, ""), + privateKeyPath: jspb.Message.getFieldWithDefault(msg, 2, ""), + passphrase: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -7424,23 +2563,23 @@ proto.agent.PeerInfoRequestMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.PeerInfoRequestMessage} + * @return {!proto.agentInterface.DecryptFileMessage} */ -proto.agent.PeerInfoRequestMessage.deserializeBinary = function(bytes) { +proto.agentInterface.DecryptFileMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.PeerInfoRequestMessage; - return proto.agent.PeerInfoRequestMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.agentInterface.DecryptFileMessage; + return proto.agentInterface.DecryptFileMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agent.PeerInfoRequestMessage} msg The message object to deserialize into. + * @param {!proto.agentInterface.DecryptFileMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.PeerInfoRequestMessage} + * @return {!proto.agentInterface.DecryptFileMessage} */ -proto.agent.PeerInfoRequestMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.agentInterface.DecryptFileMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7448,12 +2587,16 @@ proto.agent.PeerInfoRequestMessage.deserializeBinaryFromReader = function(msg, r var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setCurrent(value); + var value = /** @type {string} */ (reader.readString()); + msg.setFilePath(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setPublicKey(value); + msg.setPrivateKeyPath(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPassphrase(value); break; default: reader.skipField(); @@ -7468,9 +2611,9 @@ proto.agent.PeerInfoRequestMessage.deserializeBinaryFromReader = function(msg, r * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agent.PeerInfoRequestMessage.prototype.serializeBinary = function() { +proto.agentInterface.DecryptFileMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agent.PeerInfoRequestMessage.serializeBinaryToWriter(this, writer); + proto.agentInterface.DecryptFileMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7478,72 +2621,90 @@ proto.agent.PeerInfoRequestMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agent.PeerInfoRequestMessage} message + * @param {!proto.agentInterface.DecryptFileMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.PeerInfoRequestMessage.serializeBinaryToWriter = function(message, writer) { +proto.agentInterface.DecryptFileMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCurrent(); - if (f) { - writer.writeBool( + f = message.getFilePath(); + if (f.length > 0) { + writer.writeString( 1, f ); } - f = message.getPublicKey(); + f = message.getPrivateKeyPath(); if (f.length > 0) { writer.writeString( 2, f ); } + f = message.getPassphrase(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } }; /** - * optional bool current = 1; - * @return {boolean} + * optional string file_path = 1; + * @return {string} */ -proto.agent.PeerInfoRequestMessage.prototype.getCurrent = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.agentInterface.DecryptFileMessage.prototype.getFilePath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {boolean} value - * @return {!proto.agent.PeerInfoRequestMessage} returns this + * @param {string} value + * @return {!proto.agentInterface.DecryptFileMessage} returns this */ -proto.agent.PeerInfoRequestMessage.prototype.setCurrent = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); +proto.agentInterface.DecryptFileMessage.prototype.setFilePath = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string public_key = 2; + * optional string private_key_path = 2; * @return {string} */ -proto.agent.PeerInfoRequestMessage.prototype.getPublicKey = function() { +proto.agentInterface.DecryptFileMessage.prototype.getPrivateKeyPath = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.agent.PeerInfoRequestMessage} returns this + * @return {!proto.agentInterface.DecryptFileMessage} returns this */ -proto.agent.PeerInfoRequestMessage.prototype.setPublicKey = function(value) { +proto.agentInterface.DecryptFileMessage.prototype.setPrivateKeyPath = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; +/** + * optional string passphrase = 3; + * @return {string} + */ +proto.agentInterface.DecryptFileMessage.prototype.getPassphrase = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @param {string} value + * @return {!proto.agentInterface.DecryptFileMessage} returns this */ -proto.agent.PeerInfoResponseMessage.repeatedFields_ = [2]; +proto.agentInterface.DecryptFileMessage.prototype.setPassphrase = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + @@ -7560,8 +2721,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agent.PeerInfoResponseMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.PeerInfoResponseMessage.toObject(opt_includeInstance, this); +proto.agentInterface.KeyPairMessage.prototype.toObject = function(opt_includeInstance) { + return proto.agentInterface.KeyPairMessage.toObject(opt_includeInstance, this); }; @@ -7570,16 +2731,14 @@ proto.agent.PeerInfoResponseMessage.prototype.toObject = function(opt_includeIns * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agent.PeerInfoResponseMessage} msg The msg instance to transform. + * @param {!proto.agentInterface.KeyPairMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.PeerInfoResponseMessage.toObject = function(includeInstance, msg) { +proto.agentInterface.KeyPairMessage.toObject = function(includeInstance, msg) { var f, obj = { publicKey: jspb.Message.getFieldWithDefault(msg, 1, ""), - addressesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, - connectedAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), - relayAddress: jspb.Message.getFieldWithDefault(msg, 4, "") + privateKey: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -7593,23 +2752,23 @@ proto.agent.PeerInfoResponseMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.PeerInfoResponseMessage} + * @return {!proto.agentInterface.KeyPairMessage} */ -proto.agent.PeerInfoResponseMessage.deserializeBinary = function(bytes) { +proto.agentInterface.KeyPairMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.PeerInfoResponseMessage; - return proto.agent.PeerInfoResponseMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.agentInterface.KeyPairMessage; + return proto.agentInterface.KeyPairMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agent.PeerInfoResponseMessage} msg The message object to deserialize into. + * @param {!proto.agentInterface.KeyPairMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.PeerInfoResponseMessage} + * @return {!proto.agentInterface.KeyPairMessage} */ -proto.agent.PeerInfoResponseMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.agentInterface.KeyPairMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7622,15 +2781,7 @@ proto.agent.PeerInfoResponseMessage.deserializeBinaryFromReader = function(msg, break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.addAddresses(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setConnectedAddress(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setRelayAddress(value); + msg.setPrivateKey(value); break; default: reader.skipField(); @@ -7645,9 +2796,9 @@ proto.agent.PeerInfoResponseMessage.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agent.PeerInfoResponseMessage.prototype.serializeBinary = function() { +proto.agentInterface.KeyPairMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agent.PeerInfoResponseMessage.serializeBinaryToWriter(this, writer); + proto.agentInterface.KeyPairMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7655,11 +2806,11 @@ proto.agent.PeerInfoResponseMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agent.PeerInfoResponseMessage} message + * @param {!proto.agentInterface.KeyPairMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.PeerInfoResponseMessage.serializeBinaryToWriter = function(message, writer) { +proto.agentInterface.KeyPairMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getPublicKey(); if (f.length > 0) { @@ -7668,24 +2819,10 @@ proto.agent.PeerInfoResponseMessage.serializeBinaryToWriter = function(message, f ); } - f = message.getAddressesList(); - if (f.length > 0) { - writer.writeRepeatedString( - 2, - f - ); - } - f = message.getConnectedAddress(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getRelayAddress(); + f = message.getPrivateKey(); if (f.length > 0) { writer.writeString( - 4, + 2, f ); } @@ -7696,101 +2833,39 @@ proto.agent.PeerInfoResponseMessage.serializeBinaryToWriter = function(message, * optional string public_key = 1; * @return {string} */ -proto.agent.PeerInfoResponseMessage.prototype.getPublicKey = function() { +proto.agentInterface.KeyPairMessage.prototype.getPublicKey = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.agent.PeerInfoResponseMessage} returns this + * @return {!proto.agentInterface.KeyPairMessage} returns this */ -proto.agent.PeerInfoResponseMessage.prototype.setPublicKey = function(value) { +proto.agentInterface.KeyPairMessage.prototype.setPublicKey = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * repeated string addresses = 2; - * @return {!Array} - */ -proto.agent.PeerInfoResponseMessage.prototype.getAddressesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.agent.PeerInfoResponseMessage} returns this - */ -proto.agent.PeerInfoResponseMessage.prototype.setAddressesList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.agent.PeerInfoResponseMessage} returns this - */ -proto.agent.PeerInfoResponseMessage.prototype.addAddresses = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.agent.PeerInfoResponseMessage} returns this - */ -proto.agent.PeerInfoResponseMessage.prototype.clearAddressesList = function() { - return this.setAddressesList([]); -}; - - -/** - * optional string connected_address = 3; - * @return {string} - */ -proto.agent.PeerInfoResponseMessage.prototype.getConnectedAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.PeerInfoResponseMessage} returns this - */ -proto.agent.PeerInfoResponseMessage.prototype.setConnectedAddress = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string relay_address = 4; + * optional string private_key = 2; * @return {string} */ -proto.agent.PeerInfoResponseMessage.prototype.getRelayAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.agentInterface.KeyPairMessage.prototype.getPrivateKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.agent.PeerInfoResponseMessage} returns this + * @return {!proto.agentInterface.KeyPairMessage} returns this */ -proto.agent.PeerInfoResponseMessage.prototype.setRelayAddress = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); +proto.agentInterface.KeyPairMessage.prototype.setPrivateKey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.agent.AddPeerRequestMessage.repeatedFields_ = [2]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -7806,8 +2881,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agent.AddPeerRequestMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.AddPeerRequestMessage.toObject(opt_includeInstance, this); +proto.agentInterface.VaultPathMessage.prototype.toObject = function(opt_includeInstance) { + return proto.agentInterface.VaultPathMessage.toObject(opt_includeInstance, this); }; @@ -7816,16 +2891,14 @@ proto.agent.AddPeerRequestMessage.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agent.AddPeerRequestMessage} msg The msg instance to transform. + * @param {!proto.agentInterface.VaultPathMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.AddPeerRequestMessage.toObject = function(includeInstance, msg) { +proto.agentInterface.VaultPathMessage.toObject = function(includeInstance, msg) { var f, obj = { - publicKey: jspb.Message.getFieldWithDefault(msg, 1, ""), - addressesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, - connectedAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), - relayAddress: jspb.Message.getFieldWithDefault(msg, 4, "") + vaultName: jspb.Message.getFieldWithDefault(msg, 1, ""), + publicKey: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -7839,23 +2912,23 @@ proto.agent.AddPeerRequestMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.AddPeerRequestMessage} + * @return {!proto.agentInterface.VaultPathMessage} */ -proto.agent.AddPeerRequestMessage.deserializeBinary = function(bytes) { +proto.agentInterface.VaultPathMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.AddPeerRequestMessage; - return proto.agent.AddPeerRequestMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.agentInterface.VaultPathMessage; + return proto.agentInterface.VaultPathMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agent.AddPeerRequestMessage} msg The message object to deserialize into. + * @param {!proto.agentInterface.VaultPathMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.AddPeerRequestMessage} + * @return {!proto.agentInterface.VaultPathMessage} */ -proto.agent.AddPeerRequestMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.agentInterface.VaultPathMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7864,19 +2937,11 @@ proto.agent.AddPeerRequestMessage.deserializeBinaryFromReader = function(msg, re switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPublicKey(value); + msg.setVaultName(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.addAddresses(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setConnectedAddress(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setRelayAddress(value); + msg.setPublicKey(value); break; default: reader.skipField(); @@ -7891,9 +2956,9 @@ proto.agent.AddPeerRequestMessage.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agent.AddPeerRequestMessage.prototype.serializeBinary = function() { +proto.agentInterface.VaultPathMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agent.AddPeerRequestMessage.serializeBinaryToWriter(this, writer); + proto.agentInterface.VaultPathMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7901,37 +2966,23 @@ proto.agent.AddPeerRequestMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agent.AddPeerRequestMessage} message + * @param {!proto.agentInterface.VaultPathMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.AddPeerRequestMessage.serializeBinaryToWriter = function(message, writer) { +proto.agentInterface.VaultPathMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPublicKey(); + f = message.getVaultName(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getAddressesList(); - if (f.length > 0) { - writer.writeRepeatedString( - 2, - f - ); - } - f = message.getConnectedAddress(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getRelayAddress(); + f = message.getPublicKey(); if (f.length > 0) { writer.writeString( - 4, + 2, f ); } @@ -7939,93 +2990,38 @@ proto.agent.AddPeerRequestMessage.serializeBinaryToWriter = function(message, wr /** - * optional string public_key = 1; + * optional string vault_name = 1; * @return {string} */ -proto.agent.AddPeerRequestMessage.prototype.getPublicKey = function() { +proto.agentInterface.VaultPathMessage.prototype.getVaultName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.agent.AddPeerRequestMessage} returns this + * @return {!proto.agentInterface.VaultPathMessage} returns this */ -proto.agent.AddPeerRequestMessage.prototype.setPublicKey = function(value) { +proto.agentInterface.VaultPathMessage.prototype.setVaultName = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * repeated string addresses = 2; - * @return {!Array} - */ -proto.agent.AddPeerRequestMessage.prototype.getAddressesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.agent.AddPeerRequestMessage} returns this - */ -proto.agent.AddPeerRequestMessage.prototype.setAddressesList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.agent.AddPeerRequestMessage} returns this - */ -proto.agent.AddPeerRequestMessage.prototype.addAddresses = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.agent.AddPeerRequestMessage} returns this - */ -proto.agent.AddPeerRequestMessage.prototype.clearAddressesList = function() { - return this.setAddressesList([]); -}; - - -/** - * optional string connected_address = 3; - * @return {string} - */ -proto.agent.AddPeerRequestMessage.prototype.getConnectedAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.agent.AddPeerRequestMessage} returns this - */ -proto.agent.AddPeerRequestMessage.prototype.setConnectedAddress = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string relay_address = 4; + * optional string public_key = 2; * @return {string} */ -proto.agent.AddPeerRequestMessage.prototype.getRelayAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.agentInterface.VaultPathMessage.prototype.getPublicKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.agent.AddPeerRequestMessage} returns this + * @return {!proto.agentInterface.VaultPathMessage} returns this */ -proto.agent.AddPeerRequestMessage.prototype.setRelayAddress = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); +proto.agentInterface.VaultPathMessage.prototype.setPublicKey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -8045,8 +3041,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.agent.AddPeerResponseMessage.prototype.toObject = function(opt_includeInstance) { - return proto.agent.AddPeerResponseMessage.toObject(opt_includeInstance, this); +proto.agentInterface.ContactPeerMessage.prototype.toObject = function(opt_includeInstance) { + return proto.agentInterface.ContactPeerMessage.toObject(opt_includeInstance, this); }; @@ -8055,13 +3051,14 @@ proto.agent.AddPeerResponseMessage.prototype.toObject = function(opt_includeInst * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.agent.AddPeerResponseMessage} msg The msg instance to transform. + * @param {!proto.agentInterface.ContactPeerMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.AddPeerResponseMessage.toObject = function(includeInstance, msg) { +proto.agentInterface.ContactPeerMessage.toObject = function(includeInstance, msg) { var f, obj = { - successful: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + publicKeyOrHandle: jspb.Message.getFieldWithDefault(msg, 1, ""), + timeout: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -8075,23 +3072,23 @@ proto.agent.AddPeerResponseMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.agent.AddPeerResponseMessage} + * @return {!proto.agentInterface.ContactPeerMessage} */ -proto.agent.AddPeerResponseMessage.deserializeBinary = function(bytes) { +proto.agentInterface.ContactPeerMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.agent.AddPeerResponseMessage; - return proto.agent.AddPeerResponseMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.agentInterface.ContactPeerMessage; + return proto.agentInterface.ContactPeerMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.agent.AddPeerResponseMessage} msg The message object to deserialize into. + * @param {!proto.agentInterface.ContactPeerMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.agent.AddPeerResponseMessage} + * @return {!proto.agentInterface.ContactPeerMessage} */ -proto.agent.AddPeerResponseMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.agentInterface.ContactPeerMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8099,8 +3096,12 @@ proto.agent.AddPeerResponseMessage.deserializeBinaryFromReader = function(msg, r var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuccessful(value); + var value = /** @type {string} */ (reader.readString()); + msg.setPublicKeyOrHandle(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setTimeout(value); break; default: reader.skipField(); @@ -8115,9 +3116,9 @@ proto.agent.AddPeerResponseMessage.deserializeBinaryFromReader = function(msg, r * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.agent.AddPeerResponseMessage.prototype.serializeBinary = function() { +proto.agentInterface.ContactPeerMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.agent.AddPeerResponseMessage.serializeBinaryToWriter(this, writer); + proto.agentInterface.ContactPeerMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8125,69 +3126,72 @@ proto.agent.AddPeerResponseMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.agent.AddPeerResponseMessage} message + * @param {!proto.agentInterface.ContactPeerMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.agent.AddPeerResponseMessage.serializeBinaryToWriter = function(message, writer) { +proto.agentInterface.ContactPeerMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSuccessful(); - if (f) { - writer.writeBool( + f = message.getPublicKeyOrHandle(); + if (f.length > 0) { + writer.writeString( 1, f ); } + f = message.getTimeout(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } }; /** - * optional bool successful = 1; - * @return {boolean} + * optional string public_key_or_handle = 1; + * @return {string} */ -proto.agent.AddPeerResponseMessage.prototype.getSuccessful = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.agentInterface.ContactPeerMessage.prototype.getPublicKeyOrHandle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {boolean} value - * @return {!proto.agent.AddPeerResponseMessage} returns this + * @param {string} value + * @return {!proto.agentInterface.ContactPeerMessage} returns this */ -proto.agent.AddPeerResponseMessage.prototype.setSuccessful = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); +proto.agentInterface.ContactPeerMessage.prototype.setPublicKeyOrHandle = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int32 timeout = 2; + * @return {number} + */ +proto.agentInterface.ContactPeerMessage.prototype.getTimeout = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.agentInterface.ContactPeerMessage} returns this + */ +proto.agentInterface.ContactPeerMessage.prototype.setTimeout = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** * @enum {number} */ -proto.agent.AgentMessageType = { - ERROR: 0, - STOP_AGENT: 1, - STATUS: 2, - REGISTER_NODE: 3, - NEW_NODE: 4, - LIST_NODES: 5, - DERIVE_KEY: 6, - SIGN_FILE: 7, - VERIFY_FILE: 8, - LIST_VAULTS: 9, - NEW_VAULT: 10, - DESTROY_VAULT: 11, - LIST_SECRETS: 12, - CREATE_SECRET: 13, - DESTROY_SECRET: 14, - GET_SECRET: 15, - LIST_KEYS: 16, - GET_KEY: 17, - DELETE_KEY: 18, - ENCRYPT_FILE: 19, - DECRYPT_FILE: 20, - GET_PRIMARY_KEYPAIR: 21, - UPDATE_SECRET: 22, - GET_PEER_INFO: 23, - ADD_PEER: 24 -}; - -goog.object.extend(exports, proto.agent); +proto.agentInterface.AgentStatusType = { + ONLINE: 0, + OFFLINE: 1, + ERRORED: 2 +}; + +goog.object.extend(exports, proto.agentInterface); diff --git a/proto/compiled/Git_grpc_pb.d.ts b/proto/compiled/Git_grpc_pb.d.ts deleted file mode 100644 index dde7bd9198..0000000000 --- a/proto/compiled/Git_grpc_pb.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -// package: git -// file: Git.proto - -/* tslint:disable */ -/* eslint-disable */ - -import * as grpc from "@grpc/grpc-js"; -import * as Git_pb from "./Git_pb"; - -interface IGitServerService extends grpc.ServiceDefinition { - requestInfo: IGitServerService_IRequestInfo; - requestPack: IGitServerService_IRequestPack; -} - -interface IGitServerService_IRequestInfo extends grpc.MethodDefinition { - path: string; // "/git.GitServer/RequestInfo" - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} -interface IGitServerService_IRequestPack extends grpc.MethodDefinition { - path: string; // "/git.GitServer/RequestPack" - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} - -export const GitServerService: IGitServerService; - -export interface IGitServerServer { - requestInfo: grpc.handleUnaryCall; - requestPack: grpc.handleUnaryCall; -} - -export interface IGitServerClient { - requestInfo(request: Git_pb.InfoRequest, callback: (error: grpc.ServiceError | null, response: Git_pb.InfoReply) => void): grpc.ClientUnaryCall; - requestInfo(request: Git_pb.InfoRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Git_pb.InfoReply) => void): grpc.ClientUnaryCall; - requestInfo(request: Git_pb.InfoRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Git_pb.InfoReply) => void): grpc.ClientUnaryCall; - requestPack(request: Git_pb.PackRequest, callback: (error: grpc.ServiceError | null, response: Git_pb.PackReply) => void): grpc.ClientUnaryCall; - requestPack(request: Git_pb.PackRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Git_pb.PackReply) => void): grpc.ClientUnaryCall; - requestPack(request: Git_pb.PackRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Git_pb.PackReply) => void): grpc.ClientUnaryCall; -} - -export class GitServerClient extends grpc.Client implements IGitServerClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); - public requestInfo(request: Git_pb.InfoRequest, callback: (error: grpc.ServiceError | null, response: Git_pb.InfoReply) => void): grpc.ClientUnaryCall; - public requestInfo(request: Git_pb.InfoRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Git_pb.InfoReply) => void): grpc.ClientUnaryCall; - public requestInfo(request: Git_pb.InfoRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Git_pb.InfoReply) => void): grpc.ClientUnaryCall; - public requestPack(request: Git_pb.PackRequest, callback: (error: grpc.ServiceError | null, response: Git_pb.PackReply) => void): grpc.ClientUnaryCall; - public requestPack(request: Git_pb.PackRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Git_pb.PackReply) => void): grpc.ClientUnaryCall; - public requestPack(request: Git_pb.PackRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Git_pb.PackReply) => void): grpc.ClientUnaryCall; -} diff --git a/proto/compiled/Git_grpc_pb.js b/proto/compiled/Git_grpc_pb.js index 31ba9d6d6d..97b3a2461d 100644 --- a/proto/compiled/Git_grpc_pb.js +++ b/proto/compiled/Git_grpc_pb.js @@ -1,79 +1 @@ -// GENERATED CODE -- DO NOT EDIT! - -'use strict'; -var grpc = require('@grpc/grpc-js'); -var Git_pb = require('./Git_pb.js'); - -function serialize_git_InfoReply(arg) { - if (!(arg instanceof Git_pb.InfoReply)) { - throw new Error('Expected argument of type git.InfoReply'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_git_InfoReply(buffer_arg) { - return Git_pb.InfoReply.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_git_InfoRequest(arg) { - if (!(arg instanceof Git_pb.InfoRequest)) { - throw new Error('Expected argument of type git.InfoRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_git_InfoRequest(buffer_arg) { - return Git_pb.InfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_git_PackReply(arg) { - if (!(arg instanceof Git_pb.PackReply)) { - throw new Error('Expected argument of type git.PackReply'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_git_PackReply(buffer_arg) { - return Git_pb.PackReply.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_git_PackRequest(arg) { - if (!(arg instanceof Git_pb.PackRequest)) { - throw new Error('Expected argument of type git.PackRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_git_PackRequest(buffer_arg) { - return Git_pb.PackRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -var GitServerService = exports.GitServerService = { - // Request info about a vault as a git repo -requestInfo: { - path: '/git.GitServer/RequestInfo', - requestStream: false, - responseStream: false, - requestType: Git_pb.InfoRequest, - responseType: Git_pb.InfoReply, - requestSerialize: serialize_git_InfoRequest, - requestDeserialize: deserialize_git_InfoRequest, - responseSerialize: serialize_git_InfoReply, - responseDeserialize: deserialize_git_InfoReply, - }, - // Request a particular pack from remote -requestPack: { - path: '/git.GitServer/RequestPack', - requestStream: false, - responseStream: false, - requestType: Git_pb.PackRequest, - responseType: Git_pb.PackReply, - requestSerialize: serialize_git_PackRequest, - requestDeserialize: deserialize_git_PackRequest, - responseSerialize: serialize_git_PackReply, - responseDeserialize: deserialize_git_PackReply, - }, -}; - -exports.GitServerClient = grpc.makeGenericClientConstructor(GitServerService); +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/proto/compiled/Git_pb.d.ts b/proto/compiled/Git_pb.d.ts index b8fa8c565d..353fbb3cb9 100644 --- a/proto/compiled/Git_pb.d.ts +++ b/proto/compiled/Git_pb.d.ts @@ -1,4 +1,4 @@ -// package: git +// package: gitInterface // file: Git.proto /* tslint:disable */ @@ -10,13 +10,10 @@ export class GitMessage extends jspb.Message { getType(): GitMessageType; setType(value: GitMessageType): GitMessage; - getIsresponse(): boolean; - setIsresponse(value: boolean): GitMessage; - - getSubMessage(): Uint8Array | string; - getSubMessage_asU8(): Uint8Array; - getSubMessage_asB64(): string; - setSubMessage(value: Uint8Array | string): GitMessage; + getSubmessage(): Uint8Array | string; + getSubmessage_asU8(): Uint8Array; + getSubmessage_asB64(): string; + setSubmessage(value: Uint8Array | string): GitMessage; serializeBinary(): Uint8Array; @@ -32,8 +29,7 @@ export class GitMessage extends jspb.Message { export namespace GitMessage { export type AsObject = { type: GitMessageType, - isresponse: boolean, - subMessage: Uint8Array | string, + submessage: Uint8Array | string, } } @@ -139,7 +135,31 @@ export namespace PackReply { } } +export class VaultNamesReply extends jspb.Message { + clearVaultNameListList(): void; + getVaultNameListList(): Array; + setVaultNameListList(value: Array): VaultNamesReply; + addVaultNameList(value: string, index?: number): string; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): VaultNamesReply.AsObject; + static toObject(includeInstance: boolean, msg: VaultNamesReply): VaultNamesReply.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: VaultNamesReply, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): VaultNamesReply; + static deserializeBinaryFromReader(message: VaultNamesReply, reader: jspb.BinaryReader): VaultNamesReply; +} + +export namespace VaultNamesReply { + export type AsObject = { + vaultNameListList: Array, + } +} + export enum GitMessageType { INFO = 0, PACK = 1, + VAULT_NAMES = 2, } diff --git a/proto/compiled/Git_pb.js b/proto/compiled/Git_pb.js index d5f5b5f7ab..c6c68ceed1 100644 --- a/proto/compiled/Git_pb.js +++ b/proto/compiled/Git_pb.js @@ -12,12 +12,13 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -goog.exportSymbol('proto.git.GitMessage', null, global); -goog.exportSymbol('proto.git.GitMessageType', null, global); -goog.exportSymbol('proto.git.InfoReply', null, global); -goog.exportSymbol('proto.git.InfoRequest', null, global); -goog.exportSymbol('proto.git.PackReply', null, global); -goog.exportSymbol('proto.git.PackRequest', null, global); +goog.exportSymbol('proto.gitInterface.GitMessage', null, global); +goog.exportSymbol('proto.gitInterface.GitMessageType', null, global); +goog.exportSymbol('proto.gitInterface.InfoReply', null, global); +goog.exportSymbol('proto.gitInterface.InfoRequest', null, global); +goog.exportSymbol('proto.gitInterface.PackReply', null, global); +goog.exportSymbol('proto.gitInterface.PackRequest', null, global); +goog.exportSymbol('proto.gitInterface.VaultNamesReply', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -28,16 +29,16 @@ goog.exportSymbol('proto.git.PackRequest', null, global); * @extends {jspb.Message} * @constructor */ -proto.git.GitMessage = function(opt_data) { +proto.gitInterface.GitMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.git.GitMessage, jspb.Message); +goog.inherits(proto.gitInterface.GitMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.git.GitMessage.displayName = 'proto.git.GitMessage'; + proto.gitInterface.GitMessage.displayName = 'proto.gitInterface.GitMessage'; } /** * Generated by JsPbCodeGenerator. @@ -49,16 +50,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.git.InfoRequest = function(opt_data) { +proto.gitInterface.InfoRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.git.InfoRequest, jspb.Message); +goog.inherits(proto.gitInterface.InfoRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.git.InfoRequest.displayName = 'proto.git.InfoRequest'; + proto.gitInterface.InfoRequest.displayName = 'proto.gitInterface.InfoRequest'; } /** * Generated by JsPbCodeGenerator. @@ -70,16 +71,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.git.InfoReply = function(opt_data) { +proto.gitInterface.InfoReply = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.git.InfoReply, jspb.Message); +goog.inherits(proto.gitInterface.InfoReply, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.git.InfoReply.displayName = 'proto.git.InfoReply'; + proto.gitInterface.InfoReply.displayName = 'proto.gitInterface.InfoReply'; } /** * Generated by JsPbCodeGenerator. @@ -91,16 +92,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.git.PackRequest = function(opt_data) { +proto.gitInterface.PackRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.git.PackRequest, jspb.Message); +goog.inherits(proto.gitInterface.PackRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.git.PackRequest.displayName = 'proto.git.PackRequest'; + proto.gitInterface.PackRequest.displayName = 'proto.gitInterface.PackRequest'; } /** * Generated by JsPbCodeGenerator. @@ -112,16 +113,37 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.git.PackReply = function(opt_data) { +proto.gitInterface.PackReply = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.git.PackReply, jspb.Message); +goog.inherits(proto.gitInterface.PackReply, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.git.PackReply.displayName = 'proto.git.PackReply'; + proto.gitInterface.PackReply.displayName = 'proto.gitInterface.PackReply'; +} +/** + * 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.gitInterface.VaultNamesReply = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.gitInterface.VaultNamesReply.repeatedFields_, null); +}; +goog.inherits(proto.gitInterface.VaultNamesReply, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.gitInterface.VaultNamesReply.displayName = 'proto.gitInterface.VaultNamesReply'; } @@ -139,8 +161,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.git.GitMessage.prototype.toObject = function(opt_includeInstance) { - return proto.git.GitMessage.toObject(opt_includeInstance, this); +proto.gitInterface.GitMessage.prototype.toObject = function(opt_includeInstance) { + return proto.gitInterface.GitMessage.toObject(opt_includeInstance, this); }; @@ -149,15 +171,14 @@ proto.git.GitMessage.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.git.GitMessage} msg The msg instance to transform. + * @param {!proto.gitInterface.GitMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.git.GitMessage.toObject = function(includeInstance, msg) { +proto.gitInterface.GitMessage.toObject = function(includeInstance, msg) { var f, obj = { type: jspb.Message.getFieldWithDefault(msg, 1, 0), - isresponse: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - subMessage: msg.getSubMessage_asB64() + submessage: msg.getSubmessage_asB64() }; if (includeInstance) { @@ -171,23 +192,23 @@ proto.git.GitMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.git.GitMessage} + * @return {!proto.gitInterface.GitMessage} */ -proto.git.GitMessage.deserializeBinary = function(bytes) { +proto.gitInterface.GitMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.git.GitMessage; - return proto.git.GitMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.gitInterface.GitMessage; + return proto.gitInterface.GitMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.git.GitMessage} msg The message object to deserialize into. + * @param {!proto.gitInterface.GitMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.git.GitMessage} + * @return {!proto.gitInterface.GitMessage} */ -proto.git.GitMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.gitInterface.GitMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -195,16 +216,12 @@ proto.git.GitMessage.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.git.GitMessageType} */ (reader.readEnum()); + var value = /** @type {!proto.gitInterface.GitMessageType} */ (reader.readEnum()); msg.setType(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsresponse(value); - break; - case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSubMessage(value); + msg.setSubmessage(value); break; default: reader.skipField(); @@ -219,9 +236,9 @@ proto.git.GitMessage.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.git.GitMessage.prototype.serializeBinary = function() { +proto.gitInterface.GitMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.git.GitMessage.serializeBinaryToWriter(this, writer); + proto.gitInterface.GitMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -229,11 +246,11 @@ proto.git.GitMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.git.GitMessage} message + * @param {!proto.gitInterface.GitMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.git.GitMessage.serializeBinaryToWriter = function(message, writer) { +proto.gitInterface.GitMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getType(); if (f !== 0.0) { @@ -242,17 +259,10 @@ proto.git.GitMessage.serializeBinaryToWriter = function(message, writer) { f ); } - f = message.getIsresponse(); - if (f) { - writer.writeBool( - 2, - f - ); - } - f = message.getSubMessage_asU8(); + f = message.getSubmessage_asU8(); if (f.length > 0) { writer.writeBytes( - 3, + 2, f ); } @@ -261,79 +271,61 @@ proto.git.GitMessage.serializeBinaryToWriter = function(message, writer) { /** * optional GitMessageType type = 1; - * @return {!proto.git.GitMessageType} + * @return {!proto.gitInterface.GitMessageType} */ -proto.git.GitMessage.prototype.getType = function() { - return /** @type {!proto.git.GitMessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.gitInterface.GitMessage.prototype.getType = function() { + return /** @type {!proto.gitInterface.GitMessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {!proto.git.GitMessageType} value - * @return {!proto.git.GitMessage} returns this + * @param {!proto.gitInterface.GitMessageType} value + * @return {!proto.gitInterface.GitMessage} returns this */ -proto.git.GitMessage.prototype.setType = function(value) { +proto.gitInterface.GitMessage.prototype.setType = function(value) { return jspb.Message.setProto3EnumField(this, 1, value); }; /** - * optional bool isResponse = 2; - * @return {boolean} - */ -proto.git.GitMessage.prototype.getIsresponse = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.git.GitMessage} returns this - */ -proto.git.GitMessage.prototype.setIsresponse = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional bytes sub_message = 3; + * optional bytes subMessage = 2; * @return {!(string|Uint8Array)} */ -proto.git.GitMessage.prototype.getSubMessage = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.gitInterface.GitMessage.prototype.getSubmessage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes sub_message = 3; - * This is a type-conversion wrapper around `getSubMessage()` + * optional bytes subMessage = 2; + * This is a type-conversion wrapper around `getSubmessage()` * @return {string} */ -proto.git.GitMessage.prototype.getSubMessage_asB64 = function() { +proto.gitInterface.GitMessage.prototype.getSubmessage_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSubMessage())); + this.getSubmessage())); }; /** - * optional bytes sub_message = 3; + * optional bytes subMessage = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSubMessage()` + * This is a type-conversion wrapper around `getSubmessage()` * @return {!Uint8Array} */ -proto.git.GitMessage.prototype.getSubMessage_asU8 = function() { +proto.gitInterface.GitMessage.prototype.getSubmessage_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSubMessage())); + this.getSubmessage())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.git.GitMessage} returns this + * @return {!proto.gitInterface.GitMessage} returns this */ -proto.git.GitMessage.prototype.setSubMessage = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); +proto.gitInterface.GitMessage.prototype.setSubmessage = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -353,8 +345,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.git.InfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.git.InfoRequest.toObject(opt_includeInstance, this); +proto.gitInterface.InfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.gitInterface.InfoRequest.toObject(opt_includeInstance, this); }; @@ -363,11 +355,11 @@ proto.git.InfoRequest.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.git.InfoRequest} msg The msg instance to transform. + * @param {!proto.gitInterface.InfoRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.git.InfoRequest.toObject = function(includeInstance, msg) { +proto.gitInterface.InfoRequest.toObject = function(includeInstance, msg) { var f, obj = { vaultname: jspb.Message.getFieldWithDefault(msg, 1, "") }; @@ -383,23 +375,23 @@ proto.git.InfoRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.git.InfoRequest} + * @return {!proto.gitInterface.InfoRequest} */ -proto.git.InfoRequest.deserializeBinary = function(bytes) { +proto.gitInterface.InfoRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.git.InfoRequest; - return proto.git.InfoRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.gitInterface.InfoRequest; + return proto.gitInterface.InfoRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.git.InfoRequest} msg The message object to deserialize into. + * @param {!proto.gitInterface.InfoRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.git.InfoRequest} + * @return {!proto.gitInterface.InfoRequest} */ -proto.git.InfoRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.gitInterface.InfoRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -423,9 +415,9 @@ proto.git.InfoRequest.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.git.InfoRequest.prototype.serializeBinary = function() { +proto.gitInterface.InfoRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.git.InfoRequest.serializeBinaryToWriter(this, writer); + proto.gitInterface.InfoRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -433,11 +425,11 @@ proto.git.InfoRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.git.InfoRequest} message + * @param {!proto.gitInterface.InfoRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.git.InfoRequest.serializeBinaryToWriter = function(message, writer) { +proto.gitInterface.InfoRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getVaultname(); if (f.length > 0) { @@ -453,16 +445,16 @@ proto.git.InfoRequest.serializeBinaryToWriter = function(message, writer) { * optional string vaultName = 1; * @return {string} */ -proto.git.InfoRequest.prototype.getVaultname = function() { +proto.gitInterface.InfoRequest.prototype.getVaultname = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.git.InfoRequest} returns this + * @return {!proto.gitInterface.InfoRequest} returns this */ -proto.git.InfoRequest.prototype.setVaultname = function(value) { +proto.gitInterface.InfoRequest.prototype.setVaultname = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -483,8 +475,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.git.InfoReply.prototype.toObject = function(opt_includeInstance) { - return proto.git.InfoReply.toObject(opt_includeInstance, this); +proto.gitInterface.InfoReply.prototype.toObject = function(opt_includeInstance) { + return proto.gitInterface.InfoReply.toObject(opt_includeInstance, this); }; @@ -493,11 +485,11 @@ proto.git.InfoReply.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.git.InfoReply} msg The msg instance to transform. + * @param {!proto.gitInterface.InfoReply} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.git.InfoReply.toObject = function(includeInstance, msg) { +proto.gitInterface.InfoReply.toObject = function(includeInstance, msg) { var f, obj = { vaultname: jspb.Message.getFieldWithDefault(msg, 1, ""), body: msg.getBody_asB64() @@ -514,23 +506,23 @@ proto.git.InfoReply.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.git.InfoReply} + * @return {!proto.gitInterface.InfoReply} */ -proto.git.InfoReply.deserializeBinary = function(bytes) { +proto.gitInterface.InfoReply.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.git.InfoReply; - return proto.git.InfoReply.deserializeBinaryFromReader(msg, reader); + var msg = new proto.gitInterface.InfoReply; + return proto.gitInterface.InfoReply.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.git.InfoReply} msg The message object to deserialize into. + * @param {!proto.gitInterface.InfoReply} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.git.InfoReply} + * @return {!proto.gitInterface.InfoReply} */ -proto.git.InfoReply.deserializeBinaryFromReader = function(msg, reader) { +proto.gitInterface.InfoReply.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -558,9 +550,9 @@ proto.git.InfoReply.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.git.InfoReply.prototype.serializeBinary = function() { +proto.gitInterface.InfoReply.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.git.InfoReply.serializeBinaryToWriter(this, writer); + proto.gitInterface.InfoReply.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -568,11 +560,11 @@ proto.git.InfoReply.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.git.InfoReply} message + * @param {!proto.gitInterface.InfoReply} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.git.InfoReply.serializeBinaryToWriter = function(message, writer) { +proto.gitInterface.InfoReply.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getVaultname(); if (f.length > 0) { @@ -595,16 +587,16 @@ proto.git.InfoReply.serializeBinaryToWriter = function(message, writer) { * optional string vaultName = 1; * @return {string} */ -proto.git.InfoReply.prototype.getVaultname = function() { +proto.gitInterface.InfoReply.prototype.getVaultname = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.git.InfoReply} returns this + * @return {!proto.gitInterface.InfoReply} returns this */ -proto.git.InfoReply.prototype.setVaultname = function(value) { +proto.gitInterface.InfoReply.prototype.setVaultname = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -613,7 +605,7 @@ proto.git.InfoReply.prototype.setVaultname = function(value) { * optional bytes body = 2; * @return {!(string|Uint8Array)} */ -proto.git.InfoReply.prototype.getBody = function() { +proto.gitInterface.InfoReply.prototype.getBody = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; @@ -623,7 +615,7 @@ proto.git.InfoReply.prototype.getBody = function() { * This is a type-conversion wrapper around `getBody()` * @return {string} */ -proto.git.InfoReply.prototype.getBody_asB64 = function() { +proto.gitInterface.InfoReply.prototype.getBody_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getBody())); }; @@ -636,7 +628,7 @@ proto.git.InfoReply.prototype.getBody_asB64 = function() { * This is a type-conversion wrapper around `getBody()` * @return {!Uint8Array} */ -proto.git.InfoReply.prototype.getBody_asU8 = function() { +proto.gitInterface.InfoReply.prototype.getBody_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getBody())); }; @@ -644,9 +636,9 @@ proto.git.InfoReply.prototype.getBody_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.git.InfoReply} returns this + * @return {!proto.gitInterface.InfoReply} returns this */ -proto.git.InfoReply.prototype.setBody = function(value) { +proto.gitInterface.InfoReply.prototype.setBody = function(value) { return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -667,8 +659,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.git.PackRequest.prototype.toObject = function(opt_includeInstance) { - return proto.git.PackRequest.toObject(opt_includeInstance, this); +proto.gitInterface.PackRequest.prototype.toObject = function(opt_includeInstance) { + return proto.gitInterface.PackRequest.toObject(opt_includeInstance, this); }; @@ -677,11 +669,11 @@ proto.git.PackRequest.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.git.PackRequest} msg The msg instance to transform. + * @param {!proto.gitInterface.PackRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.git.PackRequest.toObject = function(includeInstance, msg) { +proto.gitInterface.PackRequest.toObject = function(includeInstance, msg) { var f, obj = { vaultname: jspb.Message.getFieldWithDefault(msg, 1, ""), body: msg.getBody_asB64() @@ -698,23 +690,23 @@ proto.git.PackRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.git.PackRequest} + * @return {!proto.gitInterface.PackRequest} */ -proto.git.PackRequest.deserializeBinary = function(bytes) { +proto.gitInterface.PackRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.git.PackRequest; - return proto.git.PackRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.gitInterface.PackRequest; + return proto.gitInterface.PackRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.git.PackRequest} msg The message object to deserialize into. + * @param {!proto.gitInterface.PackRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.git.PackRequest} + * @return {!proto.gitInterface.PackRequest} */ -proto.git.PackRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.gitInterface.PackRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -742,9 +734,9 @@ proto.git.PackRequest.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.git.PackRequest.prototype.serializeBinary = function() { +proto.gitInterface.PackRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.git.PackRequest.serializeBinaryToWriter(this, writer); + proto.gitInterface.PackRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -752,11 +744,11 @@ proto.git.PackRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.git.PackRequest} message + * @param {!proto.gitInterface.PackRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.git.PackRequest.serializeBinaryToWriter = function(message, writer) { +proto.gitInterface.PackRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getVaultname(); if (f.length > 0) { @@ -779,16 +771,16 @@ proto.git.PackRequest.serializeBinaryToWriter = function(message, writer) { * optional string vaultName = 1; * @return {string} */ -proto.git.PackRequest.prototype.getVaultname = function() { +proto.gitInterface.PackRequest.prototype.getVaultname = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.git.PackRequest} returns this + * @return {!proto.gitInterface.PackRequest} returns this */ -proto.git.PackRequest.prototype.setVaultname = function(value) { +proto.gitInterface.PackRequest.prototype.setVaultname = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -797,7 +789,7 @@ proto.git.PackRequest.prototype.setVaultname = function(value) { * optional bytes body = 2; * @return {!(string|Uint8Array)} */ -proto.git.PackRequest.prototype.getBody = function() { +proto.gitInterface.PackRequest.prototype.getBody = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; @@ -807,7 +799,7 @@ proto.git.PackRequest.prototype.getBody = function() { * This is a type-conversion wrapper around `getBody()` * @return {string} */ -proto.git.PackRequest.prototype.getBody_asB64 = function() { +proto.gitInterface.PackRequest.prototype.getBody_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getBody())); }; @@ -820,7 +812,7 @@ proto.git.PackRequest.prototype.getBody_asB64 = function() { * This is a type-conversion wrapper around `getBody()` * @return {!Uint8Array} */ -proto.git.PackRequest.prototype.getBody_asU8 = function() { +proto.gitInterface.PackRequest.prototype.getBody_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getBody())); }; @@ -828,9 +820,9 @@ proto.git.PackRequest.prototype.getBody_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.git.PackRequest} returns this + * @return {!proto.gitInterface.PackRequest} returns this */ -proto.git.PackRequest.prototype.setBody = function(value) { +proto.gitInterface.PackRequest.prototype.setBody = function(value) { return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -851,8 +843,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.git.PackReply.prototype.toObject = function(opt_includeInstance) { - return proto.git.PackReply.toObject(opt_includeInstance, this); +proto.gitInterface.PackReply.prototype.toObject = function(opt_includeInstance) { + return proto.gitInterface.PackReply.toObject(opt_includeInstance, this); }; @@ -861,11 +853,11 @@ proto.git.PackReply.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.git.PackReply} msg The msg instance to transform. + * @param {!proto.gitInterface.PackReply} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.git.PackReply.toObject = function(includeInstance, msg) { +proto.gitInterface.PackReply.toObject = function(includeInstance, msg) { var f, obj = { vaultname: jspb.Message.getFieldWithDefault(msg, 1, ""), body: msg.getBody_asB64() @@ -882,23 +874,23 @@ proto.git.PackReply.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.git.PackReply} + * @return {!proto.gitInterface.PackReply} */ -proto.git.PackReply.deserializeBinary = function(bytes) { +proto.gitInterface.PackReply.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.git.PackReply; - return proto.git.PackReply.deserializeBinaryFromReader(msg, reader); + var msg = new proto.gitInterface.PackReply; + return proto.gitInterface.PackReply.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.git.PackReply} msg The message object to deserialize into. + * @param {!proto.gitInterface.PackReply} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.git.PackReply} + * @return {!proto.gitInterface.PackReply} */ -proto.git.PackReply.deserializeBinaryFromReader = function(msg, reader) { +proto.gitInterface.PackReply.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -926,9 +918,9 @@ proto.git.PackReply.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.git.PackReply.prototype.serializeBinary = function() { +proto.gitInterface.PackReply.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.git.PackReply.serializeBinaryToWriter(this, writer); + proto.gitInterface.PackReply.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -936,11 +928,11 @@ proto.git.PackReply.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.git.PackReply} message + * @param {!proto.gitInterface.PackReply} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.git.PackReply.serializeBinaryToWriter = function(message, writer) { +proto.gitInterface.PackReply.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getVaultname(); if (f.length > 0) { @@ -963,16 +955,16 @@ proto.git.PackReply.serializeBinaryToWriter = function(message, writer) { * optional string vaultName = 1; * @return {string} */ -proto.git.PackReply.prototype.getVaultname = function() { +proto.gitInterface.PackReply.prototype.getVaultname = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.git.PackReply} returns this + * @return {!proto.gitInterface.PackReply} returns this */ -proto.git.PackReply.prototype.setVaultname = function(value) { +proto.gitInterface.PackReply.prototype.setVaultname = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -981,7 +973,7 @@ proto.git.PackReply.prototype.setVaultname = function(value) { * optional bytes body = 2; * @return {!(string|Uint8Array)} */ -proto.git.PackReply.prototype.getBody = function() { +proto.gitInterface.PackReply.prototype.getBody = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; @@ -991,7 +983,7 @@ proto.git.PackReply.prototype.getBody = function() { * This is a type-conversion wrapper around `getBody()` * @return {string} */ -proto.git.PackReply.prototype.getBody_asB64 = function() { +proto.gitInterface.PackReply.prototype.getBody_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getBody())); }; @@ -1004,7 +996,7 @@ proto.git.PackReply.prototype.getBody_asB64 = function() { * This is a type-conversion wrapper around `getBody()` * @return {!Uint8Array} */ -proto.git.PackReply.prototype.getBody_asU8 = function() { +proto.gitInterface.PackReply.prototype.getBody_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getBody())); }; @@ -1012,19 +1004,176 @@ proto.git.PackReply.prototype.getBody_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.git.PackReply} returns this + * @return {!proto.gitInterface.PackReply} returns this */ -proto.git.PackReply.prototype.setBody = function(value) { +proto.gitInterface.PackReply.prototype.setBody = function(value) { return jspb.Message.setProto3BytesField(this, 2, value); }; + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.gitInterface.VaultNamesReply.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.gitInterface.VaultNamesReply.prototype.toObject = function(opt_includeInstance) { + return proto.gitInterface.VaultNamesReply.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.gitInterface.VaultNamesReply} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.gitInterface.VaultNamesReply.toObject = function(includeInstance, msg) { + var f, obj = { + vaultNameListList: (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.gitInterface.VaultNamesReply} + */ +proto.gitInterface.VaultNamesReply.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.gitInterface.VaultNamesReply; + return proto.gitInterface.VaultNamesReply.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.gitInterface.VaultNamesReply} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.gitInterface.VaultNamesReply} + */ +proto.gitInterface.VaultNamesReply.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.addVaultNameList(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.gitInterface.VaultNamesReply.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.gitInterface.VaultNamesReply.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.gitInterface.VaultNamesReply} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.gitInterface.VaultNamesReply.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVaultNameListList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string vault_name_list = 1; + * @return {!Array} + */ +proto.gitInterface.VaultNamesReply.prototype.getVaultNameListList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.gitInterface.VaultNamesReply} returns this + */ +proto.gitInterface.VaultNamesReply.prototype.setVaultNameListList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.gitInterface.VaultNamesReply} returns this + */ +proto.gitInterface.VaultNamesReply.prototype.addVaultNameList = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.gitInterface.VaultNamesReply} returns this + */ +proto.gitInterface.VaultNamesReply.prototype.clearVaultNameListList = function() { + return this.setVaultNameListList([]); +}; + + /** * @enum {number} */ -proto.git.GitMessageType = { +proto.gitInterface.GitMessageType = { INFO: 0, - PACK: 1 + PACK: 1, + VAULT_NAMES: 2 }; -goog.object.extend(exports, proto.git); +goog.object.extend(exports, proto.gitInterface); diff --git a/proto/compiled/Peer_grpc_pb.d.ts b/proto/compiled/Peer_grpc_pb.d.ts index 5bb1c1b303..f2d9d9c532 100644 --- a/proto/compiled/Peer_grpc_pb.d.ts +++ b/proto/compiled/Peer_grpc_pb.d.ts @@ -1,4 +1,4 @@ -// package: peer +// package: peerInterface // file: Peer.proto /* tslint:disable */ @@ -12,7 +12,7 @@ interface IPeerService extends grpc.ServiceDefinition { - path: string; // "/peer.Peer/MessagePeer" + path: string; // "/peerInterface.Peer/MessagePeer" requestStream: false; responseStream: false; requestSerialize: grpc.serialize; diff --git a/proto/compiled/Peer_grpc_pb.js b/proto/compiled/Peer_grpc_pb.js index e6fc4d0a26..a52e423bfb 100644 --- a/proto/compiled/Peer_grpc_pb.js +++ b/proto/compiled/Peer_grpc_pb.js @@ -4,14 +4,14 @@ var grpc = require('@grpc/grpc-js'); var Peer_pb = require('./Peer_pb.js'); -function serialize_peer_PeerMessage(arg) { +function serialize_peerInterface_PeerMessage(arg) { if (!(arg instanceof Peer_pb.PeerMessage)) { - throw new Error('Expected argument of type peer.PeerMessage'); + throw new Error('Expected argument of type peerInterface.PeerMessage'); } return Buffer.from(arg.serializeBinary()); } -function deserialize_peer_PeerMessage(buffer_arg) { +function deserialize_peerInterface_PeerMessage(buffer_arg) { return Peer_pb.PeerMessage.deserializeBinary(new Uint8Array(buffer_arg)); } @@ -21,15 +21,15 @@ function deserialize_peer_PeerMessage(buffer_arg) { // //////////////// var PeerService = exports.PeerService = { messagePeer: { - path: '/peer.Peer/MessagePeer', + path: '/peerInterface.Peer/MessagePeer', requestStream: false, responseStream: false, requestType: Peer_pb.PeerMessage, responseType: Peer_pb.PeerMessage, - requestSerialize: serialize_peer_PeerMessage, - requestDeserialize: deserialize_peer_PeerMessage, - responseSerialize: serialize_peer_PeerMessage, - responseDeserialize: deserialize_peer_PeerMessage, + requestSerialize: serialize_peerInterface_PeerMessage, + requestDeserialize: deserialize_peerInterface_PeerMessage, + responseSerialize: serialize_peerInterface_PeerMessage, + responseDeserialize: deserialize_peerInterface_PeerMessage, }, }; diff --git a/proto/compiled/Peer_pb.d.ts b/proto/compiled/Peer_pb.d.ts index e903110bbb..6f22f9c486 100644 --- a/proto/compiled/Peer_pb.d.ts +++ b/proto/compiled/Peer_pb.d.ts @@ -1,4 +1,4 @@ -// package: peer +// package: peerInterface // file: Peer.proto /* tslint:disable */ @@ -6,135 +6,120 @@ import * as jspb from "google-protobuf"; -export class HandshakeMessage extends jspb.Message { - getTargetPubKey(): Uint8Array | string; - getTargetPubKey_asU8(): Uint8Array; - getTargetPubKey_asB64(): string; - setTargetPubKey(value: Uint8Array | string): HandshakeMessage; - - getRequestingPubKey(): Uint8Array | string; - getRequestingPubKey_asU8(): Uint8Array; - getRequestingPubKey_asB64(): string; - setRequestingPubKey(value: Uint8Array | string): HandshakeMessage; +export class PeerMessage extends jspb.Message { + getPublicKey(): string; + setPublicKey(value: string): PeerMessage; - getMessage(): Uint8Array | string; - getMessage_asU8(): Uint8Array; - getMessage_asB64(): string; - setMessage(value: Uint8Array | string): HandshakeMessage; + getType(): SubServiceType; + setType(value: SubServiceType): PeerMessage; - getResponsePeerInfo(): Uint8Array | string; - getResponsePeerInfo_asU8(): Uint8Array; - getResponsePeerInfo_asB64(): string; - setResponsePeerInfo(value: Uint8Array | string): HandshakeMessage; + getSubMessage(): string; + setSubMessage(value: string): PeerMessage; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): HandshakeMessage.AsObject; - static toObject(includeInstance: boolean, msg: HandshakeMessage): HandshakeMessage.AsObject; + toObject(includeInstance?: boolean): PeerMessage.AsObject; + static toObject(includeInstance: boolean, msg: PeerMessage): PeerMessage.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: HandshakeMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): HandshakeMessage; - static deserializeBinaryFromReader(message: HandshakeMessage, reader: jspb.BinaryReader): HandshakeMessage; + static serializeBinaryToWriter(message: PeerMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PeerMessage; + static deserializeBinaryFromReader(message: PeerMessage, reader: jspb.BinaryReader): PeerMessage; } -export namespace HandshakeMessage { +export namespace PeerMessage { export type AsObject = { - targetPubKey: Uint8Array | string, - requestingPubKey: Uint8Array | string, - message: Uint8Array | string, - responsePeerInfo: Uint8Array | string, + publicKey: string, + type: SubServiceType, + subMessage: string, } } -export class PeerInfoMessage extends jspb.Message { - getPubKey(): string; - setPubKey(value: string): PeerInfoMessage; +export class PingPeerMessage extends jspb.Message { + getPublicKey(): string; + setPublicKey(value: string): PingPeerMessage; + + getChallenge(): string; + setChallenge(value: string): PingPeerMessage; - clearAddressesList(): void; - getAddressesList(): Array; - setAddressesList(value: Array): PeerInfoMessage; - addAddresses(value: string, index?: number): string; - getConnectedAddr(): string; - setConnectedAddr(value: string): PeerInfoMessage; + hasPeerinfo(): boolean; + clearPeerinfo(): void; + getPeerinfo(): PeerInfoMessage | undefined; + setPeerinfo(value?: PeerInfoMessage): PingPeerMessage; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PeerInfoMessage.AsObject; - static toObject(includeInstance: boolean, msg: PeerInfoMessage): PeerInfoMessage.AsObject; + toObject(includeInstance?: boolean): PingPeerMessage.AsObject; + static toObject(includeInstance: boolean, msg: PingPeerMessage): PingPeerMessage.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PeerInfoMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PeerInfoMessage; - static deserializeBinaryFromReader(message: PeerInfoMessage, reader: jspb.BinaryReader): PeerInfoMessage; + static serializeBinaryToWriter(message: PingPeerMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PingPeerMessage; + static deserializeBinaryFromReader(message: PingPeerMessage, reader: jspb.BinaryReader): PingPeerMessage; } -export namespace PeerInfoMessage { +export namespace PingPeerMessage { export type AsObject = { - pubKey: string, - addressesList: Array, - connectedAddr: string, + publicKey: string, + challenge: string, + peerinfo?: PeerInfoMessage.AsObject, } } -export class PeerMessage extends jspb.Message { - getPublickey(): string; - setPublickey(value: string): PeerMessage; +export class PeerInfoMessage extends jspb.Message { + getPublicKey(): string; + setPublicKey(value: string): PeerInfoMessage; - getType(): SubServiceType; - setType(value: SubServiceType): PeerMessage; + getRelayPublicKey(): string; + setRelayPublicKey(value: string): PeerInfoMessage; - getSubmessage(): string; - setSubmessage(value: string): PeerMessage; + getPeerAddress(): string; + setPeerAddress(value: string): PeerInfoMessage; + + getApiAddress(): string; + setApiAddress(value: string): PeerInfoMessage; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): PeerMessage.AsObject; - static toObject(includeInstance: boolean, msg: PeerMessage): PeerMessage.AsObject; + toObject(includeInstance?: boolean): PeerInfoMessage.AsObject; + static toObject(includeInstance: boolean, msg: PeerInfoMessage): PeerInfoMessage.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: PeerMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): PeerMessage; - static deserializeBinaryFromReader(message: PeerMessage, reader: jspb.BinaryReader): PeerMessage; + static serializeBinaryToWriter(message: PeerInfoMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PeerInfoMessage; + static deserializeBinaryFromReader(message: PeerInfoMessage, reader: jspb.BinaryReader): PeerInfoMessage; } -export namespace PeerMessage { +export namespace PeerInfoMessage { export type AsObject = { - publickey: string, - type: SubServiceType, - submessage: string, + publicKey: string, + relayPublicKey: string, + peerAddress: string, + apiAddress: string, } } -export class NatMessage extends jspb.Message { - getType(): NatMessageType; - setType(value: NatMessageType): NatMessage; - - getIsresponse(): boolean; - setIsresponse(value: boolean): NatMessage; - - getSubmessage(): Uint8Array | string; - getSubmessage_asU8(): Uint8Array; - getSubmessage_asB64(): string; - setSubmessage(value: Uint8Array | string): NatMessage; +export class PeerInfoListMessage extends jspb.Message { + clearPeerInfoListList(): void; + getPeerInfoListList(): Array; + setPeerInfoListList(value: Array): PeerInfoListMessage; + addPeerInfoList(value?: PeerInfoMessage, index?: number): PeerInfoMessage; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NatMessage.AsObject; - static toObject(includeInstance: boolean, msg: NatMessage): NatMessage.AsObject; + toObject(includeInstance?: boolean): PeerInfoListMessage.AsObject; + static toObject(includeInstance: boolean, msg: PeerInfoListMessage): PeerInfoListMessage.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NatMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NatMessage; - static deserializeBinaryFromReader(message: NatMessage, reader: jspb.BinaryReader): NatMessage; + static serializeBinaryToWriter(message: PeerInfoListMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PeerInfoListMessage; + static deserializeBinaryFromReader(message: PeerInfoListMessage, reader: jspb.BinaryReader): PeerInfoListMessage; } -export namespace NatMessage { +export namespace PeerInfoListMessage { export type AsObject = { - type: NatMessageType, - isresponse: boolean, - submessage: Uint8Array | string, + peerInfoListList: Array, } } @@ -159,9 +144,40 @@ export namespace ErrorMessage { } } +export class NatMessage extends jspb.Message { + getType(): NatMessageType; + setType(value: NatMessageType): NatMessage; + + getIsResponse(): boolean; + setIsResponse(value: boolean): NatMessage; + + getSubMessage(): Uint8Array | string; + getSubMessage_asU8(): Uint8Array; + getSubMessage_asB64(): string; + setSubMessage(value: Uint8Array | string): NatMessage; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NatMessage.AsObject; + static toObject(includeInstance: boolean, msg: NatMessage): NatMessage.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NatMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NatMessage; + static deserializeBinaryFromReader(message: NatMessage, reader: jspb.BinaryReader): NatMessage; +} + +export namespace NatMessage { + export type AsObject = { + type: NatMessageType, + isResponse: boolean, + subMessage: Uint8Array | string, + } +} + export class RelayConnectionRequest extends jspb.Message { - getPublickey(): string; - setPublickey(value: string): RelayConnectionRequest; + getPublicKey(): string; + setPublicKey(value: string): RelayConnectionRequest; serializeBinary(): Uint8Array; @@ -176,16 +192,13 @@ export class RelayConnectionRequest extends jspb.Message { export namespace RelayConnectionRequest { export type AsObject = { - publickey: string, + publicKey: string, } } export class RelayConnectionResponse extends jspb.Message { - getIncomingaddress(): string; - setIncomingaddress(value: string): RelayConnectionResponse; - - getOutgoingaddress(): string; - setOutgoingaddress(value: string): RelayConnectionResponse; + getServerAddress(): string; + setServerAddress(value: string): RelayConnectionResponse; serializeBinary(): Uint8Array; @@ -200,14 +213,13 @@ export class RelayConnectionResponse extends jspb.Message { export namespace RelayConnectionResponse { export type AsObject = { - incomingaddress: string, - outgoingaddress: string, + serverAddress: string, } } export class PeerConnectionRequest extends jspb.Message { - getPublickey(): string; - setPublickey(value: string): PeerConnectionRequest; + getPublicKey(): string; + setPublicKey(value: string): PeerConnectionRequest; serializeBinary(): Uint8Array; @@ -222,13 +234,13 @@ export class PeerConnectionRequest extends jspb.Message { export namespace PeerConnectionRequest { export type AsObject = { - publickey: string, + publicKey: string, } } export class PeerConnectionResponse extends jspb.Message { - getAddress(): string; - setAddress(value: string): PeerConnectionResponse; + getPeerAddress(): string; + setPeerAddress(value: string): PeerConnectionResponse; serializeBinary(): Uint8Array; @@ -242,6 +254,111 @@ export class PeerConnectionResponse extends jspb.Message { } export namespace PeerConnectionResponse { + export type AsObject = { + peerAddress: string, + } +} + +export class UDPAddressResponse extends jspb.Message { + getAddress(): string; + setAddress(value: string): UDPAddressResponse; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UDPAddressResponse.AsObject; + static toObject(includeInstance: boolean, msg: UDPAddressResponse): UDPAddressResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UDPAddressResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UDPAddressResponse; + static deserializeBinaryFromReader(message: UDPAddressResponse, reader: jspb.BinaryReader): UDPAddressResponse; +} + +export namespace UDPAddressResponse { + export type AsObject = { + address: string, + } +} + +export class HolePunchRegisterRequest extends jspb.Message { + getPublicKey(): string; + setPublicKey(value: string): HolePunchRegisterRequest; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HolePunchRegisterRequest.AsObject; + static toObject(includeInstance: boolean, msg: HolePunchRegisterRequest): HolePunchRegisterRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: HolePunchRegisterRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HolePunchRegisterRequest; + static deserializeBinaryFromReader(message: HolePunchRegisterRequest, reader: jspb.BinaryReader): HolePunchRegisterRequest; +} + +export namespace HolePunchRegisterRequest { + export type AsObject = { + publicKey: string, + } +} + +export class HolePunchRegisterResponse extends jspb.Message { + getConnectedAddress(): string; + setConnectedAddress(value: string): HolePunchRegisterResponse; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HolePunchRegisterResponse.AsObject; + static toObject(includeInstance: boolean, msg: HolePunchRegisterResponse): HolePunchRegisterResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: HolePunchRegisterResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HolePunchRegisterResponse; + static deserializeBinaryFromReader(message: HolePunchRegisterResponse, reader: jspb.BinaryReader): HolePunchRegisterResponse; +} + +export namespace HolePunchRegisterResponse { + export type AsObject = { + connectedAddress: string, + } +} + +export class PeerUdpAddressRequest extends jspb.Message { + getPublicKey(): string; + setPublicKey(value: string): PeerUdpAddressRequest; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PeerUdpAddressRequest.AsObject; + static toObject(includeInstance: boolean, msg: PeerUdpAddressRequest): PeerUdpAddressRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PeerUdpAddressRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PeerUdpAddressRequest; + static deserializeBinaryFromReader(message: PeerUdpAddressRequest, reader: jspb.BinaryReader): PeerUdpAddressRequest; +} + +export namespace PeerUdpAddressRequest { + export type AsObject = { + publicKey: string, + } +} + +export class PeerUdpAddressResponse extends jspb.Message { + getAddress(): string; + setAddress(value: string): PeerUdpAddressResponse; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PeerUdpAddressResponse.AsObject; + static toObject(includeInstance: boolean, msg: PeerUdpAddressResponse): PeerUdpAddressResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PeerUdpAddressResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PeerUdpAddressResponse; + static deserializeBinaryFromReader(message: PeerUdpAddressResponse, reader: jspb.BinaryReader): PeerUdpAddressResponse; +} + +export namespace PeerUdpAddressResponse { export type AsObject = { address: string, } @@ -257,4 +374,6 @@ export enum NatMessageType { ERROR = 0, RELAY_CONNECTION = 1, PEER_CONNECTION = 2, + UDP_ADDRESS = 3, + PEER_UDP_ADDRESS = 4, } diff --git a/proto/compiled/Peer_pb.js b/proto/compiled/Peer_pb.js index 5ae76fabe5..1ae7397083 100644 --- a/proto/compiled/Peer_pb.js +++ b/proto/compiled/Peer_pb.js @@ -12,17 +12,23 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -goog.exportSymbol('proto.peer.ErrorMessage', null, global); -goog.exportSymbol('proto.peer.HandshakeMessage', null, global); -goog.exportSymbol('proto.peer.NatMessage', null, global); -goog.exportSymbol('proto.peer.NatMessageType', null, global); -goog.exportSymbol('proto.peer.PeerConnectionRequest', null, global); -goog.exportSymbol('proto.peer.PeerConnectionResponse', null, global); -goog.exportSymbol('proto.peer.PeerInfoMessage', null, global); -goog.exportSymbol('proto.peer.PeerMessage', null, global); -goog.exportSymbol('proto.peer.RelayConnectionRequest', null, global); -goog.exportSymbol('proto.peer.RelayConnectionResponse', null, global); -goog.exportSymbol('proto.peer.SubServiceType', null, global); +goog.exportSymbol('proto.peerInterface.ErrorMessage', null, global); +goog.exportSymbol('proto.peerInterface.HolePunchRegisterRequest', null, global); +goog.exportSymbol('proto.peerInterface.HolePunchRegisterResponse', null, global); +goog.exportSymbol('proto.peerInterface.NatMessage', null, global); +goog.exportSymbol('proto.peerInterface.NatMessageType', null, global); +goog.exportSymbol('proto.peerInterface.PeerConnectionRequest', null, global); +goog.exportSymbol('proto.peerInterface.PeerConnectionResponse', null, global); +goog.exportSymbol('proto.peerInterface.PeerInfoListMessage', null, global); +goog.exportSymbol('proto.peerInterface.PeerInfoMessage', null, global); +goog.exportSymbol('proto.peerInterface.PeerMessage', null, global); +goog.exportSymbol('proto.peerInterface.PeerUdpAddressRequest', null, global); +goog.exportSymbol('proto.peerInterface.PeerUdpAddressResponse', null, global); +goog.exportSymbol('proto.peerInterface.PingPeerMessage', null, global); +goog.exportSymbol('proto.peerInterface.RelayConnectionRequest', null, global); +goog.exportSymbol('proto.peerInterface.RelayConnectionResponse', null, global); +goog.exportSymbol('proto.peerInterface.SubServiceType', null, global); +goog.exportSymbol('proto.peerInterface.UDPAddressResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -33,16 +39,16 @@ goog.exportSymbol('proto.peer.SubServiceType', null, global); * @extends {jspb.Message} * @constructor */ -proto.peer.HandshakeMessage = function(opt_data) { +proto.peerInterface.PeerMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.peer.HandshakeMessage, jspb.Message); +goog.inherits(proto.peerInterface.PeerMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.peer.HandshakeMessage.displayName = 'proto.peer.HandshakeMessage'; + proto.peerInterface.PeerMessage.displayName = 'proto.peerInterface.PeerMessage'; } /** * Generated by JsPbCodeGenerator. @@ -54,16 +60,142 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.peer.PeerInfoMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.peer.PeerInfoMessage.repeatedFields_, null); +proto.peerInterface.PingPeerMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.peerInterface.PingPeerMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.peerInterface.PingPeerMessage.displayName = 'proto.peerInterface.PingPeerMessage'; +} +/** + * 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.peerInterface.PeerInfoMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.peerInterface.PeerInfoMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.peerInterface.PeerInfoMessage.displayName = 'proto.peerInterface.PeerInfoMessage'; +} +/** + * 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.peerInterface.PeerInfoListMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.peerInterface.PeerInfoListMessage.repeatedFields_, null); +}; +goog.inherits(proto.peerInterface.PeerInfoListMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.peerInterface.PeerInfoListMessage.displayName = 'proto.peerInterface.PeerInfoListMessage'; +} +/** + * 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.peerInterface.ErrorMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.peerInterface.ErrorMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.peerInterface.ErrorMessage.displayName = 'proto.peerInterface.ErrorMessage'; +} +/** + * 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.peerInterface.NatMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.peerInterface.NatMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.peerInterface.NatMessage.displayName = 'proto.peerInterface.NatMessage'; +} +/** + * 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.peerInterface.RelayConnectionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.peerInterface.RelayConnectionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.peerInterface.RelayConnectionRequest.displayName = 'proto.peerInterface.RelayConnectionRequest'; +} +/** + * 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.peerInterface.RelayConnectionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.peer.PeerInfoMessage, jspb.Message); +goog.inherits(proto.peerInterface.RelayConnectionResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.peer.PeerInfoMessage.displayName = 'proto.peer.PeerInfoMessage'; + proto.peerInterface.RelayConnectionResponse.displayName = 'proto.peerInterface.RelayConnectionResponse'; } /** * Generated by JsPbCodeGenerator. @@ -75,16 +207,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.peer.PeerMessage = function(opt_data) { +proto.peerInterface.PeerConnectionRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.peer.PeerMessage, jspb.Message); +goog.inherits(proto.peerInterface.PeerConnectionRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.peer.PeerMessage.displayName = 'proto.peer.PeerMessage'; + proto.peerInterface.PeerConnectionRequest.displayName = 'proto.peerInterface.PeerConnectionRequest'; } /** * Generated by JsPbCodeGenerator. @@ -96,16 +228,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.peer.NatMessage = function(opt_data) { +proto.peerInterface.PeerConnectionResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.peer.NatMessage, jspb.Message); +goog.inherits(proto.peerInterface.PeerConnectionResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.peer.NatMessage.displayName = 'proto.peer.NatMessage'; + proto.peerInterface.PeerConnectionResponse.displayName = 'proto.peerInterface.PeerConnectionResponse'; } /** * Generated by JsPbCodeGenerator. @@ -117,16 +249,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.peer.ErrorMessage = function(opt_data) { +proto.peerInterface.UDPAddressResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.peer.ErrorMessage, jspb.Message); +goog.inherits(proto.peerInterface.UDPAddressResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.peer.ErrorMessage.displayName = 'proto.peer.ErrorMessage'; + proto.peerInterface.UDPAddressResponse.displayName = 'proto.peerInterface.UDPAddressResponse'; } /** * Generated by JsPbCodeGenerator. @@ -138,16 +270,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.peer.RelayConnectionRequest = function(opt_data) { +proto.peerInterface.HolePunchRegisterRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.peer.RelayConnectionRequest, jspb.Message); +goog.inherits(proto.peerInterface.HolePunchRegisterRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.peer.RelayConnectionRequest.displayName = 'proto.peer.RelayConnectionRequest'; + proto.peerInterface.HolePunchRegisterRequest.displayName = 'proto.peerInterface.HolePunchRegisterRequest'; } /** * Generated by JsPbCodeGenerator. @@ -159,16 +291,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.peer.RelayConnectionResponse = function(opt_data) { +proto.peerInterface.HolePunchRegisterResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.peer.RelayConnectionResponse, jspb.Message); +goog.inherits(proto.peerInterface.HolePunchRegisterResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.peer.RelayConnectionResponse.displayName = 'proto.peer.RelayConnectionResponse'; + proto.peerInterface.HolePunchRegisterResponse.displayName = 'proto.peerInterface.HolePunchRegisterResponse'; } /** * Generated by JsPbCodeGenerator. @@ -180,16 +312,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.peer.PeerConnectionRequest = function(opt_data) { +proto.peerInterface.PeerUdpAddressRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.peer.PeerConnectionRequest, jspb.Message); +goog.inherits(proto.peerInterface.PeerUdpAddressRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.peer.PeerConnectionRequest.displayName = 'proto.peer.PeerConnectionRequest'; + proto.peerInterface.PeerUdpAddressRequest.displayName = 'proto.peerInterface.PeerUdpAddressRequest'; } /** * Generated by JsPbCodeGenerator. @@ -201,16 +333,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.peer.PeerConnectionResponse = function(opt_data) { +proto.peerInterface.PeerUdpAddressResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.peer.PeerConnectionResponse, jspb.Message); +goog.inherits(proto.peerInterface.PeerUdpAddressResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.peer.PeerConnectionResponse.displayName = 'proto.peer.PeerConnectionResponse'; + proto.peerInterface.PeerUdpAddressResponse.displayName = 'proto.peerInterface.PeerUdpAddressResponse'; } @@ -228,8 +360,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.peer.HandshakeMessage.prototype.toObject = function(opt_includeInstance) { - return proto.peer.HandshakeMessage.toObject(opt_includeInstance, this); +proto.peerInterface.PeerMessage.prototype.toObject = function(opt_includeInstance) { + return proto.peerInterface.PeerMessage.toObject(opt_includeInstance, this); }; @@ -238,16 +370,15 @@ proto.peer.HandshakeMessage.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.peer.HandshakeMessage} msg The msg instance to transform. + * @param {!proto.peerInterface.PeerMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.peer.HandshakeMessage.toObject = function(includeInstance, msg) { +proto.peerInterface.PeerMessage.toObject = function(includeInstance, msg) { var f, obj = { - targetPubKey: msg.getTargetPubKey_asB64(), - requestingPubKey: msg.getRequestingPubKey_asB64(), - message: msg.getMessage_asB64(), - responsePeerInfo: msg.getResponsePeerInfo_asB64() + publicKey: jspb.Message.getFieldWithDefault(msg, 1, ""), + type: jspb.Message.getFieldWithDefault(msg, 2, 0), + subMessage: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -261,23 +392,23 @@ proto.peer.HandshakeMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.peer.HandshakeMessage} + * @return {!proto.peerInterface.PeerMessage} */ -proto.peer.HandshakeMessage.deserializeBinary = function(bytes) { +proto.peerInterface.PeerMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.peer.HandshakeMessage; - return proto.peer.HandshakeMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.peerInterface.PeerMessage; + return proto.peerInterface.PeerMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.peer.HandshakeMessage} msg The message object to deserialize into. + * @param {!proto.peerInterface.PeerMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.peer.HandshakeMessage} + * @return {!proto.peerInterface.PeerMessage} */ -proto.peer.HandshakeMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.peerInterface.PeerMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -285,20 +416,16 @@ proto.peer.HandshakeMessage.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setTargetPubKey(value); + var value = /** @type {string} */ (reader.readString()); + msg.setPublicKey(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setRequestingPubKey(value); + var value = /** @type {!proto.peerInterface.SubServiceType} */ (reader.readEnum()); + msg.setType(value); break; case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setMessage(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setResponsePeerInfo(value); + var value = /** @type {string} */ (reader.readString()); + msg.setSubMessage(value); break; default: reader.skipField(); @@ -313,9 +440,9 @@ proto.peer.HandshakeMessage.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.peer.HandshakeMessage.prototype.serializeBinary = function() { +proto.peerInterface.PeerMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.peer.HandshakeMessage.serializeBinaryToWriter(this, writer); + proto.peerInterface.PeerMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -323,219 +450,1026 @@ proto.peer.HandshakeMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.peer.HandshakeMessage} message + * @param {!proto.peerInterface.PeerMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.peer.HandshakeMessage.serializeBinaryToWriter = function(message, writer) { +proto.peerInterface.PeerMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTargetPubKey_asU8(); + f = message.getPublicKey(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 1, f ); } - f = message.getRequestingPubKey_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( 2, f ); } - f = message.getMessage_asU8(); + f = message.getSubMessage(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 3, f ); } - f = message.getResponsePeerInfo_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } }; /** - * optional bytes target_pub_key = 1; - * @return {!(string|Uint8Array)} + * optional string public_key = 1; + * @return {string} */ -proto.peer.HandshakeMessage.prototype.getTargetPubKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.peerInterface.PeerMessage.prototype.getPublicKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes target_pub_key = 1; - * This is a type-conversion wrapper around `getTargetPubKey()` - * @return {string} + * @param {string} value + * @return {!proto.peerInterface.PeerMessage} returns this */ -proto.peer.HandshakeMessage.prototype.getTargetPubKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getTargetPubKey())); +proto.peerInterface.PeerMessage.prototype.setPublicKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional bytes target_pub_key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getTargetPubKey()` - * @return {!Uint8Array} + * optional SubServiceType type = 2; + * @return {!proto.peerInterface.SubServiceType} */ -proto.peer.HandshakeMessage.prototype.getTargetPubKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getTargetPubKey())); +proto.peerInterface.PeerMessage.prototype.getType = function() { + return /** @type {!proto.peerInterface.SubServiceType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.peer.HandshakeMessage} returns this + * @param {!proto.peerInterface.SubServiceType} value + * @return {!proto.peerInterface.PeerMessage} returns this */ -proto.peer.HandshakeMessage.prototype.setTargetPubKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.peerInterface.PeerMessage.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); }; /** - * optional bytes requesting_pub_key = 2; - * @return {!(string|Uint8Array)} + * optional string sub_message = 3; + * @return {string} */ -proto.peer.HandshakeMessage.prototype.getRequestingPubKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.peerInterface.PeerMessage.prototype.getSubMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * optional bytes requesting_pub_key = 2; - * This is a type-conversion wrapper around `getRequestingPubKey()` - * @return {string} + * @param {string} value + * @return {!proto.peerInterface.PeerMessage} returns this */ -proto.peer.HandshakeMessage.prototype.getRequestingPubKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getRequestingPubKey())); +proto.peerInterface.PeerMessage.prototype.setSubMessage = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional bytes requesting_pub_key = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getRequestingPubKey()` - * @return {!Uint8Array} + * 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.peer.HandshakeMessage.prototype.getRequestingPubKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getRequestingPubKey())); +proto.peerInterface.PingPeerMessage.prototype.toObject = function(opt_includeInstance) { + return proto.peerInterface.PingPeerMessage.toObject(opt_includeInstance, this); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.peer.HandshakeMessage} 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.peerInterface.PingPeerMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.peer.HandshakeMessage.prototype.setRequestingPubKey = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.peerInterface.PingPeerMessage.toObject = function(includeInstance, msg) { + var f, obj = { + publicKey: jspb.Message.getFieldWithDefault(msg, 1, ""), + challenge: jspb.Message.getFieldWithDefault(msg, 2, ""), + peerinfo: (f = msg.getPeerinfo()) && proto.peerInterface.PeerInfoMessage.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional bytes message = 3; - * @return {!(string|Uint8Array)} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.peerInterface.PingPeerMessage} */ -proto.peer.HandshakeMessage.prototype.getMessage = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.peerInterface.PingPeerMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.peerInterface.PingPeerMessage; + return proto.peerInterface.PingPeerMessage.deserializeBinaryFromReader(msg, reader); }; /** - * optional bytes message = 3; - * This is a type-conversion wrapper around `getMessage()` - * @return {string} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.peerInterface.PingPeerMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.peerInterface.PingPeerMessage} */ -proto.peer.HandshakeMessage.prototype.getMessage_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getMessage())); +proto.peerInterface.PingPeerMessage.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.setPublicKey(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChallenge(value); + break; + case 3: + var value = new proto.peerInterface.PeerInfoMessage; + reader.readMessage(value,proto.peerInterface.PeerInfoMessage.deserializeBinaryFromReader); + msg.setPeerinfo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional bytes message = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getMessage()` + * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.peer.HandshakeMessage.prototype.getMessage_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getMessage())); +proto.peerInterface.PingPeerMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.peerInterface.PingPeerMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.peer.HandshakeMessage} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.peerInterface.PingPeerMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.peer.HandshakeMessage.prototype.setMessage = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); +proto.peerInterface.PingPeerMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPublicKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChallenge(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPeerinfo(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.peerInterface.PeerInfoMessage.serializeBinaryToWriter + ); + } }; /** - * optional bytes response_peer_info = 4; - * @return {!(string|Uint8Array)} + * optional string public_key = 1; + * @return {string} + */ +proto.peerInterface.PingPeerMessage.prototype.getPublicKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.peerInterface.PingPeerMessage} returns this */ -proto.peer.HandshakeMessage.prototype.getResponsePeerInfo = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.peerInterface.PingPeerMessage.prototype.setPublicKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string challenge = 2; + * @return {string} + */ +proto.peerInterface.PingPeerMessage.prototype.getChallenge = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.peerInterface.PingPeerMessage} returns this + */ +proto.peerInterface.PingPeerMessage.prototype.setChallenge = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional PeerInfoMessage peerInfo = 3; + * @return {?proto.peerInterface.PeerInfoMessage} + */ +proto.peerInterface.PingPeerMessage.prototype.getPeerinfo = function() { + return /** @type{?proto.peerInterface.PeerInfoMessage} */ ( + jspb.Message.getWrapperField(this, proto.peerInterface.PeerInfoMessage, 3)); +}; + + +/** + * @param {?proto.peerInterface.PeerInfoMessage|undefined} value + * @return {!proto.peerInterface.PingPeerMessage} returns this +*/ +proto.peerInterface.PingPeerMessage.prototype.setPeerinfo = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.peerInterface.PingPeerMessage} returns this + */ +proto.peerInterface.PingPeerMessage.prototype.clearPeerinfo = function() { + return this.setPeerinfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.peerInterface.PingPeerMessage.prototype.hasPeerinfo = 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.peerInterface.PeerInfoMessage.prototype.toObject = function(opt_includeInstance) { + return proto.peerInterface.PeerInfoMessage.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.peerInterface.PeerInfoMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.peerInterface.PeerInfoMessage.toObject = function(includeInstance, msg) { + var f, obj = { + publicKey: jspb.Message.getFieldWithDefault(msg, 1, ""), + relayPublicKey: jspb.Message.getFieldWithDefault(msg, 2, ""), + peerAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), + apiAddress: 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.peerInterface.PeerInfoMessage} + */ +proto.peerInterface.PeerInfoMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.peerInterface.PeerInfoMessage; + return proto.peerInterface.PeerInfoMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.peerInterface.PeerInfoMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.peerInterface.PeerInfoMessage} + */ +proto.peerInterface.PeerInfoMessage.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.setPublicKey(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRelayPublicKey(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPeerAddress(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setApiAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.peerInterface.PeerInfoMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.peerInterface.PeerInfoMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.peerInterface.PeerInfoMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.peerInterface.PeerInfoMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPublicKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRelayPublicKey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPeerAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getApiAddress(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string public_key = 1; + * @return {string} + */ +proto.peerInterface.PeerInfoMessage.prototype.getPublicKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.peerInterface.PeerInfoMessage} returns this + */ +proto.peerInterface.PeerInfoMessage.prototype.setPublicKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string relay_public_key = 2; + * @return {string} + */ +proto.peerInterface.PeerInfoMessage.prototype.getRelayPublicKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.peerInterface.PeerInfoMessage} returns this + */ +proto.peerInterface.PeerInfoMessage.prototype.setRelayPublicKey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string peer_address = 3; + * @return {string} + */ +proto.peerInterface.PeerInfoMessage.prototype.getPeerAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.peerInterface.PeerInfoMessage} returns this + */ +proto.peerInterface.PeerInfoMessage.prototype.setPeerAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string api_address = 4; + * @return {string} + */ +proto.peerInterface.PeerInfoMessage.prototype.getApiAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.peerInterface.PeerInfoMessage} returns this + */ +proto.peerInterface.PeerInfoMessage.prototype.setApiAddress = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.peerInterface.PeerInfoListMessage.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.peerInterface.PeerInfoListMessage.prototype.toObject = function(opt_includeInstance) { + return proto.peerInterface.PeerInfoListMessage.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.peerInterface.PeerInfoListMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.peerInterface.PeerInfoListMessage.toObject = function(includeInstance, msg) { + var f, obj = { + peerInfoListList: jspb.Message.toObjectList(msg.getPeerInfoListList(), + proto.peerInterface.PeerInfoMessage.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.peerInterface.PeerInfoListMessage} + */ +proto.peerInterface.PeerInfoListMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.peerInterface.PeerInfoListMessage; + return proto.peerInterface.PeerInfoListMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.peerInterface.PeerInfoListMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.peerInterface.PeerInfoListMessage} + */ +proto.peerInterface.PeerInfoListMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.peerInterface.PeerInfoMessage; + reader.readMessage(value,proto.peerInterface.PeerInfoMessage.deserializeBinaryFromReader); + msg.addPeerInfoList(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.peerInterface.PeerInfoListMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.peerInterface.PeerInfoListMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.peerInterface.PeerInfoListMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.peerInterface.PeerInfoListMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPeerInfoListList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.peerInterface.PeerInfoMessage.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated PeerInfoMessage peer_info_list = 1; + * @return {!Array} + */ +proto.peerInterface.PeerInfoListMessage.prototype.getPeerInfoListList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.peerInterface.PeerInfoMessage, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.peerInterface.PeerInfoListMessage} returns this +*/ +proto.peerInterface.PeerInfoListMessage.prototype.setPeerInfoListList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.peerInterface.PeerInfoMessage=} opt_value + * @param {number=} opt_index + * @return {!proto.peerInterface.PeerInfoMessage} + */ +proto.peerInterface.PeerInfoListMessage.prototype.addPeerInfoList = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.peerInterface.PeerInfoMessage, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.peerInterface.PeerInfoListMessage} returns this + */ +proto.peerInterface.PeerInfoListMessage.prototype.clearPeerInfoListList = function() { + return this.setPeerInfoListList([]); +}; + + + + + +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.peerInterface.ErrorMessage.prototype.toObject = function(opt_includeInstance) { + return proto.peerInterface.ErrorMessage.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.peerInterface.ErrorMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.peerInterface.ErrorMessage.toObject = function(includeInstance, msg) { + var f, obj = { + error: 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.peerInterface.ErrorMessage} + */ +proto.peerInterface.ErrorMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.peerInterface.ErrorMessage; + return proto.peerInterface.ErrorMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.peerInterface.ErrorMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.peerInterface.ErrorMessage} + */ +proto.peerInterface.ErrorMessage.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.setError(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.peerInterface.ErrorMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.peerInterface.ErrorMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.peerInterface.ErrorMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.peerInterface.ErrorMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getError(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string error = 1; + * @return {string} + */ +proto.peerInterface.ErrorMessage.prototype.getError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.peerInterface.ErrorMessage} returns this + */ +proto.peerInterface.ErrorMessage.prototype.setError = 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.peerInterface.NatMessage.prototype.toObject = function(opt_includeInstance) { + return proto.peerInterface.NatMessage.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.peerInterface.NatMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.peerInterface.NatMessage.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + isResponse: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + subMessage: msg.getSubMessage_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.peerInterface.NatMessage} + */ +proto.peerInterface.NatMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.peerInterface.NatMessage; + return proto.peerInterface.NatMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.peerInterface.NatMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.peerInterface.NatMessage} + */ +proto.peerInterface.NatMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.peerInterface.NatMessageType} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsResponse(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSubMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.peerInterface.NatMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.peerInterface.NatMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.peerInterface.NatMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.peerInterface.NatMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getIsResponse(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getSubMessage_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional NatMessageType type = 1; + * @return {!proto.peerInterface.NatMessageType} + */ +proto.peerInterface.NatMessage.prototype.getType = function() { + return /** @type {!proto.peerInterface.NatMessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.peerInterface.NatMessageType} value + * @return {!proto.peerInterface.NatMessage} returns this + */ +proto.peerInterface.NatMessage.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional bool is_response = 2; + * @return {boolean} + */ +proto.peerInterface.NatMessage.prototype.getIsResponse = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.peerInterface.NatMessage} returns this + */ +proto.peerInterface.NatMessage.prototype.setIsResponse = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional bytes sub_message = 3; + * @return {!(string|Uint8Array)} + */ +proto.peerInterface.NatMessage.prototype.getSubMessage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * optional bytes response_peer_info = 4; - * This is a type-conversion wrapper around `getResponsePeerInfo()` + * optional bytes sub_message = 3; + * This is a type-conversion wrapper around `getSubMessage()` * @return {string} */ -proto.peer.HandshakeMessage.prototype.getResponsePeerInfo_asB64 = function() { +proto.peerInterface.NatMessage.prototype.getSubMessage_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getResponsePeerInfo())); + this.getSubMessage())); }; /** - * optional bytes response_peer_info = 4; + * optional bytes sub_message = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getResponsePeerInfo()` + * This is a type-conversion wrapper around `getSubMessage()` * @return {!Uint8Array} */ -proto.peer.HandshakeMessage.prototype.getResponsePeerInfo_asU8 = function() { +proto.peerInterface.NatMessage.prototype.getSubMessage_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getResponsePeerInfo())); + this.getSubMessage())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.peer.HandshakeMessage} returns this + * @return {!proto.peerInterface.NatMessage} returns this */ -proto.peer.HandshakeMessage.prototype.setResponsePeerInfo = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); +proto.peerInterface.NatMessage.prototype.setSubMessage = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.peer.PeerInfoMessage.repeatedFields_ = [2]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -551,8 +1485,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.peer.PeerInfoMessage.prototype.toObject = function(opt_includeInstance) { - return proto.peer.PeerInfoMessage.toObject(opt_includeInstance, this); +proto.peerInterface.RelayConnectionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.peerInterface.RelayConnectionRequest.toObject(opt_includeInstance, this); }; @@ -561,15 +1495,13 @@ proto.peer.PeerInfoMessage.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.peer.PeerInfoMessage} msg The msg instance to transform. + * @param {!proto.peerInterface.RelayConnectionRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.peer.PeerInfoMessage.toObject = function(includeInstance, msg) { +proto.peerInterface.RelayConnectionRequest.toObject = function(includeInstance, msg) { var f, obj = { - pubKey: jspb.Message.getFieldWithDefault(msg, 1, ""), - addressesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, - connectedAddr: jspb.Message.getFieldWithDefault(msg, 3, "") + publicKey: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -583,23 +1515,23 @@ proto.peer.PeerInfoMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.peer.PeerInfoMessage} + * @return {!proto.peerInterface.RelayConnectionRequest} */ -proto.peer.PeerInfoMessage.deserializeBinary = function(bytes) { +proto.peerInterface.RelayConnectionRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.peer.PeerInfoMessage; - return proto.peer.PeerInfoMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.peerInterface.RelayConnectionRequest; + return proto.peerInterface.RelayConnectionRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.peer.PeerInfoMessage} msg The message object to deserialize into. + * @param {!proto.peerInterface.RelayConnectionRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.peer.PeerInfoMessage} + * @return {!proto.peerInterface.RelayConnectionRequest} */ -proto.peer.PeerInfoMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.peerInterface.RelayConnectionRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -608,15 +1540,7 @@ proto.peer.PeerInfoMessage.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPubKey(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.addAddresses(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setConnectedAddr(value); + msg.setPublicKey(value); break; default: reader.skipField(); @@ -631,9 +1555,9 @@ proto.peer.PeerInfoMessage.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.peer.PeerInfoMessage.prototype.serializeBinary = function() { +proto.peerInterface.RelayConnectionRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.peer.PeerInfoMessage.serializeBinaryToWriter(this, writer); + proto.peerInterface.RelayConnectionRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -641,106 +1565,167 @@ proto.peer.PeerInfoMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.peer.PeerInfoMessage} message + * @param {!proto.peerInterface.RelayConnectionRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.peer.PeerInfoMessage.serializeBinaryToWriter = function(message, writer) { +proto.peerInterface.RelayConnectionRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPubKey(); + f = message.getPublicKey(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getAddressesList(); - if (f.length > 0) { - writer.writeRepeatedString( - 2, - f - ); - } - f = message.getConnectedAddr(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } }; /** - * optional string pub_key = 1; + * optional string public_key = 1; * @return {string} */ -proto.peer.PeerInfoMessage.prototype.getPubKey = function() { +proto.peerInterface.RelayConnectionRequest.prototype.getPublicKey = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.peer.PeerInfoMessage} returns this + * @return {!proto.peerInterface.RelayConnectionRequest} returns this */ -proto.peer.PeerInfoMessage.prototype.setPubKey = function(value) { +proto.peerInterface.RelayConnectionRequest.prototype.setPublicKey = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * repeated string addresses = 2; - * @return {!Array} + * 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.peer.PeerInfoMessage.prototype.getAddressesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +proto.peerInterface.RelayConnectionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.peerInterface.RelayConnectionResponse.toObject(opt_includeInstance, this); }; /** - * @param {!Array} value - * @return {!proto.peer.PeerInfoMessage} 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.peerInterface.RelayConnectionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.peer.PeerInfoMessage.prototype.setAddressesList = function(value) { - return jspb.Message.setField(this, 2, value || []); +proto.peerInterface.RelayConnectionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + serverAddress: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.peer.PeerInfoMessage} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.peerInterface.RelayConnectionResponse} */ -proto.peer.PeerInfoMessage.prototype.addAddresses = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +proto.peerInterface.RelayConnectionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.peerInterface.RelayConnectionResponse; + return proto.peerInterface.RelayConnectionResponse.deserializeBinaryFromReader(msg, reader); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.peer.PeerInfoMessage} returns this + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.peerInterface.RelayConnectionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.peerInterface.RelayConnectionResponse} + */ +proto.peerInterface.RelayConnectionResponse.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.setServerAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.peerInterface.RelayConnectionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.peerInterface.RelayConnectionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.peerInterface.RelayConnectionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.peer.PeerInfoMessage.prototype.clearAddressesList = function() { - return this.setAddressesList([]); +proto.peerInterface.RelayConnectionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServerAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } }; /** - * optional string connected_addr = 3; + * optional string server_address = 1; * @return {string} */ -proto.peer.PeerInfoMessage.prototype.getConnectedAddr = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.peerInterface.RelayConnectionResponse.prototype.getServerAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.peer.PeerInfoMessage} returns this + * @return {!proto.peerInterface.RelayConnectionResponse} returns this */ -proto.peer.PeerInfoMessage.prototype.setConnectedAddr = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.peerInterface.RelayConnectionResponse.prototype.setServerAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -760,8 +1745,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.peer.PeerMessage.prototype.toObject = function(opt_includeInstance) { - return proto.peer.PeerMessage.toObject(opt_includeInstance, this); +proto.peerInterface.PeerConnectionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.peerInterface.PeerConnectionRequest.toObject(opt_includeInstance, this); }; @@ -770,15 +1755,13 @@ proto.peer.PeerMessage.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.peer.PeerMessage} msg The msg instance to transform. + * @param {!proto.peerInterface.PeerConnectionRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.peer.PeerMessage.toObject = function(includeInstance, msg) { +proto.peerInterface.PeerConnectionRequest.toObject = function(includeInstance, msg) { var f, obj = { - publickey: jspb.Message.getFieldWithDefault(msg, 1, ""), - type: jspb.Message.getFieldWithDefault(msg, 2, 0), - submessage: jspb.Message.getFieldWithDefault(msg, 3, "") + publicKey: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -792,23 +1775,23 @@ proto.peer.PeerMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.peer.PeerMessage} + * @return {!proto.peerInterface.PeerConnectionRequest} */ -proto.peer.PeerMessage.deserializeBinary = function(bytes) { +proto.peerInterface.PeerConnectionRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.peer.PeerMessage; - return proto.peer.PeerMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.peerInterface.PeerConnectionRequest; + return proto.peerInterface.PeerConnectionRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.peer.PeerMessage} msg The message object to deserialize into. + * @param {!proto.peerInterface.PeerConnectionRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.peer.PeerMessage} + * @return {!proto.peerInterface.PeerConnectionRequest} */ -proto.peer.PeerMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.peerInterface.PeerConnectionRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -817,15 +1800,7 @@ proto.peer.PeerMessage.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPublickey(value); - break; - case 2: - var value = /** @type {!proto.peer.SubServiceType} */ (reader.readEnum()); - msg.setType(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setSubmessage(value); + msg.setPublicKey(value); break; default: reader.skipField(); @@ -840,9 +1815,9 @@ proto.peer.PeerMessage.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.peer.PeerMessage.prototype.serializeBinary = function() { +proto.peerInterface.PeerConnectionRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.peer.PeerMessage.serializeBinaryToWriter(this, writer); + proto.peerInterface.PeerConnectionRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -850,90 +1825,40 @@ proto.peer.PeerMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.peer.PeerMessage} message + * @param {!proto.peerInterface.PeerConnectionRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.peer.PeerMessage.serializeBinaryToWriter = function(message, writer) { +proto.peerInterface.PeerConnectionRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPublickey(); + f = message.getPublicKey(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getSubmessage(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } }; /** - * optional string publicKey = 1; + * optional string public_key = 1; * @return {string} */ -proto.peer.PeerMessage.prototype.getPublickey = function() { +proto.peerInterface.PeerConnectionRequest.prototype.getPublicKey = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.peer.PeerMessage} returns this + * @return {!proto.peerInterface.PeerConnectionRequest} returns this */ -proto.peer.PeerMessage.prototype.setPublickey = function(value) { +proto.peerInterface.PeerConnectionRequest.prototype.setPublicKey = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * optional SubServiceType type = 2; - * @return {!proto.peer.SubServiceType} - */ -proto.peer.PeerMessage.prototype.getType = function() { - return /** @type {!proto.peer.SubServiceType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.peer.SubServiceType} value - * @return {!proto.peer.PeerMessage} returns this - */ -proto.peer.PeerMessage.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional string subMessage = 3; - * @return {string} - */ -proto.peer.PeerMessage.prototype.getSubmessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.peer.PeerMessage} returns this - */ -proto.peer.PeerMessage.prototype.setSubmessage = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - @@ -950,8 +1875,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.peer.NatMessage.prototype.toObject = function(opt_includeInstance) { - return proto.peer.NatMessage.toObject(opt_includeInstance, this); +proto.peerInterface.PeerConnectionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.peerInterface.PeerConnectionResponse.toObject(opt_includeInstance, this); }; @@ -960,15 +1885,13 @@ proto.peer.NatMessage.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.peer.NatMessage} msg The msg instance to transform. + * @param {!proto.peerInterface.PeerConnectionResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.peer.NatMessage.toObject = function(includeInstance, msg) { +proto.peerInterface.PeerConnectionResponse.toObject = function(includeInstance, msg) { var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - isresponse: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - submessage: msg.getSubmessage_asB64() + peerAddress: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -982,23 +1905,23 @@ proto.peer.NatMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.peer.NatMessage} + * @return {!proto.peerInterface.PeerConnectionResponse} */ -proto.peer.NatMessage.deserializeBinary = function(bytes) { +proto.peerInterface.PeerConnectionResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.peer.NatMessage; - return proto.peer.NatMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.peerInterface.PeerConnectionResponse; + return proto.peerInterface.PeerConnectionResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.peer.NatMessage} msg The message object to deserialize into. + * @param {!proto.peerInterface.PeerConnectionResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.peer.NatMessage} + * @return {!proto.peerInterface.PeerConnectionResponse} */ -proto.peer.NatMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.peerInterface.PeerConnectionResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1006,16 +1929,8 @@ proto.peer.NatMessage.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.peer.NatMessageType} */ (reader.readEnum()); - msg.setType(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsresponse(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSubmessage(value); + var value = /** @type {string} */ (reader.readString()); + msg.setPeerAddress(value); break; default: reader.skipField(); @@ -1030,9 +1945,9 @@ proto.peer.NatMessage.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.peer.NatMessage.prototype.serializeBinary = function() { +proto.peerInterface.PeerConnectionResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.peer.NatMessage.serializeBinaryToWriter(this, writer); + proto.peerInterface.PeerConnectionResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1040,30 +1955,16 @@ proto.peer.NatMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.peer.NatMessage} message + * @param {!proto.peerInterface.PeerConnectionResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.peer.NatMessage.serializeBinaryToWriter = function(message, writer) { +proto.peerInterface.PeerConnectionResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getIsresponse(); - if (f) { - writer.writeBool( - 2, - f - ); - } - f = message.getSubmessage_asU8(); + f = message.getPeerAddress(); if (f.length > 0) { - writer.writeBytes( - 3, + writer.writeString( + 1, f ); } @@ -1071,80 +1972,20 @@ proto.peer.NatMessage.serializeBinaryToWriter = function(message, writer) { /** - * optional NatMessageType type = 1; - * @return {!proto.peer.NatMessageType} - */ -proto.peer.NatMessage.prototype.getType = function() { - return /** @type {!proto.peer.NatMessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.peer.NatMessageType} value - * @return {!proto.peer.NatMessage} returns this - */ -proto.peer.NatMessage.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional bool isResponse = 2; - * @return {boolean} - */ -proto.peer.NatMessage.prototype.getIsresponse = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.peer.NatMessage} returns this - */ -proto.peer.NatMessage.prototype.setIsresponse = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional bytes subMessage = 3; - * @return {!(string|Uint8Array)} - */ -proto.peer.NatMessage.prototype.getSubmessage = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes subMessage = 3; - * This is a type-conversion wrapper around `getSubmessage()` + * optional string peer_address = 1; * @return {string} */ -proto.peer.NatMessage.prototype.getSubmessage_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSubmessage())); -}; - - -/** - * optional bytes subMessage = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSubmessage()` - * @return {!Uint8Array} - */ -proto.peer.NatMessage.prototype.getSubmessage_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSubmessage())); +proto.peerInterface.PeerConnectionResponse.prototype.getPeerAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.peer.NatMessage} returns this + * @param {string} value + * @return {!proto.peerInterface.PeerConnectionResponse} returns this */ -proto.peer.NatMessage.prototype.setSubmessage = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); +proto.peerInterface.PeerConnectionResponse.prototype.setPeerAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1164,8 +2005,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.peer.ErrorMessage.prototype.toObject = function(opt_includeInstance) { - return proto.peer.ErrorMessage.toObject(opt_includeInstance, this); +proto.peerInterface.UDPAddressResponse.prototype.toObject = function(opt_includeInstance) { + return proto.peerInterface.UDPAddressResponse.toObject(opt_includeInstance, this); }; @@ -1174,13 +2015,13 @@ proto.peer.ErrorMessage.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.peer.ErrorMessage} msg The msg instance to transform. + * @param {!proto.peerInterface.UDPAddressResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.peer.ErrorMessage.toObject = function(includeInstance, msg) { +proto.peerInterface.UDPAddressResponse.toObject = function(includeInstance, msg) { var f, obj = { - error: jspb.Message.getFieldWithDefault(msg, 1, "") + address: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -1194,23 +2035,23 @@ proto.peer.ErrorMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.peer.ErrorMessage} + * @return {!proto.peerInterface.UDPAddressResponse} */ -proto.peer.ErrorMessage.deserializeBinary = function(bytes) { +proto.peerInterface.UDPAddressResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.peer.ErrorMessage; - return proto.peer.ErrorMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.peerInterface.UDPAddressResponse; + return proto.peerInterface.UDPAddressResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.peer.ErrorMessage} msg The message object to deserialize into. + * @param {!proto.peerInterface.UDPAddressResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.peer.ErrorMessage} + * @return {!proto.peerInterface.UDPAddressResponse} */ -proto.peer.ErrorMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.peerInterface.UDPAddressResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1219,7 +2060,7 @@ proto.peer.ErrorMessage.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setError(value); + msg.setAddress(value); break; default: reader.skipField(); @@ -1234,9 +2075,9 @@ proto.peer.ErrorMessage.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.peer.ErrorMessage.prototype.serializeBinary = function() { +proto.peerInterface.UDPAddressResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.peer.ErrorMessage.serializeBinaryToWriter(this, writer); + proto.peerInterface.UDPAddressResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1244,13 +2085,13 @@ proto.peer.ErrorMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.peer.ErrorMessage} message + * @param {!proto.peerInterface.UDPAddressResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.peer.ErrorMessage.serializeBinaryToWriter = function(message, writer) { +proto.peerInterface.UDPAddressResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getError(); + f = message.getAddress(); if (f.length > 0) { writer.writeString( 1, @@ -1261,19 +2102,19 @@ proto.peer.ErrorMessage.serializeBinaryToWriter = function(message, writer) { /** - * optional string error = 1; + * optional string address = 1; * @return {string} */ -proto.peer.ErrorMessage.prototype.getError = function() { +proto.peerInterface.UDPAddressResponse.prototype.getAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.peer.ErrorMessage} returns this + * @return {!proto.peerInterface.UDPAddressResponse} returns this */ -proto.peer.ErrorMessage.prototype.setError = function(value) { +proto.peerInterface.UDPAddressResponse.prototype.setAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1294,8 +2135,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.peer.RelayConnectionRequest.prototype.toObject = function(opt_includeInstance) { - return proto.peer.RelayConnectionRequest.toObject(opt_includeInstance, this); +proto.peerInterface.HolePunchRegisterRequest.prototype.toObject = function(opt_includeInstance) { + return proto.peerInterface.HolePunchRegisterRequest.toObject(opt_includeInstance, this); }; @@ -1304,13 +2145,13 @@ proto.peer.RelayConnectionRequest.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.peer.RelayConnectionRequest} msg The msg instance to transform. + * @param {!proto.peerInterface.HolePunchRegisterRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.peer.RelayConnectionRequest.toObject = function(includeInstance, msg) { +proto.peerInterface.HolePunchRegisterRequest.toObject = function(includeInstance, msg) { var f, obj = { - publickey: jspb.Message.getFieldWithDefault(msg, 1, "") + publicKey: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -1324,23 +2165,23 @@ proto.peer.RelayConnectionRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.peer.RelayConnectionRequest} + * @return {!proto.peerInterface.HolePunchRegisterRequest} */ -proto.peer.RelayConnectionRequest.deserializeBinary = function(bytes) { +proto.peerInterface.HolePunchRegisterRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.peer.RelayConnectionRequest; - return proto.peer.RelayConnectionRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.peerInterface.HolePunchRegisterRequest; + return proto.peerInterface.HolePunchRegisterRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.peer.RelayConnectionRequest} msg The message object to deserialize into. + * @param {!proto.peerInterface.HolePunchRegisterRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.peer.RelayConnectionRequest} + * @return {!proto.peerInterface.HolePunchRegisterRequest} */ -proto.peer.RelayConnectionRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.peerInterface.HolePunchRegisterRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1349,7 +2190,7 @@ proto.peer.RelayConnectionRequest.deserializeBinaryFromReader = function(msg, re switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPublickey(value); + msg.setPublicKey(value); break; default: reader.skipField(); @@ -1364,9 +2205,9 @@ proto.peer.RelayConnectionRequest.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.peer.RelayConnectionRequest.prototype.serializeBinary = function() { +proto.peerInterface.HolePunchRegisterRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.peer.RelayConnectionRequest.serializeBinaryToWriter(this, writer); + proto.peerInterface.HolePunchRegisterRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1374,13 +2215,13 @@ proto.peer.RelayConnectionRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.peer.RelayConnectionRequest} message + * @param {!proto.peerInterface.HolePunchRegisterRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.peer.RelayConnectionRequest.serializeBinaryToWriter = function(message, writer) { +proto.peerInterface.HolePunchRegisterRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPublickey(); + f = message.getPublicKey(); if (f.length > 0) { writer.writeString( 1, @@ -1391,19 +2232,19 @@ proto.peer.RelayConnectionRequest.serializeBinaryToWriter = function(message, wr /** - * optional string publicKey = 1; + * optional string public_key = 1; * @return {string} */ -proto.peer.RelayConnectionRequest.prototype.getPublickey = function() { +proto.peerInterface.HolePunchRegisterRequest.prototype.getPublicKey = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.peer.RelayConnectionRequest} returns this + * @return {!proto.peerInterface.HolePunchRegisterRequest} returns this */ -proto.peer.RelayConnectionRequest.prototype.setPublickey = function(value) { +proto.peerInterface.HolePunchRegisterRequest.prototype.setPublicKey = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1424,8 +2265,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.peer.RelayConnectionResponse.prototype.toObject = function(opt_includeInstance) { - return proto.peer.RelayConnectionResponse.toObject(opt_includeInstance, this); +proto.peerInterface.HolePunchRegisterResponse.prototype.toObject = function(opt_includeInstance) { + return proto.peerInterface.HolePunchRegisterResponse.toObject(opt_includeInstance, this); }; @@ -1434,14 +2275,13 @@ proto.peer.RelayConnectionResponse.prototype.toObject = function(opt_includeInst * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.peer.RelayConnectionResponse} msg The msg instance to transform. + * @param {!proto.peerInterface.HolePunchRegisterResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.peer.RelayConnectionResponse.toObject = function(includeInstance, msg) { +proto.peerInterface.HolePunchRegisterResponse.toObject = function(includeInstance, msg) { var f, obj = { - incomingaddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - outgoingaddress: jspb.Message.getFieldWithDefault(msg, 2, "") + connectedAddress: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -1455,23 +2295,23 @@ proto.peer.RelayConnectionResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.peer.RelayConnectionResponse} + * @return {!proto.peerInterface.HolePunchRegisterResponse} */ -proto.peer.RelayConnectionResponse.deserializeBinary = function(bytes) { +proto.peerInterface.HolePunchRegisterResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.peer.RelayConnectionResponse; - return proto.peer.RelayConnectionResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.peerInterface.HolePunchRegisterResponse; + return proto.peerInterface.HolePunchRegisterResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.peer.RelayConnectionResponse} msg The message object to deserialize into. + * @param {!proto.peerInterface.HolePunchRegisterResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.peer.RelayConnectionResponse} + * @return {!proto.peerInterface.HolePunchRegisterResponse} */ -proto.peer.RelayConnectionResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.peerInterface.HolePunchRegisterResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1480,11 +2320,7 @@ proto.peer.RelayConnectionResponse.deserializeBinaryFromReader = function(msg, r switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setIncomingaddress(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setOutgoingaddress(value); + msg.setConnectedAddress(value); break; default: reader.skipField(); @@ -1499,9 +2335,9 @@ proto.peer.RelayConnectionResponse.deserializeBinaryFromReader = function(msg, r * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.peer.RelayConnectionResponse.prototype.serializeBinary = function() { +proto.peerInterface.HolePunchRegisterResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.peer.RelayConnectionResponse.serializeBinaryToWriter(this, writer); + proto.peerInterface.HolePunchRegisterResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1509,65 +2345,40 @@ proto.peer.RelayConnectionResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.peer.RelayConnectionResponse} message + * @param {!proto.peerInterface.HolePunchRegisterResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.peer.RelayConnectionResponse.serializeBinaryToWriter = function(message, writer) { +proto.peerInterface.HolePunchRegisterResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIncomingaddress(); + f = message.getConnectedAddress(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getOutgoingaddress(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } }; /** - * optional string incomingAddress = 1; + * optional string connected_address = 1; * @return {string} */ -proto.peer.RelayConnectionResponse.prototype.getIncomingaddress = function() { +proto.peerInterface.HolePunchRegisterResponse.prototype.getConnectedAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.peer.RelayConnectionResponse} returns this + * @return {!proto.peerInterface.HolePunchRegisterResponse} returns this */ -proto.peer.RelayConnectionResponse.prototype.setIncomingaddress = function(value) { +proto.peerInterface.HolePunchRegisterResponse.prototype.setConnectedAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * optional string outgoingAddress = 2; - * @return {string} - */ -proto.peer.RelayConnectionResponse.prototype.getOutgoingaddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.peer.RelayConnectionResponse} returns this - */ -proto.peer.RelayConnectionResponse.prototype.setOutgoingaddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - @@ -1584,8 +2395,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.peer.PeerConnectionRequest.prototype.toObject = function(opt_includeInstance) { - return proto.peer.PeerConnectionRequest.toObject(opt_includeInstance, this); +proto.peerInterface.PeerUdpAddressRequest.prototype.toObject = function(opt_includeInstance) { + return proto.peerInterface.PeerUdpAddressRequest.toObject(opt_includeInstance, this); }; @@ -1594,13 +2405,13 @@ proto.peer.PeerConnectionRequest.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.peer.PeerConnectionRequest} msg The msg instance to transform. + * @param {!proto.peerInterface.PeerUdpAddressRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.peer.PeerConnectionRequest.toObject = function(includeInstance, msg) { +proto.peerInterface.PeerUdpAddressRequest.toObject = function(includeInstance, msg) { var f, obj = { - publickey: jspb.Message.getFieldWithDefault(msg, 1, "") + publicKey: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -1614,23 +2425,23 @@ proto.peer.PeerConnectionRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.peer.PeerConnectionRequest} + * @return {!proto.peerInterface.PeerUdpAddressRequest} */ -proto.peer.PeerConnectionRequest.deserializeBinary = function(bytes) { +proto.peerInterface.PeerUdpAddressRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.peer.PeerConnectionRequest; - return proto.peer.PeerConnectionRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.peerInterface.PeerUdpAddressRequest; + return proto.peerInterface.PeerUdpAddressRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.peer.PeerConnectionRequest} msg The message object to deserialize into. + * @param {!proto.peerInterface.PeerUdpAddressRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.peer.PeerConnectionRequest} + * @return {!proto.peerInterface.PeerUdpAddressRequest} */ -proto.peer.PeerConnectionRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.peerInterface.PeerUdpAddressRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1639,7 +2450,7 @@ proto.peer.PeerConnectionRequest.deserializeBinaryFromReader = function(msg, rea switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPublickey(value); + msg.setPublicKey(value); break; default: reader.skipField(); @@ -1654,9 +2465,9 @@ proto.peer.PeerConnectionRequest.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.peer.PeerConnectionRequest.prototype.serializeBinary = function() { +proto.peerInterface.PeerUdpAddressRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.peer.PeerConnectionRequest.serializeBinaryToWriter(this, writer); + proto.peerInterface.PeerUdpAddressRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1664,13 +2475,13 @@ proto.peer.PeerConnectionRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.peer.PeerConnectionRequest} message + * @param {!proto.peerInterface.PeerUdpAddressRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.peer.PeerConnectionRequest.serializeBinaryToWriter = function(message, writer) { +proto.peerInterface.PeerUdpAddressRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPublickey(); + f = message.getPublicKey(); if (f.length > 0) { writer.writeString( 1, @@ -1681,19 +2492,19 @@ proto.peer.PeerConnectionRequest.serializeBinaryToWriter = function(message, wri /** - * optional string publicKey = 1; + * optional string public_key = 1; * @return {string} */ -proto.peer.PeerConnectionRequest.prototype.getPublickey = function() { +proto.peerInterface.PeerUdpAddressRequest.prototype.getPublicKey = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.peer.PeerConnectionRequest} returns this + * @return {!proto.peerInterface.PeerUdpAddressRequest} returns this */ -proto.peer.PeerConnectionRequest.prototype.setPublickey = function(value) { +proto.peerInterface.PeerUdpAddressRequest.prototype.setPublicKey = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1714,8 +2525,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.peer.PeerConnectionResponse.prototype.toObject = function(opt_includeInstance) { - return proto.peer.PeerConnectionResponse.toObject(opt_includeInstance, this); +proto.peerInterface.PeerUdpAddressResponse.prototype.toObject = function(opt_includeInstance) { + return proto.peerInterface.PeerUdpAddressResponse.toObject(opt_includeInstance, this); }; @@ -1724,11 +2535,11 @@ proto.peer.PeerConnectionResponse.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.peer.PeerConnectionResponse} msg The msg instance to transform. + * @param {!proto.peerInterface.PeerUdpAddressResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.peer.PeerConnectionResponse.toObject = function(includeInstance, msg) { +proto.peerInterface.PeerUdpAddressResponse.toObject = function(includeInstance, msg) { var f, obj = { address: jspb.Message.getFieldWithDefault(msg, 1, "") }; @@ -1744,23 +2555,23 @@ proto.peer.PeerConnectionResponse.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.peer.PeerConnectionResponse} + * @return {!proto.peerInterface.PeerUdpAddressResponse} */ -proto.peer.PeerConnectionResponse.deserializeBinary = function(bytes) { +proto.peerInterface.PeerUdpAddressResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.peer.PeerConnectionResponse; - return proto.peer.PeerConnectionResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.peerInterface.PeerUdpAddressResponse; + return proto.peerInterface.PeerUdpAddressResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.peer.PeerConnectionResponse} msg The message object to deserialize into. + * @param {!proto.peerInterface.PeerUdpAddressResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.peer.PeerConnectionResponse} + * @return {!proto.peerInterface.PeerUdpAddressResponse} */ -proto.peer.PeerConnectionResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.peerInterface.PeerUdpAddressResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1784,9 +2595,9 @@ proto.peer.PeerConnectionResponse.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.peer.PeerConnectionResponse.prototype.serializeBinary = function() { +proto.peerInterface.PeerUdpAddressResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.peer.PeerConnectionResponse.serializeBinaryToWriter(this, writer); + proto.peerInterface.PeerUdpAddressResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1794,11 +2605,11 @@ proto.peer.PeerConnectionResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.peer.PeerConnectionResponse} message + * @param {!proto.peerInterface.PeerUdpAddressResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.peer.PeerConnectionResponse.serializeBinaryToWriter = function(message, writer) { +proto.peerInterface.PeerUdpAddressResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAddress(); if (f.length > 0) { @@ -1814,16 +2625,16 @@ proto.peer.PeerConnectionResponse.serializeBinaryToWriter = function(message, wr * optional string address = 1; * @return {string} */ -proto.peer.PeerConnectionResponse.prototype.getAddress = function() { +proto.peerInterface.PeerUdpAddressResponse.prototype.getAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.peer.PeerConnectionResponse} returns this + * @return {!proto.peerInterface.PeerUdpAddressResponse} returns this */ -proto.peer.PeerConnectionResponse.prototype.setAddress = function(value) { +proto.peerInterface.PeerUdpAddressResponse.prototype.setAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1831,7 +2642,7 @@ proto.peer.PeerConnectionResponse.prototype.setAddress = function(value) { /** * @enum {number} */ -proto.peer.SubServiceType = { +proto.peerInterface.SubServiceType = { PING_PEER: 0, GIT: 1, NAT_TRAVERSAL: 2 @@ -1840,10 +2651,12 @@ proto.peer.SubServiceType = { /** * @enum {number} */ -proto.peer.NatMessageType = { +proto.peerInterface.NatMessageType = { ERROR: 0, RELAY_CONNECTION: 1, - PEER_CONNECTION: 2 + PEER_CONNECTION: 2, + UDP_ADDRESS: 3, + PEER_UDP_ADDRESS: 4 }; -goog.object.extend(exports, proto.peer); +goog.object.extend(exports, proto.peerInterface); diff --git a/proto/js/Agent.d.ts b/proto/js/Agent.d.ts index b8909b2c9a..d288961232 100644 --- a/proto/js/Agent.d.ts +++ b/proto/js/Agent.d.ts @@ -7,4408 +7,1953 @@ declare namespace Agent { /** Namespace agentInterface. */ namespace agentInterface { - /** AgentMessageType enum. */ - enum AgentMessageType { - ERROR = 0, - STOP_AGENT = 1, - STATUS = 2, - REGISTER_NODE = 3, - NEW_NODE = 4, - LIST_NODES = 5, - DERIVE_KEY = 6, - SIGN_FILE = 7, - VERIFY_FILE = 8, - LIST_VAULTS = 9, - NEW_VAULT = 10, - DESTROY_VAULT = 11, - LIST_SECRETS = 12, - CREATE_SECRET = 13, - DESTROY_SECRET = 14, - GET_SECRET = 15, - LIST_KEYS = 16, - GET_KEY = 17, - DELETE_KEY = 18, - ENCRYPT_FILE = 19, - DECRYPT_FILE = 20, - GET_PRIMARY_KEYPAIR = 21, - UPDATE_SECRET = 22, - GET_PEER_INFO = 23, - ADD_PEER = 24, - PULL_VAULT = 26, - PING_PEER = 27, - FIND_PEER = 28, - FIND_SOCIAL_PEER = 29, - LIST_PEERS = 30, - TOGGLE_STEALTH = 31, - UPDATE_PEER_INFO = 32, - REQUEST_RELAY = 33, - REQUEST_PUNCH = 34, - SCAN_VAULT_NAMES = 35 - } - - /** Properties of an AgentMessage. */ - interface IAgentMessage { - - /** AgentMessage type */ - type?: (agentInterface.AgentMessageType|null); - - /** AgentMessage isResponse */ - isResponse?: (boolean|null); - - /** AgentMessage nodePath */ - nodePath?: (string|null); - - /** AgentMessage subMessage */ - subMessage?: (Uint8Array|null); - } - - /** Represents an AgentMessage. */ - class AgentMessage implements IAgentMessage { - - /** - * Constructs a new AgentMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IAgentMessage); - - /** AgentMessage type. */ - public type: agentInterface.AgentMessageType; - - /** AgentMessage isResponse. */ - public isResponse: boolean; - - /** AgentMessage nodePath. */ - public nodePath: string; - - /** AgentMessage subMessage. */ - public subMessage: Uint8Array; - - /** - * Creates a new AgentMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns AgentMessage instance - */ - public static create(properties?: agentInterface.IAgentMessage): agentInterface.AgentMessage; - - /** - * Encodes the specified AgentMessage message. Does not implicitly {@link agentInterface.AgentMessage.verify|verify} messages. - * @param m AgentMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IAgentMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AgentMessage message, length delimited. Does not implicitly {@link agentInterface.AgentMessage.verify|verify} messages. - * @param message AgentMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IAgentMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AgentMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns AgentMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.AgentMessage; - - /** - * Decodes an AgentMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AgentMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.AgentMessage; - } - - /** Properties of an ErrorMessage. */ - interface IErrorMessage { - - /** ErrorMessage error */ - error?: (string|null); - } - - /** Represents an ErrorMessage. */ - class ErrorMessage implements IErrorMessage { - - /** - * Constructs a new ErrorMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IErrorMessage); - - /** ErrorMessage error. */ - public error: string; - - /** - * Creates a new ErrorMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ErrorMessage instance - */ - public static create(properties?: agentInterface.IErrorMessage): agentInterface.ErrorMessage; - - /** - * Encodes the specified ErrorMessage message. Does not implicitly {@link agentInterface.ErrorMessage.verify|verify} messages. - * @param m ErrorMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IErrorMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ErrorMessage message, length delimited. Does not implicitly {@link agentInterface.ErrorMessage.verify|verify} messages. - * @param message ErrorMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IErrorMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ErrorMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ErrorMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.ErrorMessage; - - /** - * Decodes an ErrorMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ErrorMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.ErrorMessage; - } - - /** AgentStatusType enum. */ - enum AgentStatusType { - ONLINE = 0, - OFFLINE = 1, - ERRORED = 2 - } - - /** Properties of an AgentStatusResponseMessage. */ - interface IAgentStatusResponseMessage { - - /** AgentStatusResponseMessage status */ - status?: (agentInterface.AgentStatusType|null); - } - - /** Represents an AgentStatusResponseMessage. */ - class AgentStatusResponseMessage implements IAgentStatusResponseMessage { - - /** - * Constructs a new AgentStatusResponseMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IAgentStatusResponseMessage); - - /** AgentStatusResponseMessage status. */ - public status: agentInterface.AgentStatusType; - - /** - * Creates a new AgentStatusResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns AgentStatusResponseMessage instance - */ - public static create(properties?: agentInterface.IAgentStatusResponseMessage): agentInterface.AgentStatusResponseMessage; - - /** - * Encodes the specified AgentStatusResponseMessage message. Does not implicitly {@link agentInterface.AgentStatusResponseMessage.verify|verify} messages. - * @param m AgentStatusResponseMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IAgentStatusResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AgentStatusResponseMessage message, length delimited. Does not implicitly {@link agentInterface.AgentStatusResponseMessage.verify|verify} messages. - * @param message AgentStatusResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IAgentStatusResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AgentStatusResponseMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns AgentStatusResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.AgentStatusResponseMessage; - - /** - * Decodes an AgentStatusResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AgentStatusResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.AgentStatusResponseMessage; - } - - /** Properties of a RegisterNodeRequestMessage. */ - interface IRegisterNodeRequestMessage { - - /** RegisterNodeRequestMessage passphrase */ - passphrase?: (string|null); - } - - /** Represents a RegisterNodeRequestMessage. */ - class RegisterNodeRequestMessage implements IRegisterNodeRequestMessage { - - /** - * Constructs a new RegisterNodeRequestMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IRegisterNodeRequestMessage); - - /** RegisterNodeRequestMessage passphrase. */ - public passphrase: string; - - /** - * Creates a new RegisterNodeRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns RegisterNodeRequestMessage instance - */ - public static create(properties?: agentInterface.IRegisterNodeRequestMessage): agentInterface.RegisterNodeRequestMessage; - - /** - * Encodes the specified RegisterNodeRequestMessage message. Does not implicitly {@link agentInterface.RegisterNodeRequestMessage.verify|verify} messages. - * @param m RegisterNodeRequestMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IRegisterNodeRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RegisterNodeRequestMessage message, length delimited. Does not implicitly {@link agentInterface.RegisterNodeRequestMessage.verify|verify} messages. - * @param message RegisterNodeRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IRegisterNodeRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RegisterNodeRequestMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns RegisterNodeRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.RegisterNodeRequestMessage; - - /** - * Decodes a RegisterNodeRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RegisterNodeRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.RegisterNodeRequestMessage; - } - - /** Properties of a RegisterNodeResponseMessage. */ - interface IRegisterNodeResponseMessage { - - /** RegisterNodeResponseMessage successful */ - successful?: (boolean|null); - } - - /** Represents a RegisterNodeResponseMessage. */ - class RegisterNodeResponseMessage implements IRegisterNodeResponseMessage { - - /** - * Constructs a new RegisterNodeResponseMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IRegisterNodeResponseMessage); - - /** RegisterNodeResponseMessage successful. */ - public successful: boolean; - - /** - * Creates a new RegisterNodeResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns RegisterNodeResponseMessage instance - */ - public static create(properties?: agentInterface.IRegisterNodeResponseMessage): agentInterface.RegisterNodeResponseMessage; - - /** - * Encodes the specified RegisterNodeResponseMessage message. Does not implicitly {@link agentInterface.RegisterNodeResponseMessage.verify|verify} messages. - * @param m RegisterNodeResponseMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IRegisterNodeResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RegisterNodeResponseMessage message, length delimited. Does not implicitly {@link agentInterface.RegisterNodeResponseMessage.verify|verify} messages. - * @param message RegisterNodeResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IRegisterNodeResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RegisterNodeResponseMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns RegisterNodeResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.RegisterNodeResponseMessage; - - /** - * Decodes a RegisterNodeResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RegisterNodeResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.RegisterNodeResponseMessage; - } - - /** Properties of a NewNodeRequestMessage. */ - interface INewNodeRequestMessage { - - /** NewNodeRequestMessage userId */ - userId?: (string|null); - - /** NewNodeRequestMessage passphrase */ - passphrase?: (string|null); - - /** NewNodeRequestMessage nbits */ - nbits?: (number|null); - } - - /** Represents a NewNodeRequestMessage. */ - class NewNodeRequestMessage implements INewNodeRequestMessage { - - /** - * Constructs a new NewNodeRequestMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.INewNodeRequestMessage); - - /** NewNodeRequestMessage userId. */ - public userId: string; - - /** NewNodeRequestMessage passphrase. */ - public passphrase: string; - - /** NewNodeRequestMessage nbits. */ - public nbits: number; - - /** - * Creates a new NewNodeRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns NewNodeRequestMessage instance - */ - public static create(properties?: agentInterface.INewNodeRequestMessage): agentInterface.NewNodeRequestMessage; - - /** - * Encodes the specified NewNodeRequestMessage message. Does not implicitly {@link agentInterface.NewNodeRequestMessage.verify|verify} messages. - * @param m NewNodeRequestMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.INewNodeRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NewNodeRequestMessage message, length delimited. Does not implicitly {@link agentInterface.NewNodeRequestMessage.verify|verify} messages. - * @param message NewNodeRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.INewNodeRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NewNodeRequestMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns NewNodeRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.NewNodeRequestMessage; - - /** - * Decodes a NewNodeRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NewNodeRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.NewNodeRequestMessage; - } - - /** Properties of a NewNodeResponseMessage. */ - interface INewNodeResponseMessage { - - /** NewNodeResponseMessage successful */ - successful?: (boolean|null); - } - - /** Represents a NewNodeResponseMessage. */ - class NewNodeResponseMessage implements INewNodeResponseMessage { - - /** - * Constructs a new NewNodeResponseMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.INewNodeResponseMessage); - - /** NewNodeResponseMessage successful. */ - public successful: boolean; - - /** - * Creates a new NewNodeResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns NewNodeResponseMessage instance - */ - public static create(properties?: agentInterface.INewNodeResponseMessage): agentInterface.NewNodeResponseMessage; - - /** - * Encodes the specified NewNodeResponseMessage message. Does not implicitly {@link agentInterface.NewNodeResponseMessage.verify|verify} messages. - * @param m NewNodeResponseMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.INewNodeResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NewNodeResponseMessage message, length delimited. Does not implicitly {@link agentInterface.NewNodeResponseMessage.verify|verify} messages. - * @param message NewNodeResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.INewNodeResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NewNodeResponseMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns NewNodeResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.NewNodeResponseMessage; - - /** - * Decodes a NewNodeResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NewNodeResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.NewNodeResponseMessage; - } - - /** Properties of a ListNodesRequestMessage. */ - interface IListNodesRequestMessage { - - /** ListNodesRequestMessage unlockedOnly */ - unlockedOnly?: (boolean|null); - } - - /** Represents a ListNodesRequestMessage. */ - class ListNodesRequestMessage implements IListNodesRequestMessage { - - /** - * Constructs a new ListNodesRequestMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IListNodesRequestMessage); - - /** ListNodesRequestMessage unlockedOnly. */ - public unlockedOnly: boolean; - - /** - * Creates a new ListNodesRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ListNodesRequestMessage instance - */ - public static create(properties?: agentInterface.IListNodesRequestMessage): agentInterface.ListNodesRequestMessage; - - /** - * Encodes the specified ListNodesRequestMessage message. Does not implicitly {@link agentInterface.ListNodesRequestMessage.verify|verify} messages. - * @param m ListNodesRequestMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IListNodesRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListNodesRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ListNodesRequestMessage.verify|verify} messages. - * @param message ListNodesRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IListNodesRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListNodesRequestMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ListNodesRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.ListNodesRequestMessage; - - /** - * Decodes a ListNodesRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListNodesRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.ListNodesRequestMessage; - } - - /** Properties of a ListNodesResponseMessage. */ - interface IListNodesResponseMessage { - - /** ListNodesResponseMessage nodes */ - nodes?: (string[]|null); - } - - /** Represents a ListNodesResponseMessage. */ - class ListNodesResponseMessage implements IListNodesResponseMessage { - - /** - * Constructs a new ListNodesResponseMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IListNodesResponseMessage); - - /** ListNodesResponseMessage nodes. */ - public nodes: string[]; - - /** - * Creates a new ListNodesResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ListNodesResponseMessage instance - */ - public static create(properties?: agentInterface.IListNodesResponseMessage): agentInterface.ListNodesResponseMessage; - - /** - * Encodes the specified ListNodesResponseMessage message. Does not implicitly {@link agentInterface.ListNodesResponseMessage.verify|verify} messages. - * @param m ListNodesResponseMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IListNodesResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListNodesResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ListNodesResponseMessage.verify|verify} messages. - * @param message ListNodesResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IListNodesResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListNodesResponseMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ListNodesResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.ListNodesResponseMessage; - - /** - * Decodes a ListNodesResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListNodesResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.ListNodesResponseMessage; - } - - /** Properties of a SignFileRequestMessage. */ - interface ISignFileRequestMessage { - - /** SignFileRequestMessage filePath */ - filePath?: (string|null); - - /** SignFileRequestMessage privateKeyPath */ - privateKeyPath?: (string|null); - - /** SignFileRequestMessage passphrase */ - passphrase?: (string|null); - } - - /** Represents a SignFileRequestMessage. */ - class SignFileRequestMessage implements ISignFileRequestMessage { - - /** - * Constructs a new SignFileRequestMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.ISignFileRequestMessage); - - /** SignFileRequestMessage filePath. */ - public filePath: string; - - /** SignFileRequestMessage privateKeyPath. */ - public privateKeyPath: string; - - /** SignFileRequestMessage passphrase. */ - public passphrase: string; - - /** - * Creates a new SignFileRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns SignFileRequestMessage instance - */ - public static create(properties?: agentInterface.ISignFileRequestMessage): agentInterface.SignFileRequestMessage; - - /** - * Encodes the specified SignFileRequestMessage message. Does not implicitly {@link agentInterface.SignFileRequestMessage.verify|verify} messages. - * @param m SignFileRequestMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.ISignFileRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SignFileRequestMessage message, length delimited. Does not implicitly {@link agentInterface.SignFileRequestMessage.verify|verify} messages. - * @param message SignFileRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.ISignFileRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SignFileRequestMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns SignFileRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.SignFileRequestMessage; - - /** - * Decodes a SignFileRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SignFileRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.SignFileRequestMessage; - } - - /** Properties of a SignFileResponseMessage. */ - interface ISignFileResponseMessage { - - /** SignFileResponseMessage signaturePath */ - signaturePath?: (string|null); - } - - /** Represents a SignFileResponseMessage. */ - class SignFileResponseMessage implements ISignFileResponseMessage { - - /** - * Constructs a new SignFileResponseMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.ISignFileResponseMessage); - - /** SignFileResponseMessage signaturePath. */ - public signaturePath: string; - - /** - * Creates a new SignFileResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns SignFileResponseMessage instance - */ - public static create(properties?: agentInterface.ISignFileResponseMessage): agentInterface.SignFileResponseMessage; - - /** - * Encodes the specified SignFileResponseMessage message. Does not implicitly {@link agentInterface.SignFileResponseMessage.verify|verify} messages. - * @param m SignFileResponseMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.ISignFileResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SignFileResponseMessage message, length delimited. Does not implicitly {@link agentInterface.SignFileResponseMessage.verify|verify} messages. - * @param message SignFileResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.ISignFileResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SignFileResponseMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns SignFileResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.SignFileResponseMessage; - - /** - * Decodes a SignFileResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SignFileResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.SignFileResponseMessage; - } - - /** Properties of a VerifyFileRequestMessage. */ - interface IVerifyFileRequestMessage { - - /** VerifyFileRequestMessage filePath */ - filePath?: (string|null); - - /** VerifyFileRequestMessage publicKeyPath */ - publicKeyPath?: (string|null); - } - - /** Represents a VerifyFileRequestMessage. */ - class VerifyFileRequestMessage implements IVerifyFileRequestMessage { - - /** - * Constructs a new VerifyFileRequestMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IVerifyFileRequestMessage); - - /** VerifyFileRequestMessage filePath. */ - public filePath: string; - - /** VerifyFileRequestMessage publicKeyPath. */ - public publicKeyPath: string; - - /** - * Creates a new VerifyFileRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns VerifyFileRequestMessage instance - */ - public static create(properties?: agentInterface.IVerifyFileRequestMessage): agentInterface.VerifyFileRequestMessage; - - /** - * Encodes the specified VerifyFileRequestMessage message. Does not implicitly {@link agentInterface.VerifyFileRequestMessage.verify|verify} messages. - * @param m VerifyFileRequestMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IVerifyFileRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VerifyFileRequestMessage message, length delimited. Does not implicitly {@link agentInterface.VerifyFileRequestMessage.verify|verify} messages. - * @param message VerifyFileRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IVerifyFileRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VerifyFileRequestMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns VerifyFileRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.VerifyFileRequestMessage; - - /** - * Decodes a VerifyFileRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VerifyFileRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.VerifyFileRequestMessage; - } - - /** Properties of a VerifyFileResponseMessage. */ - interface IVerifyFileResponseMessage { - - /** VerifyFileResponseMessage verified */ - verified?: (boolean|null); - } - - /** Represents a VerifyFileResponseMessage. */ - class VerifyFileResponseMessage implements IVerifyFileResponseMessage { - - /** - * Constructs a new VerifyFileResponseMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IVerifyFileResponseMessage); - - /** VerifyFileResponseMessage verified. */ - public verified: boolean; - - /** - * Creates a new VerifyFileResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns VerifyFileResponseMessage instance - */ - public static create(properties?: agentInterface.IVerifyFileResponseMessage): agentInterface.VerifyFileResponseMessage; - - /** - * Encodes the specified VerifyFileResponseMessage message. Does not implicitly {@link agentInterface.VerifyFileResponseMessage.verify|verify} messages. - * @param m VerifyFileResponseMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IVerifyFileResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VerifyFileResponseMessage message, length delimited. Does not implicitly {@link agentInterface.VerifyFileResponseMessage.verify|verify} messages. - * @param message VerifyFileResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IVerifyFileResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VerifyFileResponseMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns VerifyFileResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.VerifyFileResponseMessage; - - /** - * Decodes a VerifyFileResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VerifyFileResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.VerifyFileResponseMessage; - } - - /** Properties of an EncryptFileRequestMessage. */ - interface IEncryptFileRequestMessage { - - /** EncryptFileRequestMessage filePath */ - filePath?: (string|null); - - /** EncryptFileRequestMessage publicKeyPath */ - publicKeyPath?: (string|null); - } - - /** Represents an EncryptFileRequestMessage. */ - class EncryptFileRequestMessage implements IEncryptFileRequestMessage { - - /** - * Constructs a new EncryptFileRequestMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IEncryptFileRequestMessage); - - /** EncryptFileRequestMessage filePath. */ - public filePath: string; - - /** EncryptFileRequestMessage publicKeyPath. */ - public publicKeyPath: string; - - /** - * Creates a new EncryptFileRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns EncryptFileRequestMessage instance - */ - public static create(properties?: agentInterface.IEncryptFileRequestMessage): agentInterface.EncryptFileRequestMessage; - - /** - * Encodes the specified EncryptFileRequestMessage message. Does not implicitly {@link agentInterface.EncryptFileRequestMessage.verify|verify} messages. - * @param m EncryptFileRequestMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IEncryptFileRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EncryptFileRequestMessage message, length delimited. Does not implicitly {@link agentInterface.EncryptFileRequestMessage.verify|verify} messages. - * @param message EncryptFileRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IEncryptFileRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EncryptFileRequestMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns EncryptFileRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.EncryptFileRequestMessage; - - /** - * Decodes an EncryptFileRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EncryptFileRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.EncryptFileRequestMessage; - } - - /** Properties of an EncryptFileResponseMessage. */ - interface IEncryptFileResponseMessage { - - /** EncryptFileResponseMessage encryptedPath */ - encryptedPath?: (string|null); - } - - /** Represents an EncryptFileResponseMessage. */ - class EncryptFileResponseMessage implements IEncryptFileResponseMessage { - - /** - * Constructs a new EncryptFileResponseMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IEncryptFileResponseMessage); - - /** EncryptFileResponseMessage encryptedPath. */ - public encryptedPath: string; - - /** - * Creates a new EncryptFileResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns EncryptFileResponseMessage instance - */ - public static create(properties?: agentInterface.IEncryptFileResponseMessage): agentInterface.EncryptFileResponseMessage; - - /** - * Encodes the specified EncryptFileResponseMessage message. Does not implicitly {@link agentInterface.EncryptFileResponseMessage.verify|verify} messages. - * @param m EncryptFileResponseMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IEncryptFileResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EncryptFileResponseMessage message, length delimited. Does not implicitly {@link agentInterface.EncryptFileResponseMessage.verify|verify} messages. - * @param message EncryptFileResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IEncryptFileResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EncryptFileResponseMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns EncryptFileResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.EncryptFileResponseMessage; - - /** - * Decodes an EncryptFileResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EncryptFileResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.EncryptFileResponseMessage; - } - - /** Properties of a DecryptFileRequestMessage. */ - interface IDecryptFileRequestMessage { - - /** DecryptFileRequestMessage filePath */ - filePath?: (string|null); - - /** DecryptFileRequestMessage privateKeyPath */ - privateKeyPath?: (string|null); - - /** DecryptFileRequestMessage passphrase */ - passphrase?: (string|null); - } - - /** Represents a DecryptFileRequestMessage. */ - class DecryptFileRequestMessage implements IDecryptFileRequestMessage { - - /** - * Constructs a new DecryptFileRequestMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IDecryptFileRequestMessage); - - /** DecryptFileRequestMessage filePath. */ - public filePath: string; - - /** DecryptFileRequestMessage privateKeyPath. */ - public privateKeyPath: string; - - /** DecryptFileRequestMessage passphrase. */ - public passphrase: string; - - /** - * Creates a new DecryptFileRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns DecryptFileRequestMessage instance - */ - public static create(properties?: agentInterface.IDecryptFileRequestMessage): agentInterface.DecryptFileRequestMessage; - - /** - * Encodes the specified DecryptFileRequestMessage message. Does not implicitly {@link agentInterface.DecryptFileRequestMessage.verify|verify} messages. - * @param m DecryptFileRequestMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IDecryptFileRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DecryptFileRequestMessage message, length delimited. Does not implicitly {@link agentInterface.DecryptFileRequestMessage.verify|verify} messages. - * @param message DecryptFileRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IDecryptFileRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DecryptFileRequestMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns DecryptFileRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.DecryptFileRequestMessage; - - /** - * Decodes a DecryptFileRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DecryptFileRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.DecryptFileRequestMessage; - } - - /** Properties of a DecryptFileResponseMessage. */ - interface IDecryptFileResponseMessage { - - /** DecryptFileResponseMessage decryptedPath */ - decryptedPath?: (string|null); - } - - /** Represents a DecryptFileResponseMessage. */ - class DecryptFileResponseMessage implements IDecryptFileResponseMessage { - - /** - * Constructs a new DecryptFileResponseMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IDecryptFileResponseMessage); - - /** DecryptFileResponseMessage decryptedPath. */ - public decryptedPath: string; - - /** - * Creates a new DecryptFileResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns DecryptFileResponseMessage instance - */ - public static create(properties?: agentInterface.IDecryptFileResponseMessage): agentInterface.DecryptFileResponseMessage; - - /** - * Encodes the specified DecryptFileResponseMessage message. Does not implicitly {@link agentInterface.DecryptFileResponseMessage.verify|verify} messages. - * @param m DecryptFileResponseMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IDecryptFileResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DecryptFileResponseMessage message, length delimited. Does not implicitly {@link agentInterface.DecryptFileResponseMessage.verify|verify} messages. - * @param message DecryptFileResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IDecryptFileResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DecryptFileResponseMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns DecryptFileResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.DecryptFileResponseMessage; - - /** - * Decodes a DecryptFileResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DecryptFileResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.DecryptFileResponseMessage; - } - - /** Properties of a ListVaultsRequestMessage. */ - interface IListVaultsRequestMessage { - } - - /** Represents a ListVaultsRequestMessage. */ - class ListVaultsRequestMessage implements IListVaultsRequestMessage { - - /** - * Constructs a new ListVaultsRequestMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IListVaultsRequestMessage); - - /** - * Creates a new ListVaultsRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ListVaultsRequestMessage instance - */ - public static create(properties?: agentInterface.IListVaultsRequestMessage): agentInterface.ListVaultsRequestMessage; - - /** - * Encodes the specified ListVaultsRequestMessage message. Does not implicitly {@link agentInterface.ListVaultsRequestMessage.verify|verify} messages. - * @param m ListVaultsRequestMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IListVaultsRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListVaultsRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ListVaultsRequestMessage.verify|verify} messages. - * @param message ListVaultsRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IListVaultsRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListVaultsRequestMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ListVaultsRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.ListVaultsRequestMessage; - - /** - * Decodes a ListVaultsRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListVaultsRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.ListVaultsRequestMessage; - } - - /** Properties of a ListVaultsResponseMessage. */ - interface IListVaultsResponseMessage { - - /** ListVaultsResponseMessage vaultNames */ - vaultNames?: (string[]|null); - } - - /** Represents a ListVaultsResponseMessage. */ - class ListVaultsResponseMessage implements IListVaultsResponseMessage { - - /** - * Constructs a new ListVaultsResponseMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IListVaultsResponseMessage); - - /** ListVaultsResponseMessage vaultNames. */ - public vaultNames: string[]; - - /** - * Creates a new ListVaultsResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ListVaultsResponseMessage instance - */ - public static create(properties?: agentInterface.IListVaultsResponseMessage): agentInterface.ListVaultsResponseMessage; - - /** - * Encodes the specified ListVaultsResponseMessage message. Does not implicitly {@link agentInterface.ListVaultsResponseMessage.verify|verify} messages. - * @param m ListVaultsResponseMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IListVaultsResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListVaultsResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ListVaultsResponseMessage.verify|verify} messages. - * @param message ListVaultsResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IListVaultsResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListVaultsResponseMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ListVaultsResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.ListVaultsResponseMessage; - - /** - * Decodes a ListVaultsResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListVaultsResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.ListVaultsResponseMessage; - } - - /** Properties of a ScanVaultNamesRequestMessage. */ - interface IScanVaultNamesRequestMessage { - - /** ScanVaultNamesRequestMessage publicKey */ - publicKey?: (string|null); - } - - /** Represents a ScanVaultNamesRequestMessage. */ - class ScanVaultNamesRequestMessage implements IScanVaultNamesRequestMessage { - - /** - * Constructs a new ScanVaultNamesRequestMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IScanVaultNamesRequestMessage); - - /** ScanVaultNamesRequestMessage publicKey. */ - public publicKey: string; - - /** - * Creates a new ScanVaultNamesRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ScanVaultNamesRequestMessage instance - */ - public static create(properties?: agentInterface.IScanVaultNamesRequestMessage): agentInterface.ScanVaultNamesRequestMessage; - - /** - * Encodes the specified ScanVaultNamesRequestMessage message. Does not implicitly {@link agentInterface.ScanVaultNamesRequestMessage.verify|verify} messages. - * @param m ScanVaultNamesRequestMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IScanVaultNamesRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScanVaultNamesRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ScanVaultNamesRequestMessage.verify|verify} messages. - * @param message ScanVaultNamesRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IScanVaultNamesRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScanVaultNamesRequestMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ScanVaultNamesRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.ScanVaultNamesRequestMessage; - - /** - * Decodes a ScanVaultNamesRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScanVaultNamesRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.ScanVaultNamesRequestMessage; - } - - /** Properties of a ScanVaultNamesResponseMessage. */ - interface IScanVaultNamesResponseMessage { - - /** ScanVaultNamesResponseMessage vaultNames */ - vaultNames?: (string[]|null); - } - - /** Represents a ScanVaultNamesResponseMessage. */ - class ScanVaultNamesResponseMessage implements IScanVaultNamesResponseMessage { - - /** - * Constructs a new ScanVaultNamesResponseMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IScanVaultNamesResponseMessage); - - /** ScanVaultNamesResponseMessage vaultNames. */ - public vaultNames: string[]; - - /** - * Creates a new ScanVaultNamesResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ScanVaultNamesResponseMessage instance - */ - public static create(properties?: agentInterface.IScanVaultNamesResponseMessage): agentInterface.ScanVaultNamesResponseMessage; - - /** - * Encodes the specified ScanVaultNamesResponseMessage message. Does not implicitly {@link agentInterface.ScanVaultNamesResponseMessage.verify|verify} messages. - * @param m ScanVaultNamesResponseMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IScanVaultNamesResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScanVaultNamesResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ScanVaultNamesResponseMessage.verify|verify} messages. - * @param message ScanVaultNamesResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IScanVaultNamesResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScanVaultNamesResponseMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ScanVaultNamesResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.ScanVaultNamesResponseMessage; - - /** - * Decodes a ScanVaultNamesResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScanVaultNamesResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.ScanVaultNamesResponseMessage; - } - - /** Properties of a NewVaultRequestMessage. */ - interface INewVaultRequestMessage { - - /** NewVaultRequestMessage vaultName */ - vaultName?: (string|null); - } - - /** Represents a NewVaultRequestMessage. */ - class NewVaultRequestMessage implements INewVaultRequestMessage { - - /** - * Constructs a new NewVaultRequestMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.INewVaultRequestMessage); - - /** NewVaultRequestMessage vaultName. */ - public vaultName: string; - - /** - * Creates a new NewVaultRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns NewVaultRequestMessage instance - */ - public static create(properties?: agentInterface.INewVaultRequestMessage): agentInterface.NewVaultRequestMessage; - - /** - * Encodes the specified NewVaultRequestMessage message. Does not implicitly {@link agentInterface.NewVaultRequestMessage.verify|verify} messages. - * @param m NewVaultRequestMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.INewVaultRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NewVaultRequestMessage message, length delimited. Does not implicitly {@link agentInterface.NewVaultRequestMessage.verify|verify} messages. - * @param message NewVaultRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.INewVaultRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NewVaultRequestMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns NewVaultRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.NewVaultRequestMessage; - - /** - * Decodes a NewVaultRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NewVaultRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.NewVaultRequestMessage; - } - - /** Properties of a NewVaultResponseMessage. */ - interface INewVaultResponseMessage { - - /** NewVaultResponseMessage successful */ - successful?: (boolean|null); - } - - /** Represents a NewVaultResponseMessage. */ - class NewVaultResponseMessage implements INewVaultResponseMessage { - - /** - * Constructs a new NewVaultResponseMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.INewVaultResponseMessage); - - /** NewVaultResponseMessage successful. */ - public successful: boolean; - - /** - * Creates a new NewVaultResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns NewVaultResponseMessage instance - */ - public static create(properties?: agentInterface.INewVaultResponseMessage): agentInterface.NewVaultResponseMessage; - - /** - * Encodes the specified NewVaultResponseMessage message. Does not implicitly {@link agentInterface.NewVaultResponseMessage.verify|verify} messages. - * @param m NewVaultResponseMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.INewVaultResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NewVaultResponseMessage message, length delimited. Does not implicitly {@link agentInterface.NewVaultResponseMessage.verify|verify} messages. - * @param message NewVaultResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.INewVaultResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NewVaultResponseMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns NewVaultResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.NewVaultResponseMessage; - - /** - * Decodes a NewVaultResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NewVaultResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.NewVaultResponseMessage; - } - - /** Properties of a PullVaultRequestMessage. */ - interface IPullVaultRequestMessage { - - /** PullVaultRequestMessage vaultName */ - vaultName?: (string|null); - - /** PullVaultRequestMessage publicKey */ - publicKey?: (string|null); - } - - /** Represents a PullVaultRequestMessage. */ - class PullVaultRequestMessage implements IPullVaultRequestMessage { - - /** - * Constructs a new PullVaultRequestMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IPullVaultRequestMessage); - - /** PullVaultRequestMessage vaultName. */ - public vaultName: string; - - /** PullVaultRequestMessage publicKey. */ - public publicKey: string; - - /** - * Creates a new PullVaultRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns PullVaultRequestMessage instance - */ - public static create(properties?: agentInterface.IPullVaultRequestMessage): agentInterface.PullVaultRequestMessage; - - /** - * Encodes the specified PullVaultRequestMessage message. Does not implicitly {@link agentInterface.PullVaultRequestMessage.verify|verify} messages. - * @param m PullVaultRequestMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IPullVaultRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PullVaultRequestMessage message, length delimited. Does not implicitly {@link agentInterface.PullVaultRequestMessage.verify|verify} messages. - * @param message PullVaultRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IPullVaultRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PullVaultRequestMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns PullVaultRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.PullVaultRequestMessage; - - /** - * Decodes a PullVaultRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PullVaultRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.PullVaultRequestMessage; - } - - /** Properties of a PullVaultResponseMessage. */ - interface IPullVaultResponseMessage { - - /** PullVaultResponseMessage successful */ - successful?: (boolean|null); - } - - /** Represents a PullVaultResponseMessage. */ - class PullVaultResponseMessage implements IPullVaultResponseMessage { - - /** - * Constructs a new PullVaultResponseMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IPullVaultResponseMessage); - - /** PullVaultResponseMessage successful. */ - public successful: boolean; - - /** - * Creates a new PullVaultResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns PullVaultResponseMessage instance - */ - public static create(properties?: agentInterface.IPullVaultResponseMessage): agentInterface.PullVaultResponseMessage; - - /** - * Encodes the specified PullVaultResponseMessage message. Does not implicitly {@link agentInterface.PullVaultResponseMessage.verify|verify} messages. - * @param m PullVaultResponseMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IPullVaultResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PullVaultResponseMessage message, length delimited. Does not implicitly {@link agentInterface.PullVaultResponseMessage.verify|verify} messages. - * @param message PullVaultResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IPullVaultResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PullVaultResponseMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns PullVaultResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.PullVaultResponseMessage; - - /** - * Decodes a PullVaultResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PullVaultResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.PullVaultResponseMessage; - } - - /** Properties of a DestroyVaultRequestMessage. */ - interface IDestroyVaultRequestMessage { - - /** DestroyVaultRequestMessage vaultName */ - vaultName?: (string|null); - } - - /** Represents a DestroyVaultRequestMessage. */ - class DestroyVaultRequestMessage implements IDestroyVaultRequestMessage { - - /** - * Constructs a new DestroyVaultRequestMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IDestroyVaultRequestMessage); - - /** DestroyVaultRequestMessage vaultName. */ - public vaultName: string; - - /** - * Creates a new DestroyVaultRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns DestroyVaultRequestMessage instance - */ - public static create(properties?: agentInterface.IDestroyVaultRequestMessage): agentInterface.DestroyVaultRequestMessage; - - /** - * Encodes the specified DestroyVaultRequestMessage message. Does not implicitly {@link agentInterface.DestroyVaultRequestMessage.verify|verify} messages. - * @param m DestroyVaultRequestMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IDestroyVaultRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DestroyVaultRequestMessage message, length delimited. Does not implicitly {@link agentInterface.DestroyVaultRequestMessage.verify|verify} messages. - * @param message DestroyVaultRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IDestroyVaultRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DestroyVaultRequestMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns DestroyVaultRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.DestroyVaultRequestMessage; - - /** - * Decodes a DestroyVaultRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DestroyVaultRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.DestroyVaultRequestMessage; - } - - /** Properties of a DestroyVaultResponseMessage. */ - interface IDestroyVaultResponseMessage { - - /** DestroyVaultResponseMessage successful */ - successful?: (boolean|null); - } - - /** Represents a DestroyVaultResponseMessage. */ - class DestroyVaultResponseMessage implements IDestroyVaultResponseMessage { - - /** - * Constructs a new DestroyVaultResponseMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IDestroyVaultResponseMessage); - - /** DestroyVaultResponseMessage successful. */ - public successful: boolean; - - /** - * Creates a new DestroyVaultResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns DestroyVaultResponseMessage instance - */ - public static create(properties?: agentInterface.IDestroyVaultResponseMessage): agentInterface.DestroyVaultResponseMessage; - - /** - * Encodes the specified DestroyVaultResponseMessage message. Does not implicitly {@link agentInterface.DestroyVaultResponseMessage.verify|verify} messages. - * @param m DestroyVaultResponseMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IDestroyVaultResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DestroyVaultResponseMessage message, length delimited. Does not implicitly {@link agentInterface.DestroyVaultResponseMessage.verify|verify} messages. - * @param message DestroyVaultResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IDestroyVaultResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DestroyVaultResponseMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns DestroyVaultResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.DestroyVaultResponseMessage; - - /** - * Decodes a DestroyVaultResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DestroyVaultResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.DestroyVaultResponseMessage; - } - - /** Properties of a ListSecretsRequestMessage. */ - interface IListSecretsRequestMessage { - - /** ListSecretsRequestMessage vaultName */ - vaultName?: (string|null); - } - - /** Represents a ListSecretsRequestMessage. */ - class ListSecretsRequestMessage implements IListSecretsRequestMessage { - - /** - * Constructs a new ListSecretsRequestMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IListSecretsRequestMessage); - - /** ListSecretsRequestMessage vaultName. */ - public vaultName: string; - - /** - * Creates a new ListSecretsRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSecretsRequestMessage instance - */ - public static create(properties?: agentInterface.IListSecretsRequestMessage): agentInterface.ListSecretsRequestMessage; - - /** - * Encodes the specified ListSecretsRequestMessage message. Does not implicitly {@link agentInterface.ListSecretsRequestMessage.verify|verify} messages. - * @param m ListSecretsRequestMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IListSecretsRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSecretsRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ListSecretsRequestMessage.verify|verify} messages. - * @param message ListSecretsRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IListSecretsRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSecretsRequestMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ListSecretsRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.ListSecretsRequestMessage; - - /** - * Decodes a ListSecretsRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSecretsRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.ListSecretsRequestMessage; - } - - /** Properties of a ListSecretsResponseMessage. */ - interface IListSecretsResponseMessage { - - /** ListSecretsResponseMessage secretNames */ - secretNames?: (string[]|null); - } - - /** Represents a ListSecretsResponseMessage. */ - class ListSecretsResponseMessage implements IListSecretsResponseMessage { - - /** - * Constructs a new ListSecretsResponseMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IListSecretsResponseMessage); - - /** ListSecretsResponseMessage secretNames. */ - public secretNames: string[]; - - /** - * Creates a new ListSecretsResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSecretsResponseMessage instance - */ - public static create(properties?: agentInterface.IListSecretsResponseMessage): agentInterface.ListSecretsResponseMessage; - - /** - * Encodes the specified ListSecretsResponseMessage message. Does not implicitly {@link agentInterface.ListSecretsResponseMessage.verify|verify} messages. - * @param m ListSecretsResponseMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IListSecretsResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSecretsResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ListSecretsResponseMessage.verify|verify} messages. - * @param message ListSecretsResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IListSecretsResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSecretsResponseMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ListSecretsResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.ListSecretsResponseMessage; - - /** - * Decodes a ListSecretsResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSecretsResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.ListSecretsResponseMessage; - } - - /** Properties of a CreateSecretRequestMessage. */ - interface ICreateSecretRequestMessage { - - /** CreateSecretRequestMessage vaultName */ - vaultName?: (string|null); - - /** CreateSecretRequestMessage secretName */ - secretName?: (string|null); - - /** CreateSecretRequestMessage secretPath */ - secretPath?: (string|null); - - /** CreateSecretRequestMessage secretContent */ - secretContent?: (Uint8Array|null); - } - - /** Represents a CreateSecretRequestMessage. */ - class CreateSecretRequestMessage implements ICreateSecretRequestMessage { - - /** - * Constructs a new CreateSecretRequestMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.ICreateSecretRequestMessage); - - /** CreateSecretRequestMessage vaultName. */ - public vaultName: string; - - /** CreateSecretRequestMessage secretName. */ - public secretName: string; - - /** CreateSecretRequestMessage secretPath. */ - public secretPath: string; - - /** CreateSecretRequestMessage secretContent. */ - public secretContent: Uint8Array; - - /** - * Creates a new CreateSecretRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateSecretRequestMessage instance - */ - public static create(properties?: agentInterface.ICreateSecretRequestMessage): agentInterface.CreateSecretRequestMessage; - - /** - * Encodes the specified CreateSecretRequestMessage message. Does not implicitly {@link agentInterface.CreateSecretRequestMessage.verify|verify} messages. - * @param m CreateSecretRequestMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.ICreateSecretRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateSecretRequestMessage message, length delimited. Does not implicitly {@link agentInterface.CreateSecretRequestMessage.verify|verify} messages. - * @param message CreateSecretRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.ICreateSecretRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateSecretRequestMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns CreateSecretRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.CreateSecretRequestMessage; - - /** - * Decodes a CreateSecretRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateSecretRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.CreateSecretRequestMessage; - } - - /** Properties of a CreateSecretResponseMessage. */ - interface ICreateSecretResponseMessage { - - /** CreateSecretResponseMessage successful */ - successful?: (boolean|null); - } - - /** Represents a CreateSecretResponseMessage. */ - class CreateSecretResponseMessage implements ICreateSecretResponseMessage { - - /** - * Constructs a new CreateSecretResponseMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.ICreateSecretResponseMessage); - - /** CreateSecretResponseMessage successful. */ - public successful: boolean; - - /** - * Creates a new CreateSecretResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateSecretResponseMessage instance - */ - public static create(properties?: agentInterface.ICreateSecretResponseMessage): agentInterface.CreateSecretResponseMessage; - - /** - * Encodes the specified CreateSecretResponseMessage message. Does not implicitly {@link agentInterface.CreateSecretResponseMessage.verify|verify} messages. - * @param m CreateSecretResponseMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.ICreateSecretResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateSecretResponseMessage message, length delimited. Does not implicitly {@link agentInterface.CreateSecretResponseMessage.verify|verify} messages. - * @param message CreateSecretResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.ICreateSecretResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateSecretResponseMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns CreateSecretResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.CreateSecretResponseMessage; - - /** - * Decodes a CreateSecretResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateSecretResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.CreateSecretResponseMessage; - } - - /** Properties of a DestroySecretRequestMessage. */ - interface IDestroySecretRequestMessage { - - /** DestroySecretRequestMessage vaultName */ - vaultName?: (string|null); - - /** DestroySecretRequestMessage secretName */ - secretName?: (string|null); - } - - /** Represents a DestroySecretRequestMessage. */ - class DestroySecretRequestMessage implements IDestroySecretRequestMessage { - - /** - * Constructs a new DestroySecretRequestMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IDestroySecretRequestMessage); - - /** DestroySecretRequestMessage vaultName. */ - public vaultName: string; - - /** DestroySecretRequestMessage secretName. */ - public secretName: string; - - /** - * Creates a new DestroySecretRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns DestroySecretRequestMessage instance - */ - public static create(properties?: agentInterface.IDestroySecretRequestMessage): agentInterface.DestroySecretRequestMessage; - - /** - * Encodes the specified DestroySecretRequestMessage message. Does not implicitly {@link agentInterface.DestroySecretRequestMessage.verify|verify} messages. - * @param m DestroySecretRequestMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IDestroySecretRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DestroySecretRequestMessage message, length delimited. Does not implicitly {@link agentInterface.DestroySecretRequestMessage.verify|verify} messages. - * @param message DestroySecretRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IDestroySecretRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DestroySecretRequestMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns DestroySecretRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.DestroySecretRequestMessage; - - /** - * Decodes a DestroySecretRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DestroySecretRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.DestroySecretRequestMessage; - } - - /** Properties of a DestroySecretResponseMessage. */ - interface IDestroySecretResponseMessage { - - /** DestroySecretResponseMessage successful */ - successful?: (boolean|null); - } - - /** Represents a DestroySecretResponseMessage. */ - class DestroySecretResponseMessage implements IDestroySecretResponseMessage { - - /** - * Constructs a new DestroySecretResponseMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IDestroySecretResponseMessage); - - /** DestroySecretResponseMessage successful. */ - public successful: boolean; - - /** - * Creates a new DestroySecretResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns DestroySecretResponseMessage instance - */ - public static create(properties?: agentInterface.IDestroySecretResponseMessage): agentInterface.DestroySecretResponseMessage; - - /** - * Encodes the specified DestroySecretResponseMessage message. Does not implicitly {@link agentInterface.DestroySecretResponseMessage.verify|verify} messages. - * @param m DestroySecretResponseMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IDestroySecretResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DestroySecretResponseMessage message, length delimited. Does not implicitly {@link agentInterface.DestroySecretResponseMessage.verify|verify} messages. - * @param message DestroySecretResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IDestroySecretResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DestroySecretResponseMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns DestroySecretResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.DestroySecretResponseMessage; - - /** - * Decodes a DestroySecretResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DestroySecretResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.DestroySecretResponseMessage; - } - - /** Properties of a GetSecretRequestMessage. */ - interface IGetSecretRequestMessage { - - /** GetSecretRequestMessage vaultName */ - vaultName?: (string|null); - - /** GetSecretRequestMessage secretName */ - secretName?: (string|null); - } - - /** Represents a GetSecretRequestMessage. */ - class GetSecretRequestMessage implements IGetSecretRequestMessage { - - /** - * Constructs a new GetSecretRequestMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IGetSecretRequestMessage); - - /** GetSecretRequestMessage vaultName. */ - public vaultName: string; - - /** GetSecretRequestMessage secretName. */ - public secretName: string; - - /** - * Creates a new GetSecretRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns GetSecretRequestMessage instance - */ - public static create(properties?: agentInterface.IGetSecretRequestMessage): agentInterface.GetSecretRequestMessage; - - /** - * Encodes the specified GetSecretRequestMessage message. Does not implicitly {@link agentInterface.GetSecretRequestMessage.verify|verify} messages. - * @param m GetSecretRequestMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IGetSecretRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetSecretRequestMessage message, length delimited. Does not implicitly {@link agentInterface.GetSecretRequestMessage.verify|verify} messages. - * @param message GetSecretRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IGetSecretRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetSecretRequestMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns GetSecretRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.GetSecretRequestMessage; - - /** - * Decodes a GetSecretRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetSecretRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.GetSecretRequestMessage; - } - - /** Properties of a GetSecretResponseMessage. */ - interface IGetSecretResponseMessage { - - /** GetSecretResponseMessage secret */ - secret?: (Uint8Array|null); - } - - /** Represents a GetSecretResponseMessage. */ - class GetSecretResponseMessage implements IGetSecretResponseMessage { - - /** - * Constructs a new GetSecretResponseMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IGetSecretResponseMessage); - - /** GetSecretResponseMessage secret. */ - public secret: Uint8Array; - - /** - * Creates a new GetSecretResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns GetSecretResponseMessage instance - */ - public static create(properties?: agentInterface.IGetSecretResponseMessage): agentInterface.GetSecretResponseMessage; - - /** - * Encodes the specified GetSecretResponseMessage message. Does not implicitly {@link agentInterface.GetSecretResponseMessage.verify|verify} messages. - * @param m GetSecretResponseMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IGetSecretResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; + /** Represents an Agent */ + class Agent extends $protobuf.rpc.Service { /** - * Encodes the specified GetSecretResponseMessage message, length delimited. Does not implicitly {@link agentInterface.GetSecretResponseMessage.verify|verify} messages. - * @param message GetSecretResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: agentInterface.IGetSecretResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetSecretResponseMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns GetSecretResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.GetSecretResponseMessage; - - /** - * Decodes a GetSecretResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetSecretResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.GetSecretResponseMessage; - } - - /** Properties of a DeriveKeyRequestMessage. */ - interface IDeriveKeyRequestMessage { - - /** DeriveKeyRequestMessage vaultName */ - vaultName?: (string|null); - - /** DeriveKeyRequestMessage keyName */ - keyName?: (string|null); - - /** DeriveKeyRequestMessage passphrase */ - passphrase?: (string|null); - } - - /** Represents a DeriveKeyRequestMessage. */ - class DeriveKeyRequestMessage implements IDeriveKeyRequestMessage { - - /** - * Constructs a new DeriveKeyRequestMessage. - * @param [p] Properties to set - */ - constructor(p?: agentInterface.IDeriveKeyRequestMessage); - - /** DeriveKeyRequestMessage vaultName. */ - public vaultName: string; - - /** DeriveKeyRequestMessage keyName. */ - public keyName: string; - - /** DeriveKeyRequestMessage passphrase. */ - public passphrase: string; - - /** - * Creates a new DeriveKeyRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns DeriveKeyRequestMessage instance - */ - public static create(properties?: agentInterface.IDeriveKeyRequestMessage): agentInterface.DeriveKeyRequestMessage; - - /** - * Encodes the specified DeriveKeyRequestMessage message. Does not implicitly {@link agentInterface.DeriveKeyRequestMessage.verify|verify} messages. - * @param m DeriveKeyRequestMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: agentInterface.IDeriveKeyRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeriveKeyRequestMessage message, length delimited. Does not implicitly {@link agentInterface.DeriveKeyRequestMessage.verify|verify} messages. - * @param message DeriveKeyRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Constructs a new Agent service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - public static encodeDelimited(message: agentInterface.IDeriveKeyRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** - * Decodes a DeriveKeyRequestMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns DeriveKeyRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Creates new Agent service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.DeriveKeyRequestMessage; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Agent; /** - * Decodes a DeriveKeyRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeriveKeyRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls AddPeer. + * @param request PeerInfoMessage message or plain object + * @param callback Node-style callback called with the error, if any, and BooleanMessage */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.DeriveKeyRequestMessage; - } - - /** Properties of a DeriveKeyResponseMessage. */ - interface IDeriveKeyResponseMessage { - - /** DeriveKeyResponseMessage successful */ - successful?: (boolean|null); - } - - /** Represents a DeriveKeyResponseMessage. */ - class DeriveKeyResponseMessage implements IDeriveKeyResponseMessage { + public addPeer(request: agentInterface.IPeerInfoMessage, callback: agentInterface.Agent.AddPeerCallback): void; /** - * Constructs a new DeriveKeyResponseMessage. - * @param [p] Properties to set + * Calls AddPeer. + * @param request PeerInfoMessage message or plain object + * @returns Promise */ - constructor(p?: agentInterface.IDeriveKeyResponseMessage); - - /** DeriveKeyResponseMessage successful. */ - public successful: boolean; + public addPeer(request: agentInterface.IPeerInfoMessage): Promise; /** - * Creates a new DeriveKeyResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns DeriveKeyResponseMessage instance + * Calls DecryptFile. + * @param request DecryptFileMessage message or plain object + * @param callback Node-style callback called with the error, if any, and StringMessage */ - public static create(properties?: agentInterface.IDeriveKeyResponseMessage): agentInterface.DeriveKeyResponseMessage; + public decryptFile(request: agentInterface.IDecryptFileMessage, callback: agentInterface.Agent.DecryptFileCallback): void; /** - * Encodes the specified DeriveKeyResponseMessage message. Does not implicitly {@link agentInterface.DeriveKeyResponseMessage.verify|verify} messages. - * @param m DeriveKeyResponseMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer + * Calls DecryptFile. + * @param request DecryptFileMessage message or plain object + * @returns Promise */ - public static encode(m: agentInterface.IDeriveKeyResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; + public decryptFile(request: agentInterface.IDecryptFileMessage): Promise; /** - * Encodes the specified DeriveKeyResponseMessage message, length delimited. Does not implicitly {@link agentInterface.DeriveKeyResponseMessage.verify|verify} messages. - * @param message DeriveKeyResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls DeleteKey. + * @param request StringMessage message or plain object + * @param callback Node-style callback called with the error, if any, and BooleanMessage */ - public static encodeDelimited(message: agentInterface.IDeriveKeyResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public deleteKey(request: agentInterface.IStringMessage, callback: agentInterface.Agent.DeleteKeyCallback): void; /** - * Decodes a DeriveKeyResponseMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns DeriveKeyResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteKey. + * @param request StringMessage message or plain object + * @returns Promise */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.DeriveKeyResponseMessage; + public deleteKey(request: agentInterface.IStringMessage): Promise; /** - * Decodes a DeriveKeyResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeriveKeyResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteSecret. + * @param request SecretPathMessage message or plain object + * @param callback Node-style callback called with the error, if any, and BooleanMessage */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.DeriveKeyResponseMessage; - } - - /** Properties of a ListKeysRequestMessage. */ - interface IListKeysRequestMessage { - } - - /** Represents a ListKeysRequestMessage. */ - class ListKeysRequestMessage implements IListKeysRequestMessage { + public deleteSecret(request: agentInterface.ISecretPathMessage, callback: agentInterface.Agent.DeleteSecretCallback): void; /** - * Constructs a new ListKeysRequestMessage. - * @param [p] Properties to set + * Calls DeleteSecret. + * @param request SecretPathMessage message or plain object + * @returns Promise */ - constructor(p?: agentInterface.IListKeysRequestMessage); + public deleteSecret(request: agentInterface.ISecretPathMessage): Promise; /** - * Creates a new ListKeysRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ListKeysRequestMessage instance + * Calls DeleteVault. + * @param request StringMessage message or plain object + * @param callback Node-style callback called with the error, if any, and BooleanMessage */ - public static create(properties?: agentInterface.IListKeysRequestMessage): agentInterface.ListKeysRequestMessage; + public deleteVault(request: agentInterface.IStringMessage, callback: agentInterface.Agent.DeleteVaultCallback): void; /** - * Encodes the specified ListKeysRequestMessage message. Does not implicitly {@link agentInterface.ListKeysRequestMessage.verify|verify} messages. - * @param m ListKeysRequestMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer + * Calls DeleteVault. + * @param request StringMessage message or plain object + * @returns Promise */ - public static encode(m: agentInterface.IListKeysRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; + public deleteVault(request: agentInterface.IStringMessage): Promise; /** - * Encodes the specified ListKeysRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ListKeysRequestMessage.verify|verify} messages. - * @param message ListKeysRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls DeriveKey. + * @param request DeriveKeyMessage message or plain object + * @param callback Node-style callback called with the error, if any, and BooleanMessage */ - public static encodeDelimited(message: agentInterface.IListKeysRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public deriveKey(request: agentInterface.IDeriveKeyMessage, callback: agentInterface.Agent.DeriveKeyCallback): void; /** - * Decodes a ListKeysRequestMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ListKeysRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeriveKey. + * @param request DeriveKeyMessage message or plain object + * @returns Promise */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.ListKeysRequestMessage; + public deriveKey(request: agentInterface.IDeriveKeyMessage): Promise; /** - * Decodes a ListKeysRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListKeysRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls EncryptFile. + * @param request EncryptFileMessage message or plain object + * @param callback Node-style callback called with the error, if any, and StringMessage */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.ListKeysRequestMessage; - } - - /** Properties of a ListKeysResponseMessage. */ - interface IListKeysResponseMessage { - - /** ListKeysResponseMessage keyNames */ - keyNames?: (string[]|null); - } - - /** Represents a ListKeysResponseMessage. */ - class ListKeysResponseMessage implements IListKeysResponseMessage { + public encryptFile(request: agentInterface.IEncryptFileMessage, callback: agentInterface.Agent.EncryptFileCallback): void; /** - * Constructs a new ListKeysResponseMessage. - * @param [p] Properties to set + * Calls EncryptFile. + * @param request EncryptFileMessage message or plain object + * @returns Promise */ - constructor(p?: agentInterface.IListKeysResponseMessage); - - /** ListKeysResponseMessage keyNames. */ - public keyNames: string[]; + public encryptFile(request: agentInterface.IEncryptFileMessage): Promise; /** - * Creates a new ListKeysResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ListKeysResponseMessage instance + * Calls FindPeer. + * @param request ContactPeerMessage message or plain object + * @param callback Node-style callback called with the error, if any, and BooleanMessage */ - public static create(properties?: agentInterface.IListKeysResponseMessage): agentInterface.ListKeysResponseMessage; + public findPeer(request: agentInterface.IContactPeerMessage, callback: agentInterface.Agent.FindPeerCallback): void; /** - * Encodes the specified ListKeysResponseMessage message. Does not implicitly {@link agentInterface.ListKeysResponseMessage.verify|verify} messages. - * @param m ListKeysResponseMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer + * Calls FindPeer. + * @param request ContactPeerMessage message or plain object + * @returns Promise */ - public static encode(m: agentInterface.IListKeysResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; + public findPeer(request: agentInterface.IContactPeerMessage): Promise; /** - * Encodes the specified ListKeysResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ListKeysResponseMessage.verify|verify} messages. - * @param message ListKeysResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls FindSocialPeer. + * @param request ContactPeerMessage message or plain object + * @param callback Node-style callback called with the error, if any, and BooleanMessage */ - public static encodeDelimited(message: agentInterface.IListKeysResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public findSocialPeer(request: agentInterface.IContactPeerMessage, callback: agentInterface.Agent.FindSocialPeerCallback): void; /** - * Decodes a ListKeysResponseMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ListKeysResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls FindSocialPeer. + * @param request ContactPeerMessage message or plain object + * @returns Promise */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.ListKeysResponseMessage; + public findSocialPeer(request: agentInterface.IContactPeerMessage): Promise; /** - * Decodes a ListKeysResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListKeysResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetKey. + * @param request StringMessage message or plain object + * @param callback Node-style callback called with the error, if any, and StringMessage */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.ListKeysResponseMessage; - } - - /** Properties of a GetKeyRequestMessage. */ - interface IGetKeyRequestMessage { - - /** GetKeyRequestMessage keyName */ - keyName?: (string|null); - } - - /** Represents a GetKeyRequestMessage. */ - class GetKeyRequestMessage implements IGetKeyRequestMessage { + public getKey(request: agentInterface.IStringMessage, callback: agentInterface.Agent.GetKeyCallback): void; /** - * Constructs a new GetKeyRequestMessage. - * @param [p] Properties to set + * Calls GetKey. + * @param request StringMessage message or plain object + * @returns Promise */ - constructor(p?: agentInterface.IGetKeyRequestMessage); - - /** GetKeyRequestMessage keyName. */ - public keyName: string; + public getKey(request: agentInterface.IStringMessage): Promise; /** - * Creates a new GetKeyRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns GetKeyRequestMessage instance + * Calls GetLocalPeerInfo. + * @param request EmptyMessage message or plain object + * @param callback Node-style callback called with the error, if any, and PeerInfoMessage */ - public static create(properties?: agentInterface.IGetKeyRequestMessage): agentInterface.GetKeyRequestMessage; + public getLocalPeerInfo(request: agentInterface.IEmptyMessage, callback: agentInterface.Agent.GetLocalPeerInfoCallback): void; /** - * Encodes the specified GetKeyRequestMessage message. Does not implicitly {@link agentInterface.GetKeyRequestMessage.verify|verify} messages. - * @param m GetKeyRequestMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer + * Calls GetLocalPeerInfo. + * @param request EmptyMessage message or plain object + * @returns Promise */ - public static encode(m: agentInterface.IGetKeyRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; + public getLocalPeerInfo(request: agentInterface.IEmptyMessage): Promise; /** - * Encodes the specified GetKeyRequestMessage message, length delimited. Does not implicitly {@link agentInterface.GetKeyRequestMessage.verify|verify} messages. - * @param message GetKeyRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetPeerInfo. + * @param request StringMessage message or plain object + * @param callback Node-style callback called with the error, if any, and PeerInfoMessage */ - public static encodeDelimited(message: agentInterface.IGetKeyRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public getPeerInfo(request: agentInterface.IStringMessage, callback: agentInterface.Agent.GetPeerInfoCallback): void; /** - * Decodes a GetKeyRequestMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns GetKeyRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetPeerInfo. + * @param request StringMessage message or plain object + * @returns Promise */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.GetKeyRequestMessage; + public getPeerInfo(request: agentInterface.IStringMessage): Promise; /** - * Decodes a GetKeyRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetKeyRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetPrimaryKeyPair. + * @param request BooleanMessage message or plain object + * @param callback Node-style callback called with the error, if any, and KeyPairMessage */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.GetKeyRequestMessage; - } - - /** Properties of a GetKeyResponseMessage. */ - interface IGetKeyResponseMessage { - - /** GetKeyResponseMessage keyName */ - keyName?: (string|null); - - /** GetKeyResponseMessage keyContent */ - keyContent?: (string|null); - } - - /** Represents a GetKeyResponseMessage. */ - class GetKeyResponseMessage implements IGetKeyResponseMessage { + public getPrimaryKeyPair(request: agentInterface.IBooleanMessage, callback: agentInterface.Agent.GetPrimaryKeyPairCallback): void; /** - * Constructs a new GetKeyResponseMessage. - * @param [p] Properties to set + * Calls GetPrimaryKeyPair. + * @param request BooleanMessage message or plain object + * @returns Promise */ - constructor(p?: agentInterface.IGetKeyResponseMessage); - - /** GetKeyResponseMessage keyName. */ - public keyName: string; - - /** GetKeyResponseMessage keyContent. */ - public keyContent: string; + public getPrimaryKeyPair(request: agentInterface.IBooleanMessage): Promise; /** - * Creates a new GetKeyResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns GetKeyResponseMessage instance + * Calls GetSecret. + * @param request SecretPathMessage message or plain object + * @param callback Node-style callback called with the error, if any, and StringMessage */ - public static create(properties?: agentInterface.IGetKeyResponseMessage): agentInterface.GetKeyResponseMessage; + public getSecret(request: agentInterface.ISecretPathMessage, callback: agentInterface.Agent.GetSecretCallback): void; /** - * Encodes the specified GetKeyResponseMessage message. Does not implicitly {@link agentInterface.GetKeyResponseMessage.verify|verify} messages. - * @param m GetKeyResponseMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer + * Calls GetSecret. + * @param request SecretPathMessage message or plain object + * @returns Promise */ - public static encode(m: agentInterface.IGetKeyResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; + public getSecret(request: agentInterface.ISecretPathMessage): Promise; /** - * Encodes the specified GetKeyResponseMessage message, length delimited. Does not implicitly {@link agentInterface.GetKeyResponseMessage.verify|verify} messages. - * @param message GetKeyResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetStatus. + * @param request EmptyMessage message or plain object + * @param callback Node-style callback called with the error, if any, and AgentStatusMessage */ - public static encodeDelimited(message: agentInterface.IGetKeyResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public getStatus(request: agentInterface.IEmptyMessage, callback: agentInterface.Agent.GetStatusCallback): void; /** - * Decodes a GetKeyResponseMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns GetKeyResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetStatus. + * @param request EmptyMessage message or plain object + * @returns Promise */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.GetKeyResponseMessage; + public getStatus(request: agentInterface.IEmptyMessage): Promise; /** - * Decodes a GetKeyResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetKeyResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListKeys. + * @param request EmptyMessage message or plain object + * @param callback Node-style callback called with the error, if any, and StringListMessage */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.GetKeyResponseMessage; - } - - /** Properties of a GetPrimaryKeyPairRequestMessage. */ - interface IGetPrimaryKeyPairRequestMessage { - - /** GetPrimaryKeyPairRequestMessage includePrivateKey */ - includePrivateKey?: (boolean|null); - } - - /** Represents a GetPrimaryKeyPairRequestMessage. */ - class GetPrimaryKeyPairRequestMessage implements IGetPrimaryKeyPairRequestMessage { + public listKeys(request: agentInterface.IEmptyMessage, callback: agentInterface.Agent.ListKeysCallback): void; /** - * Constructs a new GetPrimaryKeyPairRequestMessage. - * @param [p] Properties to set + * Calls ListKeys. + * @param request EmptyMessage message or plain object + * @returns Promise */ - constructor(p?: agentInterface.IGetPrimaryKeyPairRequestMessage); - - /** GetPrimaryKeyPairRequestMessage includePrivateKey. */ - public includePrivateKey: boolean; + public listKeys(request: agentInterface.IEmptyMessage): Promise; /** - * Creates a new GetPrimaryKeyPairRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPrimaryKeyPairRequestMessage instance + * Calls ListNodes. + * @param request BooleanMessage message or plain object + * @param callback Node-style callback called with the error, if any, and StringListMessage */ - public static create(properties?: agentInterface.IGetPrimaryKeyPairRequestMessage): agentInterface.GetPrimaryKeyPairRequestMessage; + public listNodes(request: agentInterface.IBooleanMessage, callback: agentInterface.Agent.ListNodesCallback): void; /** - * Encodes the specified GetPrimaryKeyPairRequestMessage message. Does not implicitly {@link agentInterface.GetPrimaryKeyPairRequestMessage.verify|verify} messages. - * @param m GetPrimaryKeyPairRequestMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer + * Calls ListNodes. + * @param request BooleanMessage message or plain object + * @returns Promise */ - public static encode(m: agentInterface.IGetPrimaryKeyPairRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; + public listNodes(request: agentInterface.IBooleanMessage): Promise; /** - * Encodes the specified GetPrimaryKeyPairRequestMessage message, length delimited. Does not implicitly {@link agentInterface.GetPrimaryKeyPairRequestMessage.verify|verify} messages. - * @param message GetPrimaryKeyPairRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls ListPeers. + * @param request EmptyMessage message or plain object + * @param callback Node-style callback called with the error, if any, and StringListMessage */ - public static encodeDelimited(message: agentInterface.IGetPrimaryKeyPairRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public listPeers(request: agentInterface.IEmptyMessage, callback: agentInterface.Agent.ListPeersCallback): void; /** - * Decodes a GetPrimaryKeyPairRequestMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns GetPrimaryKeyPairRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListPeers. + * @param request EmptyMessage message or plain object + * @returns Promise */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.GetPrimaryKeyPairRequestMessage; + public listPeers(request: agentInterface.IEmptyMessage): Promise; /** - * Decodes a GetPrimaryKeyPairRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPrimaryKeyPairRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListSecrets. + * @param request StringMessage message or plain object + * @param callback Node-style callback called with the error, if any, and StringListMessage */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.GetPrimaryKeyPairRequestMessage; - } - - /** Properties of a GetPrimaryKeyPairResponseMessage. */ - interface IGetPrimaryKeyPairResponseMessage { - - /** GetPrimaryKeyPairResponseMessage publicKey */ - publicKey?: (string|null); - - /** GetPrimaryKeyPairResponseMessage privateKey */ - privateKey?: (string|null); - } - - /** Represents a GetPrimaryKeyPairResponseMessage. */ - class GetPrimaryKeyPairResponseMessage implements IGetPrimaryKeyPairResponseMessage { + public listSecrets(request: agentInterface.IStringMessage, callback: agentInterface.Agent.ListSecretsCallback): void; /** - * Constructs a new GetPrimaryKeyPairResponseMessage. - * @param [p] Properties to set + * Calls ListSecrets. + * @param request StringMessage message or plain object + * @returns Promise */ - constructor(p?: agentInterface.IGetPrimaryKeyPairResponseMessage); - - /** GetPrimaryKeyPairResponseMessage publicKey. */ - public publicKey: string; - - /** GetPrimaryKeyPairResponseMessage privateKey. */ - public privateKey: string; + public listSecrets(request: agentInterface.IStringMessage): Promise; /** - * Creates a new GetPrimaryKeyPairResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPrimaryKeyPairResponseMessage instance + * Calls ListVaults. + * @param request EmptyMessage message or plain object + * @param callback Node-style callback called with the error, if any, and StringListMessage */ - public static create(properties?: agentInterface.IGetPrimaryKeyPairResponseMessage): agentInterface.GetPrimaryKeyPairResponseMessage; + public listVaults(request: agentInterface.IEmptyMessage, callback: agentInterface.Agent.ListVaultsCallback): void; /** - * Encodes the specified GetPrimaryKeyPairResponseMessage message. Does not implicitly {@link agentInterface.GetPrimaryKeyPairResponseMessage.verify|verify} messages. - * @param m GetPrimaryKeyPairResponseMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer + * Calls ListVaults. + * @param request EmptyMessage message or plain object + * @returns Promise */ - public static encode(m: agentInterface.IGetPrimaryKeyPairResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; + public listVaults(request: agentInterface.IEmptyMessage): Promise; /** - * Encodes the specified GetPrimaryKeyPairResponseMessage message, length delimited. Does not implicitly {@link agentInterface.GetPrimaryKeyPairResponseMessage.verify|verify} messages. - * @param message GetPrimaryKeyPairResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls NewNode. + * @param request NewNodeMessage message or plain object + * @param callback Node-style callback called with the error, if any, and BooleanMessage */ - public static encodeDelimited(message: agentInterface.IGetPrimaryKeyPairResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public newNode(request: agentInterface.INewNodeMessage, callback: agentInterface.Agent.NewNodeCallback): void; /** - * Decodes a GetPrimaryKeyPairResponseMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns GetPrimaryKeyPairResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls NewNode. + * @param request NewNodeMessage message or plain object + * @returns Promise */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.GetPrimaryKeyPairResponseMessage; + public newNode(request: agentInterface.INewNodeMessage): Promise; /** - * Decodes a GetPrimaryKeyPairResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPrimaryKeyPairResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls NewSecret. + * @param request SecretContentMessage message or plain object + * @param callback Node-style callback called with the error, if any, and BooleanMessage */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.GetPrimaryKeyPairResponseMessage; - } - - /** Properties of an UpdateSecretRequestMessage. */ - interface IUpdateSecretRequestMessage { - - /** UpdateSecretRequestMessage vaultName */ - vaultName?: (string|null); - - /** UpdateSecretRequestMessage secretName */ - secretName?: (string|null); - - /** UpdateSecretRequestMessage secretPath */ - secretPath?: (string|null); - - /** UpdateSecretRequestMessage secretContent */ - secretContent?: (Uint8Array|null); - } - - /** Represents an UpdateSecretRequestMessage. */ - class UpdateSecretRequestMessage implements IUpdateSecretRequestMessage { + public newSecret(request: agentInterface.ISecretContentMessage, callback: agentInterface.Agent.NewSecretCallback): void; /** - * Constructs a new UpdateSecretRequestMessage. - * @param [p] Properties to set + * Calls NewSecret. + * @param request SecretContentMessage message or plain object + * @returns Promise */ - constructor(p?: agentInterface.IUpdateSecretRequestMessage); - - /** UpdateSecretRequestMessage vaultName. */ - public vaultName: string; - - /** UpdateSecretRequestMessage secretName. */ - public secretName: string; - - /** UpdateSecretRequestMessage secretPath. */ - public secretPath: string; - - /** UpdateSecretRequestMessage secretContent. */ - public secretContent: Uint8Array; + public newSecret(request: agentInterface.ISecretContentMessage): Promise; /** - * Creates a new UpdateSecretRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateSecretRequestMessage instance + * Calls NewVault. + * @param request StringMessage message or plain object + * @param callback Node-style callback called with the error, if any, and BooleanMessage */ - public static create(properties?: agentInterface.IUpdateSecretRequestMessage): agentInterface.UpdateSecretRequestMessage; + public newVault(request: agentInterface.IStringMessage, callback: agentInterface.Agent.NewVaultCallback): void; /** - * Encodes the specified UpdateSecretRequestMessage message. Does not implicitly {@link agentInterface.UpdateSecretRequestMessage.verify|verify} messages. - * @param m UpdateSecretRequestMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer + * Calls NewVault. + * @param request StringMessage message or plain object + * @returns Promise */ - public static encode(m: agentInterface.IUpdateSecretRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; + public newVault(request: agentInterface.IStringMessage): Promise; /** - * Encodes the specified UpdateSecretRequestMessage message, length delimited. Does not implicitly {@link agentInterface.UpdateSecretRequestMessage.verify|verify} messages. - * @param message UpdateSecretRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls PingPeer. + * @param request ContactPeerMessage message or plain object + * @param callback Node-style callback called with the error, if any, and BooleanMessage */ - public static encodeDelimited(message: agentInterface.IUpdateSecretRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public pingPeer(request: agentInterface.IContactPeerMessage, callback: agentInterface.Agent.PingPeerCallback): void; /** - * Decodes an UpdateSecretRequestMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns UpdateSecretRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls PingPeer. + * @param request ContactPeerMessage message or plain object + * @returns Promise */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.UpdateSecretRequestMessage; + public pingPeer(request: agentInterface.IContactPeerMessage): Promise; /** - * Decodes an UpdateSecretRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateSecretRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls PullVault. + * @param request VaultPathMessage message or plain object + * @param callback Node-style callback called with the error, if any, and BooleanMessage */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.UpdateSecretRequestMessage; - } - - /** Properties of an UpdateSecretResponseMessage. */ - interface IUpdateSecretResponseMessage { - - /** UpdateSecretResponseMessage successful */ - successful?: (boolean|null); - } - - /** Represents an UpdateSecretResponseMessage. */ - class UpdateSecretResponseMessage implements IUpdateSecretResponseMessage { + public pullVault(request: agentInterface.IVaultPathMessage, callback: agentInterface.Agent.PullVaultCallback): void; /** - * Constructs a new UpdateSecretResponseMessage. - * @param [p] Properties to set + * Calls PullVault. + * @param request VaultPathMessage message or plain object + * @returns Promise */ - constructor(p?: agentInterface.IUpdateSecretResponseMessage); - - /** UpdateSecretResponseMessage successful. */ - public successful: boolean; + public pullVault(request: agentInterface.IVaultPathMessage): Promise; /** - * Creates a new UpdateSecretResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateSecretResponseMessage instance + * Calls RegisterNode. + * @param request StringMessage message or plain object + * @param callback Node-style callback called with the error, if any, and BooleanMessage */ - public static create(properties?: agentInterface.IUpdateSecretResponseMessage): agentInterface.UpdateSecretResponseMessage; + public registerNode(request: agentInterface.IStringMessage, callback: agentInterface.Agent.RegisterNodeCallback): void; /** - * Encodes the specified UpdateSecretResponseMessage message. Does not implicitly {@link agentInterface.UpdateSecretResponseMessage.verify|verify} messages. - * @param m UpdateSecretResponseMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer + * Calls RegisterNode. + * @param request StringMessage message or plain object + * @returns Promise */ - public static encode(m: agentInterface.IUpdateSecretResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; + public registerNode(request: agentInterface.IStringMessage): Promise; /** - * Encodes the specified UpdateSecretResponseMessage message, length delimited. Does not implicitly {@link agentInterface.UpdateSecretResponseMessage.verify|verify} messages. - * @param message UpdateSecretResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls RequestHolePunch. + * @param request StringMessage message or plain object + * @param callback Node-style callback called with the error, if any, and BooleanMessage */ - public static encodeDelimited(message: agentInterface.IUpdateSecretResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public requestHolePunch(request: agentInterface.IStringMessage, callback: agentInterface.Agent.RequestHolePunchCallback): void; /** - * Decodes an UpdateSecretResponseMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns UpdateSecretResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls RequestHolePunch. + * @param request StringMessage message or plain object + * @returns Promise */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.UpdateSecretResponseMessage; + public requestHolePunch(request: agentInterface.IStringMessage): Promise; /** - * Decodes an UpdateSecretResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateSecretResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls RequestRelay. + * @param request StringMessage message or plain object + * @param callback Node-style callback called with the error, if any, and BooleanMessage */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.UpdateSecretResponseMessage; - } - - /** Properties of a DeleteKeyRequestMessage. */ - interface IDeleteKeyRequestMessage { - - /** DeleteKeyRequestMessage keyName */ - keyName?: (string|null); - } - - /** Represents a DeleteKeyRequestMessage. */ - class DeleteKeyRequestMessage implements IDeleteKeyRequestMessage { + public requestRelay(request: agentInterface.IStringMessage, callback: agentInterface.Agent.RequestRelayCallback): void; /** - * Constructs a new DeleteKeyRequestMessage. - * @param [p] Properties to set + * Calls RequestRelay. + * @param request StringMessage message or plain object + * @returns Promise */ - constructor(p?: agentInterface.IDeleteKeyRequestMessage); - - /** DeleteKeyRequestMessage keyName. */ - public keyName: string; + public requestRelay(request: agentInterface.IStringMessage): Promise; /** - * Creates a new DeleteKeyRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteKeyRequestMessage instance + * Calls ScanVaultNames. + * @param request StringMessage message or plain object + * @param callback Node-style callback called with the error, if any, and StringListMessage */ - public static create(properties?: agentInterface.IDeleteKeyRequestMessage): agentInterface.DeleteKeyRequestMessage; + public scanVaultNames(request: agentInterface.IStringMessage, callback: agentInterface.Agent.ScanVaultNamesCallback): void; /** - * Encodes the specified DeleteKeyRequestMessage message. Does not implicitly {@link agentInterface.DeleteKeyRequestMessage.verify|verify} messages. - * @param m DeleteKeyRequestMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer + * Calls ScanVaultNames. + * @param request StringMessage message or plain object + * @returns Promise */ - public static encode(m: agentInterface.IDeleteKeyRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; + public scanVaultNames(request: agentInterface.IStringMessage): Promise; /** - * Encodes the specified DeleteKeyRequestMessage message, length delimited. Does not implicitly {@link agentInterface.DeleteKeyRequestMessage.verify|verify} messages. - * @param message DeleteKeyRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls SignFile. + * @param request SignFileMessage message or plain object + * @param callback Node-style callback called with the error, if any, and StringMessage */ - public static encodeDelimited(message: agentInterface.IDeleteKeyRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public signFile(request: agentInterface.ISignFileMessage, callback: agentInterface.Agent.SignFileCallback): void; /** - * Decodes a DeleteKeyRequestMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns DeleteKeyRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls SignFile. + * @param request SignFileMessage message or plain object + * @returns Promise */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.DeleteKeyRequestMessage; + public signFile(request: agentInterface.ISignFileMessage): Promise; /** - * Decodes a DeleteKeyRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteKeyRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls StopAgent. + * @param request EmptyMessage message or plain object + * @param callback Node-style callback called with the error, if any, and BooleanMessage */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.DeleteKeyRequestMessage; - } - - /** Properties of a DeleteKeyResponseMessage. */ - interface IDeleteKeyResponseMessage { - - /** DeleteKeyResponseMessage successful */ - successful?: (boolean|null); - } + public stopAgent(request: agentInterface.IEmptyMessage, callback: agentInterface.Agent.StopAgentCallback): void; - /** Represents a DeleteKeyResponseMessage. */ - class DeleteKeyResponseMessage implements IDeleteKeyResponseMessage { + /** + * Calls StopAgent. + * @param request EmptyMessage message or plain object + * @returns Promise + */ + public stopAgent(request: agentInterface.IEmptyMessage): Promise; /** - * Constructs a new DeleteKeyResponseMessage. - * @param [p] Properties to set + * Calls ToggleStealthMode. + * @param request BooleanMessage message or plain object + * @param callback Node-style callback called with the error, if any, and BooleanMessage */ - constructor(p?: agentInterface.IDeleteKeyResponseMessage); + public toggleStealthMode(request: agentInterface.IBooleanMessage, callback: agentInterface.Agent.ToggleStealthModeCallback): void; - /** DeleteKeyResponseMessage successful. */ - public successful: boolean; + /** + * Calls ToggleStealthMode. + * @param request BooleanMessage message or plain object + * @returns Promise + */ + public toggleStealthMode(request: agentInterface.IBooleanMessage): Promise; /** - * Creates a new DeleteKeyResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteKeyResponseMessage instance + * Calls UpdateLocalPeerInfo. + * @param request PeerInfoMessage message or plain object + * @param callback Node-style callback called with the error, if any, and BooleanMessage */ - public static create(properties?: agentInterface.IDeleteKeyResponseMessage): agentInterface.DeleteKeyResponseMessage; + public updateLocalPeerInfo(request: agentInterface.IPeerInfoMessage, callback: agentInterface.Agent.UpdateLocalPeerInfoCallback): void; /** - * Encodes the specified DeleteKeyResponseMessage message. Does not implicitly {@link agentInterface.DeleteKeyResponseMessage.verify|verify} messages. - * @param m DeleteKeyResponseMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer + * Calls UpdateLocalPeerInfo. + * @param request PeerInfoMessage message or plain object + * @returns Promise */ - public static encode(m: agentInterface.IDeleteKeyResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; + public updateLocalPeerInfo(request: agentInterface.IPeerInfoMessage): Promise; /** - * Encodes the specified DeleteKeyResponseMessage message, length delimited. Does not implicitly {@link agentInterface.DeleteKeyResponseMessage.verify|verify} messages. - * @param message DeleteKeyResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdatePeerInfo. + * @param request PeerInfoMessage message or plain object + * @param callback Node-style callback called with the error, if any, and BooleanMessage */ - public static encodeDelimited(message: agentInterface.IDeleteKeyResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public updatePeerInfo(request: agentInterface.IPeerInfoMessage, callback: agentInterface.Agent.UpdatePeerInfoCallback): void; /** - * Decodes a DeleteKeyResponseMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns DeleteKeyResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdatePeerInfo. + * @param request PeerInfoMessage message or plain object + * @returns Promise */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.DeleteKeyResponseMessage; + public updatePeerInfo(request: agentInterface.IPeerInfoMessage): Promise; /** - * Decodes a DeleteKeyResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteKeyResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateSecret. + * @param request SecretContentMessage message or plain object + * @param callback Node-style callback called with the error, if any, and BooleanMessage */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.DeleteKeyResponseMessage; - } + public updateSecret(request: agentInterface.ISecretContentMessage, callback: agentInterface.Agent.UpdateSecretCallback): void; - /** Properties of a PeerInfoRequestMessage. */ - interface IPeerInfoRequestMessage { + /** + * Calls UpdateSecret. + * @param request SecretContentMessage message or plain object + * @returns Promise + */ + public updateSecret(request: agentInterface.ISecretContentMessage): Promise; - /** PeerInfoRequestMessage current */ - current?: (boolean|null); + /** + * Calls VerifyFile. + * @param request VerifyFileMessage message or plain object + * @param callback Node-style callback called with the error, if any, and BooleanMessage + */ + public verifyFile(request: agentInterface.IVerifyFileMessage, callback: agentInterface.Agent.VerifyFileCallback): void; - /** PeerInfoRequestMessage publicKey */ - publicKey?: (string|null); + /** + * Calls VerifyFile. + * @param request VerifyFileMessage message or plain object + * @returns Promise + */ + public verifyFile(request: agentInterface.IVerifyFileMessage): Promise; } - /** Represents a PeerInfoRequestMessage. */ - class PeerInfoRequestMessage implements IPeerInfoRequestMessage { + namespace Agent { /** - * Constructs a new PeerInfoRequestMessage. - * @param [p] Properties to set + * Callback as used by {@link agentInterface.Agent#addPeer}. + * @param error Error, if any + * @param [response] BooleanMessage */ - constructor(p?: agentInterface.IPeerInfoRequestMessage); + type AddPeerCallback = (error: (Error|null), response?: agentInterface.BooleanMessage) => void; - /** PeerInfoRequestMessage current. */ - public current: boolean; + /** + * Callback as used by {@link agentInterface.Agent#decryptFile}. + * @param error Error, if any + * @param [response] StringMessage + */ + type DecryptFileCallback = (error: (Error|null), response?: agentInterface.StringMessage) => void; - /** PeerInfoRequestMessage publicKey. */ - public publicKey: string; + /** + * Callback as used by {@link agentInterface.Agent#deleteKey}. + * @param error Error, if any + * @param [response] BooleanMessage + */ + type DeleteKeyCallback = (error: (Error|null), response?: agentInterface.BooleanMessage) => void; /** - * Creates a new PeerInfoRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns PeerInfoRequestMessage instance + * Callback as used by {@link agentInterface.Agent#deleteSecret}. + * @param error Error, if any + * @param [response] BooleanMessage */ - public static create(properties?: agentInterface.IPeerInfoRequestMessage): agentInterface.PeerInfoRequestMessage; + type DeleteSecretCallback = (error: (Error|null), response?: agentInterface.BooleanMessage) => void; /** - * Encodes the specified PeerInfoRequestMessage message. Does not implicitly {@link agentInterface.PeerInfoRequestMessage.verify|verify} messages. - * @param m PeerInfoRequestMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer + * Callback as used by {@link agentInterface.Agent#deleteVault}. + * @param error Error, if any + * @param [response] BooleanMessage */ - public static encode(m: agentInterface.IPeerInfoRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; + type DeleteVaultCallback = (error: (Error|null), response?: agentInterface.BooleanMessage) => void; /** - * Encodes the specified PeerInfoRequestMessage message, length delimited. Does not implicitly {@link agentInterface.PeerInfoRequestMessage.verify|verify} messages. - * @param message PeerInfoRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link agentInterface.Agent#deriveKey}. + * @param error Error, if any + * @param [response] BooleanMessage */ - public static encodeDelimited(message: agentInterface.IPeerInfoRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; + type DeriveKeyCallback = (error: (Error|null), response?: agentInterface.BooleanMessage) => void; /** - * Decodes a PeerInfoRequestMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns PeerInfoRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link agentInterface.Agent#encryptFile}. + * @param error Error, if any + * @param [response] StringMessage */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.PeerInfoRequestMessage; + type EncryptFileCallback = (error: (Error|null), response?: agentInterface.StringMessage) => void; /** - * Decodes a PeerInfoRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PeerInfoRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link agentInterface.Agent#findPeer}. + * @param error Error, if any + * @param [response] BooleanMessage */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.PeerInfoRequestMessage; - } + type FindPeerCallback = (error: (Error|null), response?: agentInterface.BooleanMessage) => void; - /** Properties of a PeerInfoResponseMessage. */ - interface IPeerInfoResponseMessage { + /** + * Callback as used by {@link agentInterface.Agent#findSocialPeer}. + * @param error Error, if any + * @param [response] BooleanMessage + */ + type FindSocialPeerCallback = (error: (Error|null), response?: agentInterface.BooleanMessage) => void; - /** PeerInfoResponseMessage publicKey */ - publicKey?: (string|null); + /** + * Callback as used by {@link agentInterface.Agent#getKey}. + * @param error Error, if any + * @param [response] StringMessage + */ + type GetKeyCallback = (error: (Error|null), response?: agentInterface.StringMessage) => void; - /** PeerInfoResponseMessage peerAddress */ - peerAddress?: (string|null); + /** + * Callback as used by {@link agentInterface.Agent#getLocalPeerInfo}. + * @param error Error, if any + * @param [response] PeerInfoMessage + */ + type GetLocalPeerInfoCallback = (error: (Error|null), response?: agentInterface.PeerInfoMessage) => void; - /** PeerInfoResponseMessage relayPublicKey */ - relayPublicKey?: (string|null); - } + /** + * Callback as used by {@link agentInterface.Agent#getPeerInfo}. + * @param error Error, if any + * @param [response] PeerInfoMessage + */ + type GetPeerInfoCallback = (error: (Error|null), response?: agentInterface.PeerInfoMessage) => void; - /** Represents a PeerInfoResponseMessage. */ - class PeerInfoResponseMessage implements IPeerInfoResponseMessage { + /** + * Callback as used by {@link agentInterface.Agent#getPrimaryKeyPair}. + * @param error Error, if any + * @param [response] KeyPairMessage + */ + type GetPrimaryKeyPairCallback = (error: (Error|null), response?: agentInterface.KeyPairMessage) => void; /** - * Constructs a new PeerInfoResponseMessage. - * @param [p] Properties to set + * Callback as used by {@link agentInterface.Agent#getSecret}. + * @param error Error, if any + * @param [response] StringMessage */ - constructor(p?: agentInterface.IPeerInfoResponseMessage); + type GetSecretCallback = (error: (Error|null), response?: agentInterface.StringMessage) => void; - /** PeerInfoResponseMessage publicKey. */ - public publicKey: string; + /** + * Callback as used by {@link agentInterface.Agent#getStatus}. + * @param error Error, if any + * @param [response] AgentStatusMessage + */ + type GetStatusCallback = (error: (Error|null), response?: agentInterface.AgentStatusMessage) => void; - /** PeerInfoResponseMessage peerAddress. */ - public peerAddress: string; + /** + * Callback as used by {@link agentInterface.Agent#listKeys}. + * @param error Error, if any + * @param [response] StringListMessage + */ + type ListKeysCallback = (error: (Error|null), response?: agentInterface.StringListMessage) => void; - /** PeerInfoResponseMessage relayPublicKey. */ - public relayPublicKey: string; + /** + * Callback as used by {@link agentInterface.Agent#listNodes}. + * @param error Error, if any + * @param [response] StringListMessage + */ + type ListNodesCallback = (error: (Error|null), response?: agentInterface.StringListMessage) => void; /** - * Creates a new PeerInfoResponseMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns PeerInfoResponseMessage instance + * Callback as used by {@link agentInterface.Agent#listPeers}. + * @param error Error, if any + * @param [response] StringListMessage */ - public static create(properties?: agentInterface.IPeerInfoResponseMessage): agentInterface.PeerInfoResponseMessage; + type ListPeersCallback = (error: (Error|null), response?: agentInterface.StringListMessage) => void; /** - * Encodes the specified PeerInfoResponseMessage message. Does not implicitly {@link agentInterface.PeerInfoResponseMessage.verify|verify} messages. - * @param m PeerInfoResponseMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer + * Callback as used by {@link agentInterface.Agent#listSecrets}. + * @param error Error, if any + * @param [response] StringListMessage */ - public static encode(m: agentInterface.IPeerInfoResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; + type ListSecretsCallback = (error: (Error|null), response?: agentInterface.StringListMessage) => void; /** - * Encodes the specified PeerInfoResponseMessage message, length delimited. Does not implicitly {@link agentInterface.PeerInfoResponseMessage.verify|verify} messages. - * @param message PeerInfoResponseMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link agentInterface.Agent#listVaults}. + * @param error Error, if any + * @param [response] StringListMessage */ - public static encodeDelimited(message: agentInterface.IPeerInfoResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + type ListVaultsCallback = (error: (Error|null), response?: agentInterface.StringListMessage) => void; /** - * Decodes a PeerInfoResponseMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns PeerInfoResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link agentInterface.Agent#newNode}. + * @param error Error, if any + * @param [response] BooleanMessage */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.PeerInfoResponseMessage; + type NewNodeCallback = (error: (Error|null), response?: agentInterface.BooleanMessage) => void; /** - * Decodes a PeerInfoResponseMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PeerInfoResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link agentInterface.Agent#newSecret}. + * @param error Error, if any + * @param [response] BooleanMessage */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.PeerInfoResponseMessage; - } + type NewSecretCallback = (error: (Error|null), response?: agentInterface.BooleanMessage) => void; - /** Properties of an AddPeerRequestMessage. */ - interface IAddPeerRequestMessage { + /** + * Callback as used by {@link agentInterface.Agent#newVault}. + * @param error Error, if any + * @param [response] BooleanMessage + */ + type NewVaultCallback = (error: (Error|null), response?: agentInterface.BooleanMessage) => void; - /** AddPeerRequestMessage publicKey */ - publicKey?: (string|null); + /** + * Callback as used by {@link agentInterface.Agent#pingPeer}. + * @param error Error, if any + * @param [response] BooleanMessage + */ + type PingPeerCallback = (error: (Error|null), response?: agentInterface.BooleanMessage) => void; - /** AddPeerRequestMessage peerAddress */ - peerAddress?: (string|null); + /** + * Callback as used by {@link agentInterface.Agent#pullVault}. + * @param error Error, if any + * @param [response] BooleanMessage + */ + type PullVaultCallback = (error: (Error|null), response?: agentInterface.BooleanMessage) => void; - /** AddPeerRequestMessage relayPublicKey */ - relayPublicKey?: (string|null); - } + /** + * Callback as used by {@link agentInterface.Agent#registerNode}. + * @param error Error, if any + * @param [response] BooleanMessage + */ + type RegisterNodeCallback = (error: (Error|null), response?: agentInterface.BooleanMessage) => void; - /** Represents an AddPeerRequestMessage. */ - class AddPeerRequestMessage implements IAddPeerRequestMessage { + /** + * Callback as used by {@link agentInterface.Agent#requestHolePunch}. + * @param error Error, if any + * @param [response] BooleanMessage + */ + type RequestHolePunchCallback = (error: (Error|null), response?: agentInterface.BooleanMessage) => void; /** - * Constructs a new AddPeerRequestMessage. - * @param [p] Properties to set + * Callback as used by {@link agentInterface.Agent#requestRelay}. + * @param error Error, if any + * @param [response] BooleanMessage */ - constructor(p?: agentInterface.IAddPeerRequestMessage); + type RequestRelayCallback = (error: (Error|null), response?: agentInterface.BooleanMessage) => void; - /** AddPeerRequestMessage publicKey. */ - public publicKey: string; + /** + * Callback as used by {@link agentInterface.Agent#scanVaultNames}. + * @param error Error, if any + * @param [response] StringListMessage + */ + type ScanVaultNamesCallback = (error: (Error|null), response?: agentInterface.StringListMessage) => void; - /** AddPeerRequestMessage peerAddress. */ - public peerAddress: string; + /** + * Callback as used by {@link agentInterface.Agent#signFile}. + * @param error Error, if any + * @param [response] StringMessage + */ + type SignFileCallback = (error: (Error|null), response?: agentInterface.StringMessage) => void; - /** AddPeerRequestMessage relayPublicKey. */ - public relayPublicKey: string; + /** + * Callback as used by {@link agentInterface.Agent#stopAgent}. + * @param error Error, if any + * @param [response] BooleanMessage + */ + type StopAgentCallback = (error: (Error|null), response?: agentInterface.BooleanMessage) => void; /** - * Creates a new AddPeerRequestMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns AddPeerRequestMessage instance + * Callback as used by {@link agentInterface.Agent#toggleStealthMode}. + * @param error Error, if any + * @param [response] BooleanMessage */ - public static create(properties?: agentInterface.IAddPeerRequestMessage): agentInterface.AddPeerRequestMessage; + type ToggleStealthModeCallback = (error: (Error|null), response?: agentInterface.BooleanMessage) => void; /** - * Encodes the specified AddPeerRequestMessage message. Does not implicitly {@link agentInterface.AddPeerRequestMessage.verify|verify} messages. - * @param m AddPeerRequestMessage message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer + * Callback as used by {@link agentInterface.Agent#updateLocalPeerInfo}. + * @param error Error, if any + * @param [response] BooleanMessage */ - public static encode(m: agentInterface.IAddPeerRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; + type UpdateLocalPeerInfoCallback = (error: (Error|null), response?: agentInterface.BooleanMessage) => void; /** - * Encodes the specified AddPeerRequestMessage message, length delimited. Does not implicitly {@link agentInterface.AddPeerRequestMessage.verify|verify} messages. - * @param message AddPeerRequestMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link agentInterface.Agent#updatePeerInfo}. + * @param error Error, if any + * @param [response] BooleanMessage */ - public static encodeDelimited(message: agentInterface.IAddPeerRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; + type UpdatePeerInfoCallback = (error: (Error|null), response?: agentInterface.BooleanMessage) => void; /** - * Decodes an AddPeerRequestMessage message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns AddPeerRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link agentInterface.Agent#updateSecret}. + * @param error Error, if any + * @param [response] BooleanMessage */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.AddPeerRequestMessage; + type UpdateSecretCallback = (error: (Error|null), response?: agentInterface.BooleanMessage) => void; /** - * Decodes an AddPeerRequestMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddPeerRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link agentInterface.Agent#verifyFile}. + * @param error Error, if any + * @param [response] BooleanMessage */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.AddPeerRequestMessage; + type VerifyFileCallback = (error: (Error|null), response?: agentInterface.BooleanMessage) => void; } - /** Properties of an AddPeerResponseMessage. */ - interface IAddPeerResponseMessage { - - /** AddPeerResponseMessage successful */ - successful?: (boolean|null); + /** Properties of an EmptyMessage. */ + interface IEmptyMessage { } - /** Represents an AddPeerResponseMessage. */ - class AddPeerResponseMessage implements IAddPeerResponseMessage { + /** Represents an EmptyMessage. */ + class EmptyMessage implements IEmptyMessage { /** - * Constructs a new AddPeerResponseMessage. + * Constructs a new EmptyMessage. * @param [p] Properties to set */ - constructor(p?: agentInterface.IAddPeerResponseMessage); - - /** AddPeerResponseMessage successful. */ - public successful: boolean; + constructor(p?: agentInterface.IEmptyMessage); /** - * Creates a new AddPeerResponseMessage instance using the specified properties. + * Creates a new EmptyMessage instance using the specified properties. * @param [properties] Properties to set - * @returns AddPeerResponseMessage instance + * @returns EmptyMessage instance */ - public static create(properties?: agentInterface.IAddPeerResponseMessage): agentInterface.AddPeerResponseMessage; + public static create(properties?: agentInterface.IEmptyMessage): agentInterface.EmptyMessage; /** - * Encodes the specified AddPeerResponseMessage message. Does not implicitly {@link agentInterface.AddPeerResponseMessage.verify|verify} messages. - * @param m AddPeerResponseMessage message or plain object to encode + * Encodes the specified EmptyMessage message. Does not implicitly {@link agentInterface.EmptyMessage.verify|verify} messages. + * @param m EmptyMessage message or plain object to encode * @param [w] Writer to encode to * @returns Writer */ - public static encode(m: agentInterface.IAddPeerResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: agentInterface.IEmptyMessage, w?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AddPeerResponseMessage message, length delimited. Does not implicitly {@link agentInterface.AddPeerResponseMessage.verify|verify} messages. - * @param message AddPeerResponseMessage message or plain object to encode + * Encodes the specified EmptyMessage message, length delimited. Does not implicitly {@link agentInterface.EmptyMessage.verify|verify} messages. + * @param message EmptyMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: agentInterface.IAddPeerResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: agentInterface.IEmptyMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AddPeerResponseMessage message from the specified reader or buffer. + * Decodes an EmptyMessage message from the specified reader or buffer. * @param r Reader or buffer to decode from * @param [l] Message length if known beforehand - * @returns AddPeerResponseMessage + * @returns EmptyMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.AddPeerResponseMessage; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.EmptyMessage; /** - * Decodes an AddPeerResponseMessage message from the specified reader or buffer, length delimited. + * Decodes an EmptyMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AddPeerResponseMessage + * @returns EmptyMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.AddPeerResponseMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.EmptyMessage; } - /** Properties of a PingPeerRequestMessage. */ - interface IPingPeerRequestMessage { - - /** PingPeerRequestMessage publicKey */ - publicKey?: (string|null); + /** Properties of a StringMessage. */ + interface IStringMessage { - /** PingPeerRequestMessage timeout */ - timeout?: (number|null); + /** StringMessage s */ + s?: (string|null); } - /** Represents a PingPeerRequestMessage. */ - class PingPeerRequestMessage implements IPingPeerRequestMessage { + /** Represents a StringMessage. */ + class StringMessage implements IStringMessage { /** - * Constructs a new PingPeerRequestMessage. + * Constructs a new StringMessage. * @param [p] Properties to set */ - constructor(p?: agentInterface.IPingPeerRequestMessage); - - /** PingPeerRequestMessage publicKey. */ - public publicKey: string; + constructor(p?: agentInterface.IStringMessage); - /** PingPeerRequestMessage timeout. */ - public timeout: number; + /** StringMessage s. */ + public s: string; /** - * Creates a new PingPeerRequestMessage instance using the specified properties. + * Creates a new StringMessage instance using the specified properties. * @param [properties] Properties to set - * @returns PingPeerRequestMessage instance + * @returns StringMessage instance */ - public static create(properties?: agentInterface.IPingPeerRequestMessage): agentInterface.PingPeerRequestMessage; + public static create(properties?: agentInterface.IStringMessage): agentInterface.StringMessage; /** - * Encodes the specified PingPeerRequestMessage message. Does not implicitly {@link agentInterface.PingPeerRequestMessage.verify|verify} messages. - * @param m PingPeerRequestMessage message or plain object to encode + * Encodes the specified StringMessage message. Does not implicitly {@link agentInterface.StringMessage.verify|verify} messages. + * @param m StringMessage message or plain object to encode * @param [w] Writer to encode to * @returns Writer */ - public static encode(m: agentInterface.IPingPeerRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: agentInterface.IStringMessage, w?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PingPeerRequestMessage message, length delimited. Does not implicitly {@link agentInterface.PingPeerRequestMessage.verify|verify} messages. - * @param message PingPeerRequestMessage message or plain object to encode + * Encodes the specified StringMessage message, length delimited. Does not implicitly {@link agentInterface.StringMessage.verify|verify} messages. + * @param message StringMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: agentInterface.IPingPeerRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: agentInterface.IStringMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PingPeerRequestMessage message from the specified reader or buffer. + * Decodes a StringMessage message from the specified reader or buffer. * @param r Reader or buffer to decode from * @param [l] Message length if known beforehand - * @returns PingPeerRequestMessage + * @returns StringMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.PingPeerRequestMessage; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.StringMessage; /** - * Decodes a PingPeerRequestMessage message from the specified reader or buffer, length delimited. + * Decodes a StringMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PingPeerRequestMessage + * @returns StringMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.PingPeerRequestMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.StringMessage; } - /** Properties of a PingPeerResponseMessage. */ - interface IPingPeerResponseMessage { + /** Properties of a BooleanMessage. */ + interface IBooleanMessage { - /** PingPeerResponseMessage successful */ - successful?: (boolean|null); + /** BooleanMessage b */ + b?: (boolean|null); } - /** Represents a PingPeerResponseMessage. */ - class PingPeerResponseMessage implements IPingPeerResponseMessage { + /** Represents a BooleanMessage. */ + class BooleanMessage implements IBooleanMessage { /** - * Constructs a new PingPeerResponseMessage. + * Constructs a new BooleanMessage. * @param [p] Properties to set */ - constructor(p?: agentInterface.IPingPeerResponseMessage); + constructor(p?: agentInterface.IBooleanMessage); - /** PingPeerResponseMessage successful. */ - public successful: boolean; + /** BooleanMessage b. */ + public b: boolean; /** - * Creates a new PingPeerResponseMessage instance using the specified properties. + * Creates a new BooleanMessage instance using the specified properties. * @param [properties] Properties to set - * @returns PingPeerResponseMessage instance + * @returns BooleanMessage instance */ - public static create(properties?: agentInterface.IPingPeerResponseMessage): agentInterface.PingPeerResponseMessage; + public static create(properties?: agentInterface.IBooleanMessage): agentInterface.BooleanMessage; /** - * Encodes the specified PingPeerResponseMessage message. Does not implicitly {@link agentInterface.PingPeerResponseMessage.verify|verify} messages. - * @param m PingPeerResponseMessage message or plain object to encode + * Encodes the specified BooleanMessage message. Does not implicitly {@link agentInterface.BooleanMessage.verify|verify} messages. + * @param m BooleanMessage message or plain object to encode * @param [w] Writer to encode to * @returns Writer */ - public static encode(m: agentInterface.IPingPeerResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: agentInterface.IBooleanMessage, w?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PingPeerResponseMessage message, length delimited. Does not implicitly {@link agentInterface.PingPeerResponseMessage.verify|verify} messages. - * @param message PingPeerResponseMessage message or plain object to encode + * Encodes the specified BooleanMessage message, length delimited. Does not implicitly {@link agentInterface.BooleanMessage.verify|verify} messages. + * @param message BooleanMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: agentInterface.IPingPeerResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: agentInterface.IBooleanMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PingPeerResponseMessage message from the specified reader or buffer. + * Decodes a BooleanMessage message from the specified reader or buffer. * @param r Reader or buffer to decode from * @param [l] Message length if known beforehand - * @returns PingPeerResponseMessage + * @returns BooleanMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.PingPeerResponseMessage; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.BooleanMessage; /** - * Decodes a PingPeerResponseMessage message from the specified reader or buffer, length delimited. + * Decodes a BooleanMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PingPeerResponseMessage + * @returns BooleanMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.PingPeerResponseMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.BooleanMessage; } - /** Properties of a FindPeerRequestMessage. */ - interface IFindPeerRequestMessage { - - /** FindPeerRequestMessage publicKey */ - publicKey?: (string|null); + /** Properties of a StringListMessage. */ + interface IStringListMessage { - /** FindPeerRequestMessage timeout */ - timeout?: (number|null); + /** StringListMessage s */ + s?: (string[]|null); } - /** Represents a FindPeerRequestMessage. */ - class FindPeerRequestMessage implements IFindPeerRequestMessage { + /** Represents a StringListMessage. */ + class StringListMessage implements IStringListMessage { /** - * Constructs a new FindPeerRequestMessage. + * Constructs a new StringListMessage. * @param [p] Properties to set */ - constructor(p?: agentInterface.IFindPeerRequestMessage); + constructor(p?: agentInterface.IStringListMessage); - /** FindPeerRequestMessage publicKey. */ - public publicKey: string; - - /** FindPeerRequestMessage timeout. */ - public timeout: number; + /** StringListMessage s. */ + public s: string[]; /** - * Creates a new FindPeerRequestMessage instance using the specified properties. + * Creates a new StringListMessage instance using the specified properties. * @param [properties] Properties to set - * @returns FindPeerRequestMessage instance + * @returns StringListMessage instance */ - public static create(properties?: agentInterface.IFindPeerRequestMessage): agentInterface.FindPeerRequestMessage; + public static create(properties?: agentInterface.IStringListMessage): agentInterface.StringListMessage; /** - * Encodes the specified FindPeerRequestMessage message. Does not implicitly {@link agentInterface.FindPeerRequestMessage.verify|verify} messages. - * @param m FindPeerRequestMessage message or plain object to encode + * Encodes the specified StringListMessage message. Does not implicitly {@link agentInterface.StringListMessage.verify|verify} messages. + * @param m StringListMessage message or plain object to encode * @param [w] Writer to encode to * @returns Writer */ - public static encode(m: agentInterface.IFindPeerRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: agentInterface.IStringListMessage, w?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FindPeerRequestMessage message, length delimited. Does not implicitly {@link agentInterface.FindPeerRequestMessage.verify|verify} messages. - * @param message FindPeerRequestMessage message or plain object to encode + * Encodes the specified StringListMessage message, length delimited. Does not implicitly {@link agentInterface.StringListMessage.verify|verify} messages. + * @param message StringListMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: agentInterface.IFindPeerRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: agentInterface.IStringListMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FindPeerRequestMessage message from the specified reader or buffer. + * Decodes a StringListMessage message from the specified reader or buffer. * @param r Reader or buffer to decode from * @param [l] Message length if known beforehand - * @returns FindPeerRequestMessage + * @returns StringListMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.FindPeerRequestMessage; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.StringListMessage; /** - * Decodes a FindPeerRequestMessage message from the specified reader or buffer, length delimited. + * Decodes a StringListMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FindPeerRequestMessage + * @returns StringListMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.FindPeerRequestMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.StringListMessage; } - /** Properties of a FindPeerResponseMessage. */ - interface IFindPeerResponseMessage { + /** Properties of a PeerInfoMessage. */ + interface IPeerInfoMessage { + + /** PeerInfoMessage publicKey */ + publicKey?: (string|null); + + /** PeerInfoMessage relayPublicKey */ + relayPublicKey?: (string|null); + + /** PeerInfoMessage peerAddress */ + peerAddress?: (string|null); - /** FindPeerResponseMessage successful */ - successful?: (boolean|null); + /** PeerInfoMessage apiAddress */ + apiAddress?: (string|null); } - /** Represents a FindPeerResponseMessage. */ - class FindPeerResponseMessage implements IFindPeerResponseMessage { + /** Represents a PeerInfoMessage. */ + class PeerInfoMessage implements IPeerInfoMessage { /** - * Constructs a new FindPeerResponseMessage. + * Constructs a new PeerInfoMessage. * @param [p] Properties to set */ - constructor(p?: agentInterface.IFindPeerResponseMessage); + constructor(p?: agentInterface.IPeerInfoMessage); + + /** PeerInfoMessage publicKey. */ + public publicKey: string; + + /** PeerInfoMessage relayPublicKey. */ + public relayPublicKey: string; + + /** PeerInfoMessage peerAddress. */ + public peerAddress: string; - /** FindPeerResponseMessage successful. */ - public successful: boolean; + /** PeerInfoMessage apiAddress. */ + public apiAddress: string; /** - * Creates a new FindPeerResponseMessage instance using the specified properties. + * Creates a new PeerInfoMessage instance using the specified properties. * @param [properties] Properties to set - * @returns FindPeerResponseMessage instance + * @returns PeerInfoMessage instance */ - public static create(properties?: agentInterface.IFindPeerResponseMessage): agentInterface.FindPeerResponseMessage; + public static create(properties?: agentInterface.IPeerInfoMessage): agentInterface.PeerInfoMessage; /** - * Encodes the specified FindPeerResponseMessage message. Does not implicitly {@link agentInterface.FindPeerResponseMessage.verify|verify} messages. - * @param m FindPeerResponseMessage message or plain object to encode + * Encodes the specified PeerInfoMessage message. Does not implicitly {@link agentInterface.PeerInfoMessage.verify|verify} messages. + * @param m PeerInfoMessage message or plain object to encode * @param [w] Writer to encode to * @returns Writer */ - public static encode(m: agentInterface.IFindPeerResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: agentInterface.IPeerInfoMessage, w?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FindPeerResponseMessage message, length delimited. Does not implicitly {@link agentInterface.FindPeerResponseMessage.verify|verify} messages. - * @param message FindPeerResponseMessage message or plain object to encode + * Encodes the specified PeerInfoMessage message, length delimited. Does not implicitly {@link agentInterface.PeerInfoMessage.verify|verify} messages. + * @param message PeerInfoMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: agentInterface.IFindPeerResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: agentInterface.IPeerInfoMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FindPeerResponseMessage message from the specified reader or buffer. + * Decodes a PeerInfoMessage message from the specified reader or buffer. * @param r Reader or buffer to decode from * @param [l] Message length if known beforehand - * @returns FindPeerResponseMessage + * @returns PeerInfoMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.FindPeerResponseMessage; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.PeerInfoMessage; /** - * Decodes a FindPeerResponseMessage message from the specified reader or buffer, length delimited. + * Decodes a PeerInfoMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FindPeerResponseMessage + * @returns PeerInfoMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.FindPeerResponseMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.PeerInfoMessage; } - /** Properties of a FindSocialPeerRequestMessage. */ - interface IFindSocialPeerRequestMessage { - - /** FindSocialPeerRequestMessage handle */ - handle?: (string|null); + /** AgentStatusType enum. */ + enum AgentStatusType { + ONLINE = 0, + OFFLINE = 1, + ERRORED = 2 + } - /** FindSocialPeerRequestMessage service */ - service?: (string|null); + /** Properties of an AgentStatusMessage. */ + interface IAgentStatusMessage { - /** FindSocialPeerRequestMessage timeout */ - timeout?: (number|null); + /** AgentStatusMessage status */ + status?: (agentInterface.AgentStatusType|null); } - /** Represents a FindSocialPeerRequestMessage. */ - class FindSocialPeerRequestMessage implements IFindSocialPeerRequestMessage { + /** Represents an AgentStatusMessage. */ + class AgentStatusMessage implements IAgentStatusMessage { /** - * Constructs a new FindSocialPeerRequestMessage. + * Constructs a new AgentStatusMessage. * @param [p] Properties to set */ - constructor(p?: agentInterface.IFindSocialPeerRequestMessage); + constructor(p?: agentInterface.IAgentStatusMessage); - /** FindSocialPeerRequestMessage handle. */ - public handle: string; - - /** FindSocialPeerRequestMessage service. */ - public service: string; - - /** FindSocialPeerRequestMessage timeout. */ - public timeout: number; + /** AgentStatusMessage status. */ + public status: agentInterface.AgentStatusType; /** - * Creates a new FindSocialPeerRequestMessage instance using the specified properties. + * Creates a new AgentStatusMessage instance using the specified properties. * @param [properties] Properties to set - * @returns FindSocialPeerRequestMessage instance + * @returns AgentStatusMessage instance */ - public static create(properties?: agentInterface.IFindSocialPeerRequestMessage): agentInterface.FindSocialPeerRequestMessage; + public static create(properties?: agentInterface.IAgentStatusMessage): agentInterface.AgentStatusMessage; /** - * Encodes the specified FindSocialPeerRequestMessage message. Does not implicitly {@link agentInterface.FindSocialPeerRequestMessage.verify|verify} messages. - * @param m FindSocialPeerRequestMessage message or plain object to encode + * Encodes the specified AgentStatusMessage message. Does not implicitly {@link agentInterface.AgentStatusMessage.verify|verify} messages. + * @param m AgentStatusMessage message or plain object to encode * @param [w] Writer to encode to * @returns Writer */ - public static encode(m: agentInterface.IFindSocialPeerRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: agentInterface.IAgentStatusMessage, w?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FindSocialPeerRequestMessage message, length delimited. Does not implicitly {@link agentInterface.FindSocialPeerRequestMessage.verify|verify} messages. - * @param message FindSocialPeerRequestMessage message or plain object to encode + * Encodes the specified AgentStatusMessage message, length delimited. Does not implicitly {@link agentInterface.AgentStatusMessage.verify|verify} messages. + * @param message AgentStatusMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: agentInterface.IFindSocialPeerRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: agentInterface.IAgentStatusMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FindSocialPeerRequestMessage message from the specified reader or buffer. + * Decodes an AgentStatusMessage message from the specified reader or buffer. * @param r Reader or buffer to decode from * @param [l] Message length if known beforehand - * @returns FindSocialPeerRequestMessage + * @returns AgentStatusMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.FindSocialPeerRequestMessage; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.AgentStatusMessage; /** - * Decodes a FindSocialPeerRequestMessage message from the specified reader or buffer, length delimited. + * Decodes an AgentStatusMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FindSocialPeerRequestMessage + * @returns AgentStatusMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.FindSocialPeerRequestMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.AgentStatusMessage; } - /** Properties of a FindSocialPeerResponseMessage. */ - interface IFindSocialPeerResponseMessage { + /** Properties of a NewNodeMessage. */ + interface INewNodeMessage { + + /** NewNodeMessage userId */ + userId?: (string|null); + + /** NewNodeMessage passphrase */ + passphrase?: (string|null); - /** FindSocialPeerResponseMessage successful */ - successful?: (boolean|null); + /** NewNodeMessage nbits */ + nbits?: (number|null); } - /** Represents a FindSocialPeerResponseMessage. */ - class FindSocialPeerResponseMessage implements IFindSocialPeerResponseMessage { + /** Represents a NewNodeMessage. */ + class NewNodeMessage implements INewNodeMessage { /** - * Constructs a new FindSocialPeerResponseMessage. + * Constructs a new NewNodeMessage. * @param [p] Properties to set */ - constructor(p?: agentInterface.IFindSocialPeerResponseMessage); + constructor(p?: agentInterface.INewNodeMessage); + + /** NewNodeMessage userId. */ + public userId: string; + + /** NewNodeMessage passphrase. */ + public passphrase: string; - /** FindSocialPeerResponseMessage successful. */ - public successful: boolean; + /** NewNodeMessage nbits. */ + public nbits: number; /** - * Creates a new FindSocialPeerResponseMessage instance using the specified properties. + * Creates a new NewNodeMessage instance using the specified properties. * @param [properties] Properties to set - * @returns FindSocialPeerResponseMessage instance + * @returns NewNodeMessage instance */ - public static create(properties?: agentInterface.IFindSocialPeerResponseMessage): agentInterface.FindSocialPeerResponseMessage; + public static create(properties?: agentInterface.INewNodeMessage): agentInterface.NewNodeMessage; /** - * Encodes the specified FindSocialPeerResponseMessage message. Does not implicitly {@link agentInterface.FindSocialPeerResponseMessage.verify|verify} messages. - * @param m FindSocialPeerResponseMessage message or plain object to encode + * Encodes the specified NewNodeMessage message. Does not implicitly {@link agentInterface.NewNodeMessage.verify|verify} messages. + * @param m NewNodeMessage message or plain object to encode * @param [w] Writer to encode to * @returns Writer */ - public static encode(m: agentInterface.IFindSocialPeerResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: agentInterface.INewNodeMessage, w?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FindSocialPeerResponseMessage message, length delimited. Does not implicitly {@link agentInterface.FindSocialPeerResponseMessage.verify|verify} messages. - * @param message FindSocialPeerResponseMessage message or plain object to encode + * Encodes the specified NewNodeMessage message, length delimited. Does not implicitly {@link agentInterface.NewNodeMessage.verify|verify} messages. + * @param message NewNodeMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: agentInterface.IFindSocialPeerResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: agentInterface.INewNodeMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FindSocialPeerResponseMessage message from the specified reader or buffer. + * Decodes a NewNodeMessage message from the specified reader or buffer. * @param r Reader or buffer to decode from * @param [l] Message length if known beforehand - * @returns FindSocialPeerResponseMessage + * @returns NewNodeMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.FindSocialPeerResponseMessage; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.NewNodeMessage; /** - * Decodes a FindSocialPeerResponseMessage message from the specified reader or buffer, length delimited. + * Decodes a NewNodeMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FindSocialPeerResponseMessage + * @returns NewNodeMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.FindSocialPeerResponseMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.NewNodeMessage; } - /** Properties of a ListPeersRequestMessage. */ - interface IListPeersRequestMessage { + /** Properties of a DeriveKeyMessage. */ + interface IDeriveKeyMessage { + + /** DeriveKeyMessage vaultName */ + vaultName?: (string|null); + + /** DeriveKeyMessage keyName */ + keyName?: (string|null); + + /** DeriveKeyMessage passphrase */ + passphrase?: (string|null); } - /** Represents a ListPeersRequestMessage. */ - class ListPeersRequestMessage implements IListPeersRequestMessage { + /** Represents a DeriveKeyMessage. */ + class DeriveKeyMessage implements IDeriveKeyMessage { /** - * Constructs a new ListPeersRequestMessage. + * Constructs a new DeriveKeyMessage. * @param [p] Properties to set */ - constructor(p?: agentInterface.IListPeersRequestMessage); + constructor(p?: agentInterface.IDeriveKeyMessage); + + /** DeriveKeyMessage vaultName. */ + public vaultName: string; + + /** DeriveKeyMessage keyName. */ + public keyName: string; + + /** DeriveKeyMessage passphrase. */ + public passphrase: string; /** - * Creates a new ListPeersRequestMessage instance using the specified properties. + * Creates a new DeriveKeyMessage instance using the specified properties. * @param [properties] Properties to set - * @returns ListPeersRequestMessage instance + * @returns DeriveKeyMessage instance */ - public static create(properties?: agentInterface.IListPeersRequestMessage): agentInterface.ListPeersRequestMessage; + public static create(properties?: agentInterface.IDeriveKeyMessage): agentInterface.DeriveKeyMessage; /** - * Encodes the specified ListPeersRequestMessage message. Does not implicitly {@link agentInterface.ListPeersRequestMessage.verify|verify} messages. - * @param m ListPeersRequestMessage message or plain object to encode + * Encodes the specified DeriveKeyMessage message. Does not implicitly {@link agentInterface.DeriveKeyMessage.verify|verify} messages. + * @param m DeriveKeyMessage message or plain object to encode * @param [w] Writer to encode to * @returns Writer */ - public static encode(m: agentInterface.IListPeersRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: agentInterface.IDeriveKeyMessage, w?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPeersRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ListPeersRequestMessage.verify|verify} messages. - * @param message ListPeersRequestMessage message or plain object to encode + * Encodes the specified DeriveKeyMessage message, length delimited. Does not implicitly {@link agentInterface.DeriveKeyMessage.verify|verify} messages. + * @param message DeriveKeyMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: agentInterface.IListPeersRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: agentInterface.IDeriveKeyMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPeersRequestMessage message from the specified reader or buffer. + * Decodes a DeriveKeyMessage message from the specified reader or buffer. * @param r Reader or buffer to decode from * @param [l] Message length if known beforehand - * @returns ListPeersRequestMessage + * @returns DeriveKeyMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.ListPeersRequestMessage; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.DeriveKeyMessage; /** - * Decodes a ListPeersRequestMessage message from the specified reader or buffer, length delimited. + * Decodes a DeriveKeyMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPeersRequestMessage + * @returns DeriveKeyMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.ListPeersRequestMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.DeriveKeyMessage; } - /** Properties of a ListPeersResponseMessage. */ - interface IListPeersResponseMessage { + /** Properties of a SignFileMessage. */ + interface ISignFileMessage { + + /** SignFileMessage filePath */ + filePath?: (string|null); + + /** SignFileMessage privateKeyPath */ + privateKeyPath?: (string|null); - /** ListPeersResponseMessage publicKeys */ - publicKeys?: (string[]|null); + /** SignFileMessage passphrase */ + passphrase?: (string|null); } - /** Represents a ListPeersResponseMessage. */ - class ListPeersResponseMessage implements IListPeersResponseMessage { + /** Represents a SignFileMessage. */ + class SignFileMessage implements ISignFileMessage { /** - * Constructs a new ListPeersResponseMessage. + * Constructs a new SignFileMessage. * @param [p] Properties to set */ - constructor(p?: agentInterface.IListPeersResponseMessage); + constructor(p?: agentInterface.ISignFileMessage); + + /** SignFileMessage filePath. */ + public filePath: string; + + /** SignFileMessage privateKeyPath. */ + public privateKeyPath: string; - /** ListPeersResponseMessage publicKeys. */ - public publicKeys: string[]; + /** SignFileMessage passphrase. */ + public passphrase: string; /** - * Creates a new ListPeersResponseMessage instance using the specified properties. + * Creates a new SignFileMessage instance using the specified properties. * @param [properties] Properties to set - * @returns ListPeersResponseMessage instance + * @returns SignFileMessage instance */ - public static create(properties?: agentInterface.IListPeersResponseMessage): agentInterface.ListPeersResponseMessage; + public static create(properties?: agentInterface.ISignFileMessage): agentInterface.SignFileMessage; /** - * Encodes the specified ListPeersResponseMessage message. Does not implicitly {@link agentInterface.ListPeersResponseMessage.verify|verify} messages. - * @param m ListPeersResponseMessage message or plain object to encode + * Encodes the specified SignFileMessage message. Does not implicitly {@link agentInterface.SignFileMessage.verify|verify} messages. + * @param m SignFileMessage message or plain object to encode * @param [w] Writer to encode to * @returns Writer */ - public static encode(m: agentInterface.IListPeersResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: agentInterface.ISignFileMessage, w?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPeersResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ListPeersResponseMessage.verify|verify} messages. - * @param message ListPeersResponseMessage message or plain object to encode + * Encodes the specified SignFileMessage message, length delimited. Does not implicitly {@link agentInterface.SignFileMessage.verify|verify} messages. + * @param message SignFileMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: agentInterface.IListPeersResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: agentInterface.ISignFileMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPeersResponseMessage message from the specified reader or buffer. + * Decodes a SignFileMessage message from the specified reader or buffer. * @param r Reader or buffer to decode from * @param [l] Message length if known beforehand - * @returns ListPeersResponseMessage + * @returns SignFileMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.ListPeersResponseMessage; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.SignFileMessage; /** - * Decodes a ListPeersResponseMessage message from the specified reader or buffer, length delimited. + * Decodes a SignFileMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPeersResponseMessage + * @returns SignFileMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.ListPeersResponseMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.SignFileMessage; } - /** Properties of a ToggleStealthRequestMessage. */ - interface IToggleStealthRequestMessage { + /** Properties of a VerifyFileMessage. */ + interface IVerifyFileMessage { - /** ToggleStealthRequestMessage active */ - active?: (boolean|null); + /** VerifyFileMessage filePath */ + filePath?: (string|null); + + /** VerifyFileMessage publicKeyPath */ + publicKeyPath?: (string|null); } - /** Represents a ToggleStealthRequestMessage. */ - class ToggleStealthRequestMessage implements IToggleStealthRequestMessage { + /** Represents a VerifyFileMessage. */ + class VerifyFileMessage implements IVerifyFileMessage { /** - * Constructs a new ToggleStealthRequestMessage. + * Constructs a new VerifyFileMessage. * @param [p] Properties to set */ - constructor(p?: agentInterface.IToggleStealthRequestMessage); + constructor(p?: agentInterface.IVerifyFileMessage); + + /** VerifyFileMessage filePath. */ + public filePath: string; - /** ToggleStealthRequestMessage active. */ - public active: boolean; + /** VerifyFileMessage publicKeyPath. */ + public publicKeyPath: string; /** - * Creates a new ToggleStealthRequestMessage instance using the specified properties. + * Creates a new VerifyFileMessage instance using the specified properties. * @param [properties] Properties to set - * @returns ToggleStealthRequestMessage instance + * @returns VerifyFileMessage instance */ - public static create(properties?: agentInterface.IToggleStealthRequestMessage): agentInterface.ToggleStealthRequestMessage; + public static create(properties?: agentInterface.IVerifyFileMessage): agentInterface.VerifyFileMessage; /** - * Encodes the specified ToggleStealthRequestMessage message. Does not implicitly {@link agentInterface.ToggleStealthRequestMessage.verify|verify} messages. - * @param m ToggleStealthRequestMessage message or plain object to encode + * Encodes the specified VerifyFileMessage message. Does not implicitly {@link agentInterface.VerifyFileMessage.verify|verify} messages. + * @param m VerifyFileMessage message or plain object to encode * @param [w] Writer to encode to * @returns Writer */ - public static encode(m: agentInterface.IToggleStealthRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: agentInterface.IVerifyFileMessage, w?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ToggleStealthRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ToggleStealthRequestMessage.verify|verify} messages. - * @param message ToggleStealthRequestMessage message or plain object to encode + * Encodes the specified VerifyFileMessage message, length delimited. Does not implicitly {@link agentInterface.VerifyFileMessage.verify|verify} messages. + * @param message VerifyFileMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: agentInterface.IToggleStealthRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: agentInterface.IVerifyFileMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ToggleStealthRequestMessage message from the specified reader or buffer. + * Decodes a VerifyFileMessage message from the specified reader or buffer. * @param r Reader or buffer to decode from * @param [l] Message length if known beforehand - * @returns ToggleStealthRequestMessage + * @returns VerifyFileMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.ToggleStealthRequestMessage; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.VerifyFileMessage; /** - * Decodes a ToggleStealthRequestMessage message from the specified reader or buffer, length delimited. + * Decodes a VerifyFileMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ToggleStealthRequestMessage + * @returns VerifyFileMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.ToggleStealthRequestMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.VerifyFileMessage; } - /** Properties of a ToggleStealthResponseMessage. */ - interface IToggleStealthResponseMessage { + /** Properties of a SecretPathMessage. */ + interface ISecretPathMessage { + + /** SecretPathMessage vaultName */ + vaultName?: (string|null); - /** ToggleStealthResponseMessage successful */ - successful?: (boolean|null); + /** SecretPathMessage secretName */ + secretName?: (string|null); } - /** Represents a ToggleStealthResponseMessage. */ - class ToggleStealthResponseMessage implements IToggleStealthResponseMessage { + /** Represents a SecretPathMessage. */ + class SecretPathMessage implements ISecretPathMessage { /** - * Constructs a new ToggleStealthResponseMessage. + * Constructs a new SecretPathMessage. * @param [p] Properties to set */ - constructor(p?: agentInterface.IToggleStealthResponseMessage); + constructor(p?: agentInterface.ISecretPathMessage); + + /** SecretPathMessage vaultName. */ + public vaultName: string; - /** ToggleStealthResponseMessage successful. */ - public successful: boolean; + /** SecretPathMessage secretName. */ + public secretName: string; /** - * Creates a new ToggleStealthResponseMessage instance using the specified properties. + * Creates a new SecretPathMessage instance using the specified properties. * @param [properties] Properties to set - * @returns ToggleStealthResponseMessage instance + * @returns SecretPathMessage instance */ - public static create(properties?: agentInterface.IToggleStealthResponseMessage): agentInterface.ToggleStealthResponseMessage; + public static create(properties?: agentInterface.ISecretPathMessage): agentInterface.SecretPathMessage; /** - * Encodes the specified ToggleStealthResponseMessage message. Does not implicitly {@link agentInterface.ToggleStealthResponseMessage.verify|verify} messages. - * @param m ToggleStealthResponseMessage message or plain object to encode + * Encodes the specified SecretPathMessage message. Does not implicitly {@link agentInterface.SecretPathMessage.verify|verify} messages. + * @param m SecretPathMessage message or plain object to encode * @param [w] Writer to encode to * @returns Writer */ - public static encode(m: agentInterface.IToggleStealthResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: agentInterface.ISecretPathMessage, w?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ToggleStealthResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ToggleStealthResponseMessage.verify|verify} messages. - * @param message ToggleStealthResponseMessage message or plain object to encode + * Encodes the specified SecretPathMessage message, length delimited. Does not implicitly {@link agentInterface.SecretPathMessage.verify|verify} messages. + * @param message SecretPathMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: agentInterface.IToggleStealthResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: agentInterface.ISecretPathMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ToggleStealthResponseMessage message from the specified reader or buffer. + * Decodes a SecretPathMessage message from the specified reader or buffer. * @param r Reader or buffer to decode from * @param [l] Message length if known beforehand - * @returns ToggleStealthResponseMessage + * @returns SecretPathMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.ToggleStealthResponseMessage; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.SecretPathMessage; /** - * Decodes a ToggleStealthResponseMessage message from the specified reader or buffer, length delimited. + * Decodes a SecretPathMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ToggleStealthResponseMessage + * @returns SecretPathMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.ToggleStealthResponseMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.SecretPathMessage; } - /** Properties of an UpdatePeerInfoRequestMessage. */ - interface IUpdatePeerInfoRequestMessage { + /** Properties of a SecretContentMessage. */ + interface ISecretContentMessage { - /** UpdatePeerInfoRequestMessage publicKey */ - publicKey?: (string|null); - - /** UpdatePeerInfoRequestMessage currentNode */ - currentNode?: (boolean|null); + /** SecretContentMessage secretPath */ + secretPath?: (agentInterface.ISecretPathMessage|null); - /** UpdatePeerInfoRequestMessage peerHost */ - peerHost?: (string|null); + /** SecretContentMessage secretFilePath */ + secretFilePath?: (string|null); - /** UpdatePeerInfoRequestMessage peerPort */ - peerPort?: (number|null); - - /** UpdatePeerInfoRequestMessage relayPublicKey */ - relayPublicKey?: (string|null); + /** SecretContentMessage secretContent */ + secretContent?: (string|null); } - /** Represents an UpdatePeerInfoRequestMessage. */ - class UpdatePeerInfoRequestMessage implements IUpdatePeerInfoRequestMessage { + /** Represents a SecretContentMessage. */ + class SecretContentMessage implements ISecretContentMessage { /** - * Constructs a new UpdatePeerInfoRequestMessage. + * Constructs a new SecretContentMessage. * @param [p] Properties to set */ - constructor(p?: agentInterface.IUpdatePeerInfoRequestMessage); + constructor(p?: agentInterface.ISecretContentMessage); - /** UpdatePeerInfoRequestMessage publicKey. */ - public publicKey: string; - - /** UpdatePeerInfoRequestMessage currentNode. */ - public currentNode: boolean; + /** SecretContentMessage secretPath. */ + public secretPath?: (agentInterface.ISecretPathMessage|null); - /** UpdatePeerInfoRequestMessage peerHost. */ - public peerHost: string; + /** SecretContentMessage secretFilePath. */ + public secretFilePath: string; - /** UpdatePeerInfoRequestMessage peerPort. */ - public peerPort: number; - - /** UpdatePeerInfoRequestMessage relayPublicKey. */ - public relayPublicKey: string; + /** SecretContentMessage secretContent. */ + public secretContent: string; /** - * Creates a new UpdatePeerInfoRequestMessage instance using the specified properties. + * Creates a new SecretContentMessage instance using the specified properties. * @param [properties] Properties to set - * @returns UpdatePeerInfoRequestMessage instance + * @returns SecretContentMessage instance */ - public static create(properties?: agentInterface.IUpdatePeerInfoRequestMessage): agentInterface.UpdatePeerInfoRequestMessage; + public static create(properties?: agentInterface.ISecretContentMessage): agentInterface.SecretContentMessage; /** - * Encodes the specified UpdatePeerInfoRequestMessage message. Does not implicitly {@link agentInterface.UpdatePeerInfoRequestMessage.verify|verify} messages. - * @param m UpdatePeerInfoRequestMessage message or plain object to encode + * Encodes the specified SecretContentMessage message. Does not implicitly {@link agentInterface.SecretContentMessage.verify|verify} messages. + * @param m SecretContentMessage message or plain object to encode * @param [w] Writer to encode to * @returns Writer */ - public static encode(m: agentInterface.IUpdatePeerInfoRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: agentInterface.ISecretContentMessage, w?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdatePeerInfoRequestMessage message, length delimited. Does not implicitly {@link agentInterface.UpdatePeerInfoRequestMessage.verify|verify} messages. - * @param message UpdatePeerInfoRequestMessage message or plain object to encode + * Encodes the specified SecretContentMessage message, length delimited. Does not implicitly {@link agentInterface.SecretContentMessage.verify|verify} messages. + * @param message SecretContentMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: agentInterface.IUpdatePeerInfoRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: agentInterface.ISecretContentMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdatePeerInfoRequestMessage message from the specified reader or buffer. + * Decodes a SecretContentMessage message from the specified reader or buffer. * @param r Reader or buffer to decode from * @param [l] Message length if known beforehand - * @returns UpdatePeerInfoRequestMessage + * @returns SecretContentMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.UpdatePeerInfoRequestMessage; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.SecretContentMessage; /** - * Decodes an UpdatePeerInfoRequestMessage message from the specified reader or buffer, length delimited. + * Decodes a SecretContentMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdatePeerInfoRequestMessage + * @returns SecretContentMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.UpdatePeerInfoRequestMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.SecretContentMessage; } - /** Properties of an UpdatePeerInfoResponseMessage. */ - interface IUpdatePeerInfoResponseMessage { + /** Properties of an EncryptFileMessage. */ + interface IEncryptFileMessage { - /** UpdatePeerInfoResponseMessage successful */ - successful?: (boolean|null); + /** EncryptFileMessage filePath */ + filePath?: (string|null); + + /** EncryptFileMessage publicKeyPath */ + publicKeyPath?: (string|null); } - /** Represents an UpdatePeerInfoResponseMessage. */ - class UpdatePeerInfoResponseMessage implements IUpdatePeerInfoResponseMessage { + /** Represents an EncryptFileMessage. */ + class EncryptFileMessage implements IEncryptFileMessage { /** - * Constructs a new UpdatePeerInfoResponseMessage. + * Constructs a new EncryptFileMessage. * @param [p] Properties to set */ - constructor(p?: agentInterface.IUpdatePeerInfoResponseMessage); + constructor(p?: agentInterface.IEncryptFileMessage); + + /** EncryptFileMessage filePath. */ + public filePath: string; - /** UpdatePeerInfoResponseMessage successful. */ - public successful: boolean; + /** EncryptFileMessage publicKeyPath. */ + public publicKeyPath: string; /** - * Creates a new UpdatePeerInfoResponseMessage instance using the specified properties. + * Creates a new EncryptFileMessage instance using the specified properties. * @param [properties] Properties to set - * @returns UpdatePeerInfoResponseMessage instance + * @returns EncryptFileMessage instance */ - public static create(properties?: agentInterface.IUpdatePeerInfoResponseMessage): agentInterface.UpdatePeerInfoResponseMessage; + public static create(properties?: agentInterface.IEncryptFileMessage): agentInterface.EncryptFileMessage; /** - * Encodes the specified UpdatePeerInfoResponseMessage message. Does not implicitly {@link agentInterface.UpdatePeerInfoResponseMessage.verify|verify} messages. - * @param m UpdatePeerInfoResponseMessage message or plain object to encode + * Encodes the specified EncryptFileMessage message. Does not implicitly {@link agentInterface.EncryptFileMessage.verify|verify} messages. + * @param m EncryptFileMessage message or plain object to encode * @param [w] Writer to encode to * @returns Writer */ - public static encode(m: agentInterface.IUpdatePeerInfoResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: agentInterface.IEncryptFileMessage, w?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdatePeerInfoResponseMessage message, length delimited. Does not implicitly {@link agentInterface.UpdatePeerInfoResponseMessage.verify|verify} messages. - * @param message UpdatePeerInfoResponseMessage message or plain object to encode + * Encodes the specified EncryptFileMessage message, length delimited. Does not implicitly {@link agentInterface.EncryptFileMessage.verify|verify} messages. + * @param message EncryptFileMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: agentInterface.IUpdatePeerInfoResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: agentInterface.IEncryptFileMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdatePeerInfoResponseMessage message from the specified reader or buffer. + * Decodes an EncryptFileMessage message from the specified reader or buffer. * @param r Reader or buffer to decode from * @param [l] Message length if known beforehand - * @returns UpdatePeerInfoResponseMessage + * @returns EncryptFileMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.UpdatePeerInfoResponseMessage; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.EncryptFileMessage; /** - * Decodes an UpdatePeerInfoResponseMessage message from the specified reader or buffer, length delimited. + * Decodes an EncryptFileMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdatePeerInfoResponseMessage + * @returns EncryptFileMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.UpdatePeerInfoResponseMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.EncryptFileMessage; } - /** Properties of a RequestRelayRequestMessage. */ - interface IRequestRelayRequestMessage { + /** Properties of a DecryptFileMessage. */ + interface IDecryptFileMessage { - /** RequestRelayRequestMessage publicKey */ - publicKey?: (string|null); + /** DecryptFileMessage filePath */ + filePath?: (string|null); + + /** DecryptFileMessage privateKeyPath */ + privateKeyPath?: (string|null); + + /** DecryptFileMessage passphrase */ + passphrase?: (string|null); } - /** Represents a RequestRelayRequestMessage. */ - class RequestRelayRequestMessage implements IRequestRelayRequestMessage { + /** Represents a DecryptFileMessage. */ + class DecryptFileMessage implements IDecryptFileMessage { /** - * Constructs a new RequestRelayRequestMessage. + * Constructs a new DecryptFileMessage. * @param [p] Properties to set */ - constructor(p?: agentInterface.IRequestRelayRequestMessage); + constructor(p?: agentInterface.IDecryptFileMessage); - /** RequestRelayRequestMessage publicKey. */ - public publicKey: string; + /** DecryptFileMessage filePath. */ + public filePath: string; + + /** DecryptFileMessage privateKeyPath. */ + public privateKeyPath: string; + + /** DecryptFileMessage passphrase. */ + public passphrase: string; /** - * Creates a new RequestRelayRequestMessage instance using the specified properties. + * Creates a new DecryptFileMessage instance using the specified properties. * @param [properties] Properties to set - * @returns RequestRelayRequestMessage instance + * @returns DecryptFileMessage instance */ - public static create(properties?: agentInterface.IRequestRelayRequestMessage): agentInterface.RequestRelayRequestMessage; + public static create(properties?: agentInterface.IDecryptFileMessage): agentInterface.DecryptFileMessage; /** - * Encodes the specified RequestRelayRequestMessage message. Does not implicitly {@link agentInterface.RequestRelayRequestMessage.verify|verify} messages. - * @param m RequestRelayRequestMessage message or plain object to encode + * Encodes the specified DecryptFileMessage message. Does not implicitly {@link agentInterface.DecryptFileMessage.verify|verify} messages. + * @param m DecryptFileMessage message or plain object to encode * @param [w] Writer to encode to * @returns Writer */ - public static encode(m: agentInterface.IRequestRelayRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: agentInterface.IDecryptFileMessage, w?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RequestRelayRequestMessage message, length delimited. Does not implicitly {@link agentInterface.RequestRelayRequestMessage.verify|verify} messages. - * @param message RequestRelayRequestMessage message or plain object to encode + * Encodes the specified DecryptFileMessage message, length delimited. Does not implicitly {@link agentInterface.DecryptFileMessage.verify|verify} messages. + * @param message DecryptFileMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: agentInterface.IRequestRelayRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: agentInterface.IDecryptFileMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RequestRelayRequestMessage message from the specified reader or buffer. + * Decodes a DecryptFileMessage message from the specified reader or buffer. * @param r Reader or buffer to decode from * @param [l] Message length if known beforehand - * @returns RequestRelayRequestMessage + * @returns DecryptFileMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.RequestRelayRequestMessage; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.DecryptFileMessage; /** - * Decodes a RequestRelayRequestMessage message from the specified reader or buffer, length delimited. + * Decodes a DecryptFileMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RequestRelayRequestMessage + * @returns DecryptFileMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.RequestRelayRequestMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.DecryptFileMessage; } - /** Properties of a RequestRelayResponseMessage. */ - interface IRequestRelayResponseMessage { + /** Properties of a KeyPairMessage. */ + interface IKeyPairMessage { + + /** KeyPairMessage publicKey */ + publicKey?: (string|null); - /** RequestRelayResponseMessage successful */ - successful?: (boolean|null); + /** KeyPairMessage privateKey */ + privateKey?: (string|null); } - /** Represents a RequestRelayResponseMessage. */ - class RequestRelayResponseMessage implements IRequestRelayResponseMessage { + /** Represents a KeyPairMessage. */ + class KeyPairMessage implements IKeyPairMessage { /** - * Constructs a new RequestRelayResponseMessage. + * Constructs a new KeyPairMessage. * @param [p] Properties to set */ - constructor(p?: agentInterface.IRequestRelayResponseMessage); + constructor(p?: agentInterface.IKeyPairMessage); + + /** KeyPairMessage publicKey. */ + public publicKey: string; - /** RequestRelayResponseMessage successful. */ - public successful: boolean; + /** KeyPairMessage privateKey. */ + public privateKey: string; /** - * Creates a new RequestRelayResponseMessage instance using the specified properties. + * Creates a new KeyPairMessage instance using the specified properties. * @param [properties] Properties to set - * @returns RequestRelayResponseMessage instance + * @returns KeyPairMessage instance */ - public static create(properties?: agentInterface.IRequestRelayResponseMessage): agentInterface.RequestRelayResponseMessage; + public static create(properties?: agentInterface.IKeyPairMessage): agentInterface.KeyPairMessage; /** - * Encodes the specified RequestRelayResponseMessage message. Does not implicitly {@link agentInterface.RequestRelayResponseMessage.verify|verify} messages. - * @param m RequestRelayResponseMessage message or plain object to encode + * Encodes the specified KeyPairMessage message. Does not implicitly {@link agentInterface.KeyPairMessage.verify|verify} messages. + * @param m KeyPairMessage message or plain object to encode * @param [w] Writer to encode to * @returns Writer */ - public static encode(m: agentInterface.IRequestRelayResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: agentInterface.IKeyPairMessage, w?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RequestRelayResponseMessage message, length delimited. Does not implicitly {@link agentInterface.RequestRelayResponseMessage.verify|verify} messages. - * @param message RequestRelayResponseMessage message or plain object to encode + * Encodes the specified KeyPairMessage message, length delimited. Does not implicitly {@link agentInterface.KeyPairMessage.verify|verify} messages. + * @param message KeyPairMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: agentInterface.IRequestRelayResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: agentInterface.IKeyPairMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RequestRelayResponseMessage message from the specified reader or buffer. + * Decodes a KeyPairMessage message from the specified reader or buffer. * @param r Reader or buffer to decode from * @param [l] Message length if known beforehand - * @returns RequestRelayResponseMessage + * @returns KeyPairMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.RequestRelayResponseMessage; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.KeyPairMessage; /** - * Decodes a RequestRelayResponseMessage message from the specified reader or buffer, length delimited. + * Decodes a KeyPairMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RequestRelayResponseMessage + * @returns KeyPairMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.RequestRelayResponseMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.KeyPairMessage; } - /** Properties of a RequestPunchRequestMessage. */ - interface IRequestPunchRequestMessage { + /** Properties of a VaultPathMessage. */ + interface IVaultPathMessage { - /** RequestPunchRequestMessage publicKey */ + /** VaultPathMessage vaultName */ + vaultName?: (string|null); + + /** VaultPathMessage publicKey */ publicKey?: (string|null); } - /** Represents a RequestPunchRequestMessage. */ - class RequestPunchRequestMessage implements IRequestPunchRequestMessage { + /** Represents a VaultPathMessage. */ + class VaultPathMessage implements IVaultPathMessage { /** - * Constructs a new RequestPunchRequestMessage. + * Constructs a new VaultPathMessage. * @param [p] Properties to set */ - constructor(p?: agentInterface.IRequestPunchRequestMessage); + constructor(p?: agentInterface.IVaultPathMessage); + + /** VaultPathMessage vaultName. */ + public vaultName: string; - /** RequestPunchRequestMessage publicKey. */ + /** VaultPathMessage publicKey. */ public publicKey: string; /** - * Creates a new RequestPunchRequestMessage instance using the specified properties. + * Creates a new VaultPathMessage instance using the specified properties. * @param [properties] Properties to set - * @returns RequestPunchRequestMessage instance + * @returns VaultPathMessage instance */ - public static create(properties?: agentInterface.IRequestPunchRequestMessage): agentInterface.RequestPunchRequestMessage; + public static create(properties?: agentInterface.IVaultPathMessage): agentInterface.VaultPathMessage; /** - * Encodes the specified RequestPunchRequestMessage message. Does not implicitly {@link agentInterface.RequestPunchRequestMessage.verify|verify} messages. - * @param m RequestPunchRequestMessage message or plain object to encode + * Encodes the specified VaultPathMessage message. Does not implicitly {@link agentInterface.VaultPathMessage.verify|verify} messages. + * @param m VaultPathMessage message or plain object to encode * @param [w] Writer to encode to * @returns Writer */ - public static encode(m: agentInterface.IRequestPunchRequestMessage, w?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: agentInterface.IVaultPathMessage, w?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RequestPunchRequestMessage message, length delimited. Does not implicitly {@link agentInterface.RequestPunchRequestMessage.verify|verify} messages. - * @param message RequestPunchRequestMessage message or plain object to encode + * Encodes the specified VaultPathMessage message, length delimited. Does not implicitly {@link agentInterface.VaultPathMessage.verify|verify} messages. + * @param message VaultPathMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: agentInterface.IRequestPunchRequestMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: agentInterface.IVaultPathMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RequestPunchRequestMessage message from the specified reader or buffer. + * Decodes a VaultPathMessage message from the specified reader or buffer. * @param r Reader or buffer to decode from * @param [l] Message length if known beforehand - * @returns RequestPunchRequestMessage + * @returns VaultPathMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.RequestPunchRequestMessage; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.VaultPathMessage; /** - * Decodes a RequestPunchRequestMessage message from the specified reader or buffer, length delimited. + * Decodes a VaultPathMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RequestPunchRequestMessage + * @returns VaultPathMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.RequestPunchRequestMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.VaultPathMessage; } - /** Properties of a RequestPunchResponseMessage. */ - interface IRequestPunchResponseMessage { + /** Properties of a ContactPeerMessage. */ + interface IContactPeerMessage { - /** RequestPunchResponseMessage address */ - address?: (string|null); + /** ContactPeerMessage publicKeyOrHandle */ + publicKeyOrHandle?: (string|null); + + /** ContactPeerMessage timeout */ + timeout?: (number|null); } - /** Represents a RequestPunchResponseMessage. */ - class RequestPunchResponseMessage implements IRequestPunchResponseMessage { + /** Represents a ContactPeerMessage. */ + class ContactPeerMessage implements IContactPeerMessage { /** - * Constructs a new RequestPunchResponseMessage. + * Constructs a new ContactPeerMessage. * @param [p] Properties to set */ - constructor(p?: agentInterface.IRequestPunchResponseMessage); + constructor(p?: agentInterface.IContactPeerMessage); - /** RequestPunchResponseMessage address. */ - public address: string; + /** ContactPeerMessage publicKeyOrHandle. */ + public publicKeyOrHandle: string; + + /** ContactPeerMessage timeout. */ + public timeout: number; /** - * Creates a new RequestPunchResponseMessage instance using the specified properties. + * Creates a new ContactPeerMessage instance using the specified properties. * @param [properties] Properties to set - * @returns RequestPunchResponseMessage instance + * @returns ContactPeerMessage instance */ - public static create(properties?: agentInterface.IRequestPunchResponseMessage): agentInterface.RequestPunchResponseMessage; + public static create(properties?: agentInterface.IContactPeerMessage): agentInterface.ContactPeerMessage; /** - * Encodes the specified RequestPunchResponseMessage message. Does not implicitly {@link agentInterface.RequestPunchResponseMessage.verify|verify} messages. - * @param m RequestPunchResponseMessage message or plain object to encode + * Encodes the specified ContactPeerMessage message. Does not implicitly {@link agentInterface.ContactPeerMessage.verify|verify} messages. + * @param m ContactPeerMessage message or plain object to encode * @param [w] Writer to encode to * @returns Writer */ - public static encode(m: agentInterface.IRequestPunchResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: agentInterface.IContactPeerMessage, w?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RequestPunchResponseMessage message, length delimited. Does not implicitly {@link agentInterface.RequestPunchResponseMessage.verify|verify} messages. - * @param message RequestPunchResponseMessage message or plain object to encode + * Encodes the specified ContactPeerMessage message, length delimited. Does not implicitly {@link agentInterface.ContactPeerMessage.verify|verify} messages. + * @param message ContactPeerMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: agentInterface.IRequestPunchResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: agentInterface.IContactPeerMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RequestPunchResponseMessage message from the specified reader or buffer. + * Decodes a ContactPeerMessage message from the specified reader or buffer. * @param r Reader or buffer to decode from * @param [l] Message length if known beforehand - * @returns RequestPunchResponseMessage + * @returns ContactPeerMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.RequestPunchResponseMessage; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): agentInterface.ContactPeerMessage; /** - * Decodes a RequestPunchResponseMessage message from the specified reader or buffer, length delimited. + * Decodes a ContactPeerMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RequestPunchResponseMessage + * @returns ContactPeerMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.RequestPunchResponseMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): agentInterface.ContactPeerMessage; } } } diff --git a/proto/js/Agent.js b/proto/js/Agent.js index 3ad74d5e97..6d9e0818fe 100644 --- a/proto/js/Agent.js +++ b/proto/js/Agent.js @@ -18,6623 +18,1246 @@ $root.agentInterface = (function() { */ var agentInterface = {}; - /** - * AgentMessageType enum. - * @name agentInterface.AgentMessageType - * @enum {number} - * @property {number} ERROR=0 ERROR value - * @property {number} STOP_AGENT=1 STOP_AGENT value - * @property {number} STATUS=2 STATUS value - * @property {number} REGISTER_NODE=3 REGISTER_NODE value - * @property {number} NEW_NODE=4 NEW_NODE value - * @property {number} LIST_NODES=5 LIST_NODES value - * @property {number} DERIVE_KEY=6 DERIVE_KEY value - * @property {number} SIGN_FILE=7 SIGN_FILE value - * @property {number} VERIFY_FILE=8 VERIFY_FILE value - * @property {number} LIST_VAULTS=9 LIST_VAULTS value - * @property {number} NEW_VAULT=10 NEW_VAULT value - * @property {number} DESTROY_VAULT=11 DESTROY_VAULT value - * @property {number} LIST_SECRETS=12 LIST_SECRETS value - * @property {number} CREATE_SECRET=13 CREATE_SECRET value - * @property {number} DESTROY_SECRET=14 DESTROY_SECRET value - * @property {number} GET_SECRET=15 GET_SECRET value - * @property {number} LIST_KEYS=16 LIST_KEYS value - * @property {number} GET_KEY=17 GET_KEY value - * @property {number} DELETE_KEY=18 DELETE_KEY value - * @property {number} ENCRYPT_FILE=19 ENCRYPT_FILE value - * @property {number} DECRYPT_FILE=20 DECRYPT_FILE value - * @property {number} GET_PRIMARY_KEYPAIR=21 GET_PRIMARY_KEYPAIR value - * @property {number} UPDATE_SECRET=22 UPDATE_SECRET value - * @property {number} GET_PEER_INFO=23 GET_PEER_INFO value - * @property {number} ADD_PEER=24 ADD_PEER value - * @property {number} PULL_VAULT=26 PULL_VAULT value - * @property {number} PING_PEER=27 PING_PEER value - * @property {number} FIND_PEER=28 FIND_PEER value - * @property {number} FIND_SOCIAL_PEER=29 FIND_SOCIAL_PEER value - * @property {number} LIST_PEERS=30 LIST_PEERS value - * @property {number} TOGGLE_STEALTH=31 TOGGLE_STEALTH value - * @property {number} UPDATE_PEER_INFO=32 UPDATE_PEER_INFO value - * @property {number} REQUEST_RELAY=33 REQUEST_RELAY value - * @property {number} REQUEST_PUNCH=34 REQUEST_PUNCH value - * @property {number} SCAN_VAULT_NAMES=35 SCAN_VAULT_NAMES value - */ - agentInterface.AgentMessageType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ERROR"] = 0; - values[valuesById[1] = "STOP_AGENT"] = 1; - values[valuesById[2] = "STATUS"] = 2; - values[valuesById[3] = "REGISTER_NODE"] = 3; - values[valuesById[4] = "NEW_NODE"] = 4; - values[valuesById[5] = "LIST_NODES"] = 5; - values[valuesById[6] = "DERIVE_KEY"] = 6; - values[valuesById[7] = "SIGN_FILE"] = 7; - values[valuesById[8] = "VERIFY_FILE"] = 8; - values[valuesById[9] = "LIST_VAULTS"] = 9; - values[valuesById[10] = "NEW_VAULT"] = 10; - values[valuesById[11] = "DESTROY_VAULT"] = 11; - values[valuesById[12] = "LIST_SECRETS"] = 12; - values[valuesById[13] = "CREATE_SECRET"] = 13; - values[valuesById[14] = "DESTROY_SECRET"] = 14; - values[valuesById[15] = "GET_SECRET"] = 15; - values[valuesById[16] = "LIST_KEYS"] = 16; - values[valuesById[17] = "GET_KEY"] = 17; - values[valuesById[18] = "DELETE_KEY"] = 18; - values[valuesById[19] = "ENCRYPT_FILE"] = 19; - values[valuesById[20] = "DECRYPT_FILE"] = 20; - values[valuesById[21] = "GET_PRIMARY_KEYPAIR"] = 21; - values[valuesById[22] = "UPDATE_SECRET"] = 22; - values[valuesById[23] = "GET_PEER_INFO"] = 23; - values[valuesById[24] = "ADD_PEER"] = 24; - values[valuesById[26] = "PULL_VAULT"] = 26; - values[valuesById[27] = "PING_PEER"] = 27; - values[valuesById[28] = "FIND_PEER"] = 28; - values[valuesById[29] = "FIND_SOCIAL_PEER"] = 29; - values[valuesById[30] = "LIST_PEERS"] = 30; - values[valuesById[31] = "TOGGLE_STEALTH"] = 31; - values[valuesById[32] = "UPDATE_PEER_INFO"] = 32; - values[valuesById[33] = "REQUEST_RELAY"] = 33; - values[valuesById[34] = "REQUEST_PUNCH"] = 34; - values[valuesById[35] = "SCAN_VAULT_NAMES"] = 35; - return values; - })(); - - agentInterface.AgentMessage = (function() { + agentInterface.Agent = (function() { /** - * Properties of an AgentMessage. + * Constructs a new Agent service. * @memberof agentInterface - * @interface IAgentMessage - * @property {agentInterface.AgentMessageType|null} [type] AgentMessage type - * @property {boolean|null} [isResponse] AgentMessage isResponse - * @property {string|null} [nodePath] AgentMessage nodePath - * @property {Uint8Array|null} [subMessage] AgentMessage subMessage + * @classdesc Represents an Agent + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ + function Agent(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Agent.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Agent; /** - * Constructs a new AgentMessage. - * @memberof agentInterface - * @classdesc Represents an AgentMessage. - * @implements IAgentMessage - * @constructor - * @param {agentInterface.IAgentMessage=} [p] Properties to set + * Creates new Agent service using the specified rpc implementation. + * @function create + * @memberof agentInterface.Agent + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Agent} RPC service. Useful where requests and/or responses are streamed. */ - function AgentMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } + Agent.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * AgentMessage type. - * @member {agentInterface.AgentMessageType} type - * @memberof agentInterface.AgentMessage - * @instance + * Callback as used by {@link agentInterface.Agent#addPeer}. + * @memberof agentInterface.Agent + * @typedef AddPeerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.BooleanMessage} [response] BooleanMessage */ - AgentMessage.prototype.type = 0; /** - * AgentMessage isResponse. - * @member {boolean} isResponse - * @memberof agentInterface.AgentMessage + * Calls AddPeer. + * @function addPeer + * @memberof agentInterface.Agent * @instance + * @param {agentInterface.IPeerInfoMessage} request PeerInfoMessage message or plain object + * @param {agentInterface.Agent.AddPeerCallback} callback Node-style callback called with the error, if any, and BooleanMessage + * @returns {undefined} + * @variation 1 */ - AgentMessage.prototype.isResponse = false; + Object.defineProperty(Agent.prototype.addPeer = function addPeer(request, callback) { + return this.rpcCall(addPeer, $root.agentInterface.PeerInfoMessage, $root.agentInterface.BooleanMessage, request, callback); + }, "name", { value: "AddPeer" }); /** - * AgentMessage nodePath. - * @member {string} nodePath - * @memberof agentInterface.AgentMessage + * Calls AddPeer. + * @function addPeer + * @memberof agentInterface.Agent * @instance + * @param {agentInterface.IPeerInfoMessage} request PeerInfoMessage message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link agentInterface.Agent#decryptFile}. + * @memberof agentInterface.Agent + * @typedef DecryptFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.StringMessage} [response] StringMessage */ - AgentMessage.prototype.nodePath = ""; /** - * AgentMessage subMessage. - * @member {Uint8Array} subMessage - * @memberof agentInterface.AgentMessage + * Calls DecryptFile. + * @function decryptFile + * @memberof agentInterface.Agent * @instance + * @param {agentInterface.IDecryptFileMessage} request DecryptFileMessage message or plain object + * @param {agentInterface.Agent.DecryptFileCallback} callback Node-style callback called with the error, if any, and StringMessage + * @returns {undefined} + * @variation 1 */ - AgentMessage.prototype.subMessage = $util.newBuffer([]); + Object.defineProperty(Agent.prototype.decryptFile = function decryptFile(request, callback) { + return this.rpcCall(decryptFile, $root.agentInterface.DecryptFileMessage, $root.agentInterface.StringMessage, request, callback); + }, "name", { value: "DecryptFile" }); /** - * Creates a new AgentMessage instance using the specified properties. - * @function create - * @memberof agentInterface.AgentMessage - * @static - * @param {agentInterface.IAgentMessage=} [properties] Properties to set - * @returns {agentInterface.AgentMessage} AgentMessage instance + * Calls DecryptFile. + * @function decryptFile + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IDecryptFileMessage} request DecryptFileMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - AgentMessage.create = function create(properties) { - return new AgentMessage(properties); - }; /** - * Encodes the specified AgentMessage message. Does not implicitly {@link agentInterface.AgentMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.AgentMessage - * @static - * @param {agentInterface.IAgentMessage} m AgentMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link agentInterface.Agent#deleteKey}. + * @memberof agentInterface.Agent + * @typedef DeleteKeyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.BooleanMessage} [response] BooleanMessage */ - AgentMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.type != null && Object.hasOwnProperty.call(m, "type")) - w.uint32(8).int32(m.type); - if (m.isResponse != null && Object.hasOwnProperty.call(m, "isResponse")) - w.uint32(16).bool(m.isResponse); - if (m.nodePath != null && Object.hasOwnProperty.call(m, "nodePath")) - w.uint32(26).string(m.nodePath); - if (m.subMessage != null && Object.hasOwnProperty.call(m, "subMessage")) - w.uint32(34).bytes(m.subMessage); - return w; - }; /** - * Encodes the specified AgentMessage message, length delimited. Does not implicitly {@link agentInterface.AgentMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.AgentMessage - * @static - * @param {agentInterface.IAgentMessage} message AgentMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls DeleteKey. + * @function deleteKey + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IStringMessage} request StringMessage message or plain object + * @param {agentInterface.Agent.DeleteKeyCallback} callback Node-style callback called with the error, if any, and BooleanMessage + * @returns {undefined} + * @variation 1 */ - AgentMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(Agent.prototype.deleteKey = function deleteKey(request, callback) { + return this.rpcCall(deleteKey, $root.agentInterface.StringMessage, $root.agentInterface.BooleanMessage, request, callback); + }, "name", { value: "DeleteKey" }); /** - * Decodes an AgentMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.AgentMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.AgentMessage} AgentMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteKey. + * @function deleteKey + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IStringMessage} request StringMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - AgentMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.AgentMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.type = r.int32(); - break; - case 2: - m.isResponse = r.bool(); - break; - case 3: - m.nodePath = r.string(); - break; - case 4: - m.subMessage = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; /** - * Decodes an AgentMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.AgentMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.AgentMessage} AgentMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link agentInterface.Agent#deleteSecret}. + * @memberof agentInterface.Agent + * @typedef DeleteSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.BooleanMessage} [response] BooleanMessage */ - AgentMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - return AgentMessage; - })(); + /** + * Calls DeleteSecret. + * @function deleteSecret + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.ISecretPathMessage} request SecretPathMessage message or plain object + * @param {agentInterface.Agent.DeleteSecretCallback} callback Node-style callback called with the error, if any, and BooleanMessage + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Agent.prototype.deleteSecret = function deleteSecret(request, callback) { + return this.rpcCall(deleteSecret, $root.agentInterface.SecretPathMessage, $root.agentInterface.BooleanMessage, request, callback); + }, "name", { value: "DeleteSecret" }); - agentInterface.ErrorMessage = (function() { + /** + * Calls DeleteSecret. + * @function deleteSecret + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.ISecretPathMessage} request SecretPathMessage message or plain object + * @returns {Promise} Promise + * @variation 2 + */ /** - * Properties of an ErrorMessage. - * @memberof agentInterface - * @interface IErrorMessage - * @property {string|null} [error] ErrorMessage error + * Callback as used by {@link agentInterface.Agent#deleteVault}. + * @memberof agentInterface.Agent + * @typedef DeleteVaultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.BooleanMessage} [response] BooleanMessage */ /** - * Constructs a new ErrorMessage. - * @memberof agentInterface - * @classdesc Represents an ErrorMessage. - * @implements IErrorMessage - * @constructor - * @param {agentInterface.IErrorMessage=} [p] Properties to set + * Calls DeleteVault. + * @function deleteVault + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IStringMessage} request StringMessage message or plain object + * @param {agentInterface.Agent.DeleteVaultCallback} callback Node-style callback called with the error, if any, and BooleanMessage + * @returns {undefined} + * @variation 1 */ - function ErrorMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } + Object.defineProperty(Agent.prototype.deleteVault = function deleteVault(request, callback) { + return this.rpcCall(deleteVault, $root.agentInterface.StringMessage, $root.agentInterface.BooleanMessage, request, callback); + }, "name", { value: "DeleteVault" }); /** - * ErrorMessage error. - * @member {string} error - * @memberof agentInterface.ErrorMessage + * Calls DeleteVault. + * @function deleteVault + * @memberof agentInterface.Agent * @instance + * @param {agentInterface.IStringMessage} request StringMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ErrorMessage.prototype.error = ""; /** - * Creates a new ErrorMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ErrorMessage - * @static - * @param {agentInterface.IErrorMessage=} [properties] Properties to set - * @returns {agentInterface.ErrorMessage} ErrorMessage instance + * Callback as used by {@link agentInterface.Agent#deriveKey}. + * @memberof agentInterface.Agent + * @typedef DeriveKeyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.BooleanMessage} [response] BooleanMessage */ - ErrorMessage.create = function create(properties) { - return new ErrorMessage(properties); - }; /** - * Encodes the specified ErrorMessage message. Does not implicitly {@link agentInterface.ErrorMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ErrorMessage - * @static - * @param {agentInterface.IErrorMessage} m ErrorMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls DeriveKey. + * @function deriveKey + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IDeriveKeyMessage} request DeriveKeyMessage message or plain object + * @param {agentInterface.Agent.DeriveKeyCallback} callback Node-style callback called with the error, if any, and BooleanMessage + * @returns {undefined} + * @variation 1 */ - ErrorMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.error != null && Object.hasOwnProperty.call(m, "error")) - w.uint32(10).string(m.error); - return w; - }; + Object.defineProperty(Agent.prototype.deriveKey = function deriveKey(request, callback) { + return this.rpcCall(deriveKey, $root.agentInterface.DeriveKeyMessage, $root.agentInterface.BooleanMessage, request, callback); + }, "name", { value: "DeriveKey" }); /** - * Encodes the specified ErrorMessage message, length delimited. Does not implicitly {@link agentInterface.ErrorMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ErrorMessage - * @static - * @param {agentInterface.IErrorMessage} message ErrorMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls DeriveKey. + * @function deriveKey + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IDeriveKeyMessage} request DeriveKeyMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ErrorMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes an ErrorMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ErrorMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ErrorMessage} ErrorMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link agentInterface.Agent#encryptFile}. + * @memberof agentInterface.Agent + * @typedef EncryptFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.StringMessage} [response] StringMessage */ - ErrorMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ErrorMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.error = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; /** - * Decodes an ErrorMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ErrorMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ErrorMessage} ErrorMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls EncryptFile. + * @function encryptFile + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IEncryptFileMessage} request EncryptFileMessage message or plain object + * @param {agentInterface.Agent.EncryptFileCallback} callback Node-style callback called with the error, if any, and StringMessage + * @returns {undefined} + * @variation 1 */ - ErrorMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(Agent.prototype.encryptFile = function encryptFile(request, callback) { + return this.rpcCall(encryptFile, $root.agentInterface.EncryptFileMessage, $root.agentInterface.StringMessage, request, callback); + }, "name", { value: "EncryptFile" }); - return ErrorMessage; - })(); + /** + * Calls EncryptFile. + * @function encryptFile + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IEncryptFileMessage} request EncryptFileMessage message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * AgentStatusType enum. - * @name agentInterface.AgentStatusType - * @enum {number} - * @property {number} ONLINE=0 ONLINE value - * @property {number} OFFLINE=1 OFFLINE value - * @property {number} ERRORED=2 ERRORED value - */ - agentInterface.AgentStatusType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ONLINE"] = 0; - values[valuesById[1] = "OFFLINE"] = 1; - values[valuesById[2] = "ERRORED"] = 2; - return values; - })(); + /** + * Callback as used by {@link agentInterface.Agent#findPeer}. + * @memberof agentInterface.Agent + * @typedef FindPeerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.BooleanMessage} [response] BooleanMessage + */ - agentInterface.AgentStatusResponseMessage = (function() { + /** + * Calls FindPeer. + * @function findPeer + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IContactPeerMessage} request ContactPeerMessage message or plain object + * @param {agentInterface.Agent.FindPeerCallback} callback Node-style callback called with the error, if any, and BooleanMessage + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Agent.prototype.findPeer = function findPeer(request, callback) { + return this.rpcCall(findPeer, $root.agentInterface.ContactPeerMessage, $root.agentInterface.BooleanMessage, request, callback); + }, "name", { value: "FindPeer" }); /** - * Properties of an AgentStatusResponseMessage. - * @memberof agentInterface - * @interface IAgentStatusResponseMessage - * @property {agentInterface.AgentStatusType|null} [status] AgentStatusResponseMessage status + * Calls FindPeer. + * @function findPeer + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IContactPeerMessage} request ContactPeerMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new AgentStatusResponseMessage. - * @memberof agentInterface - * @classdesc Represents an AgentStatusResponseMessage. - * @implements IAgentStatusResponseMessage - * @constructor - * @param {agentInterface.IAgentStatusResponseMessage=} [p] Properties to set + * Callback as used by {@link agentInterface.Agent#findSocialPeer}. + * @memberof agentInterface.Agent + * @typedef FindSocialPeerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.BooleanMessage} [response] BooleanMessage */ - function AgentStatusResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } /** - * AgentStatusResponseMessage status. - * @member {agentInterface.AgentStatusType} status - * @memberof agentInterface.AgentStatusResponseMessage + * Calls FindSocialPeer. + * @function findSocialPeer + * @memberof agentInterface.Agent * @instance + * @param {agentInterface.IContactPeerMessage} request ContactPeerMessage message or plain object + * @param {agentInterface.Agent.FindSocialPeerCallback} callback Node-style callback called with the error, if any, and BooleanMessage + * @returns {undefined} + * @variation 1 */ - AgentStatusResponseMessage.prototype.status = 0; + Object.defineProperty(Agent.prototype.findSocialPeer = function findSocialPeer(request, callback) { + return this.rpcCall(findSocialPeer, $root.agentInterface.ContactPeerMessage, $root.agentInterface.BooleanMessage, request, callback); + }, "name", { value: "FindSocialPeer" }); /** - * Creates a new AgentStatusResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.AgentStatusResponseMessage - * @static - * @param {agentInterface.IAgentStatusResponseMessage=} [properties] Properties to set - * @returns {agentInterface.AgentStatusResponseMessage} AgentStatusResponseMessage instance + * Calls FindSocialPeer. + * @function findSocialPeer + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IContactPeerMessage} request ContactPeerMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - AgentStatusResponseMessage.create = function create(properties) { - return new AgentStatusResponseMessage(properties); - }; /** - * Encodes the specified AgentStatusResponseMessage message. Does not implicitly {@link agentInterface.AgentStatusResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.AgentStatusResponseMessage - * @static - * @param {agentInterface.IAgentStatusResponseMessage} m AgentStatusResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link agentInterface.Agent#getKey}. + * @memberof agentInterface.Agent + * @typedef GetKeyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.StringMessage} [response] StringMessage */ - AgentStatusResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.status != null && Object.hasOwnProperty.call(m, "status")) - w.uint32(8).int32(m.status); - return w; - }; /** - * Encodes the specified AgentStatusResponseMessage message, length delimited. Does not implicitly {@link agentInterface.AgentStatusResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.AgentStatusResponseMessage - * @static - * @param {agentInterface.IAgentStatusResponseMessage} message AgentStatusResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetKey. + * @function getKey + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IStringMessage} request StringMessage message or plain object + * @param {agentInterface.Agent.GetKeyCallback} callback Node-style callback called with the error, if any, and StringMessage + * @returns {undefined} + * @variation 1 */ - AgentStatusResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(Agent.prototype.getKey = function getKey(request, callback) { + return this.rpcCall(getKey, $root.agentInterface.StringMessage, $root.agentInterface.StringMessage, request, callback); + }, "name", { value: "GetKey" }); /** - * Decodes an AgentStatusResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.AgentStatusResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.AgentStatusResponseMessage} AgentStatusResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetKey. + * @function getKey + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IStringMessage} request StringMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - AgentStatusResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.AgentStatusResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.status = r.int32(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; /** - * Decodes an AgentStatusResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.AgentStatusResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.AgentStatusResponseMessage} AgentStatusResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link agentInterface.Agent#getLocalPeerInfo}. + * @memberof agentInterface.Agent + * @typedef GetLocalPeerInfoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.PeerInfoMessage} [response] PeerInfoMessage */ - AgentStatusResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - return AgentStatusResponseMessage; - })(); + /** + * Calls GetLocalPeerInfo. + * @function getLocalPeerInfo + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IEmptyMessage} request EmptyMessage message or plain object + * @param {agentInterface.Agent.GetLocalPeerInfoCallback} callback Node-style callback called with the error, if any, and PeerInfoMessage + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Agent.prototype.getLocalPeerInfo = function getLocalPeerInfo(request, callback) { + return this.rpcCall(getLocalPeerInfo, $root.agentInterface.EmptyMessage, $root.agentInterface.PeerInfoMessage, request, callback); + }, "name", { value: "GetLocalPeerInfo" }); - agentInterface.RegisterNodeRequestMessage = (function() { + /** + * Calls GetLocalPeerInfo. + * @function getLocalPeerInfo + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IEmptyMessage} request EmptyMessage message or plain object + * @returns {Promise} Promise + * @variation 2 + */ /** - * Properties of a RegisterNodeRequestMessage. - * @memberof agentInterface - * @interface IRegisterNodeRequestMessage - * @property {string|null} [passphrase] RegisterNodeRequestMessage passphrase + * Callback as used by {@link agentInterface.Agent#getPeerInfo}. + * @memberof agentInterface.Agent + * @typedef GetPeerInfoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.PeerInfoMessage} [response] PeerInfoMessage */ /** - * Constructs a new RegisterNodeRequestMessage. - * @memberof agentInterface - * @classdesc Represents a RegisterNodeRequestMessage. - * @implements IRegisterNodeRequestMessage - * @constructor - * @param {agentInterface.IRegisterNodeRequestMessage=} [p] Properties to set + * Calls GetPeerInfo. + * @function getPeerInfo + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IStringMessage} request StringMessage message or plain object + * @param {agentInterface.Agent.GetPeerInfoCallback} callback Node-style callback called with the error, if any, and PeerInfoMessage + * @returns {undefined} + * @variation 1 */ - function RegisterNodeRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } + Object.defineProperty(Agent.prototype.getPeerInfo = function getPeerInfo(request, callback) { + return this.rpcCall(getPeerInfo, $root.agentInterface.StringMessage, $root.agentInterface.PeerInfoMessage, request, callback); + }, "name", { value: "GetPeerInfo" }); /** - * RegisterNodeRequestMessage passphrase. - * @member {string} passphrase - * @memberof agentInterface.RegisterNodeRequestMessage + * Calls GetPeerInfo. + * @function getPeerInfo + * @memberof agentInterface.Agent * @instance + * @param {agentInterface.IStringMessage} request StringMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - RegisterNodeRequestMessage.prototype.passphrase = ""; /** - * Creates a new RegisterNodeRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.RegisterNodeRequestMessage - * @static - * @param {agentInterface.IRegisterNodeRequestMessage=} [properties] Properties to set - * @returns {agentInterface.RegisterNodeRequestMessage} RegisterNodeRequestMessage instance + * Callback as used by {@link agentInterface.Agent#getPrimaryKeyPair}. + * @memberof agentInterface.Agent + * @typedef GetPrimaryKeyPairCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.KeyPairMessage} [response] KeyPairMessage */ - RegisterNodeRequestMessage.create = function create(properties) { - return new RegisterNodeRequestMessage(properties); - }; /** - * Encodes the specified RegisterNodeRequestMessage message. Does not implicitly {@link agentInterface.RegisterNodeRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.RegisterNodeRequestMessage - * @static - * @param {agentInterface.IRegisterNodeRequestMessage} m RegisterNodeRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetPrimaryKeyPair. + * @function getPrimaryKeyPair + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IBooleanMessage} request BooleanMessage message or plain object + * @param {agentInterface.Agent.GetPrimaryKeyPairCallback} callback Node-style callback called with the error, if any, and KeyPairMessage + * @returns {undefined} + * @variation 1 */ - RegisterNodeRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.passphrase != null && Object.hasOwnProperty.call(m, "passphrase")) - w.uint32(10).string(m.passphrase); - return w; - }; + Object.defineProperty(Agent.prototype.getPrimaryKeyPair = function getPrimaryKeyPair(request, callback) { + return this.rpcCall(getPrimaryKeyPair, $root.agentInterface.BooleanMessage, $root.agentInterface.KeyPairMessage, request, callback); + }, "name", { value: "GetPrimaryKeyPair" }); /** - * Encodes the specified RegisterNodeRequestMessage message, length delimited. Does not implicitly {@link agentInterface.RegisterNodeRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.RegisterNodeRequestMessage - * @static - * @param {agentInterface.IRegisterNodeRequestMessage} message RegisterNodeRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetPrimaryKeyPair. + * @function getPrimaryKeyPair + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IBooleanMessage} request BooleanMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - RegisterNodeRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a RegisterNodeRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.RegisterNodeRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.RegisterNodeRequestMessage} RegisterNodeRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link agentInterface.Agent#getSecret}. + * @memberof agentInterface.Agent + * @typedef GetSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.StringMessage} [response] StringMessage */ - RegisterNodeRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.RegisterNodeRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.passphrase = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; /** - * Decodes a RegisterNodeRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.RegisterNodeRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.RegisterNodeRequestMessage} RegisterNodeRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetSecret. + * @function getSecret + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.ISecretPathMessage} request SecretPathMessage message or plain object + * @param {agentInterface.Agent.GetSecretCallback} callback Node-style callback called with the error, if any, and StringMessage + * @returns {undefined} + * @variation 1 */ - RegisterNodeRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return RegisterNodeRequestMessage; - })(); - - agentInterface.RegisterNodeResponseMessage = (function() { + Object.defineProperty(Agent.prototype.getSecret = function getSecret(request, callback) { + return this.rpcCall(getSecret, $root.agentInterface.SecretPathMessage, $root.agentInterface.StringMessage, request, callback); + }, "name", { value: "GetSecret" }); /** - * Properties of a RegisterNodeResponseMessage. - * @memberof agentInterface - * @interface IRegisterNodeResponseMessage - * @property {boolean|null} [successful] RegisterNodeResponseMessage successful + * Calls GetSecret. + * @function getSecret + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.ISecretPathMessage} request SecretPathMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new RegisterNodeResponseMessage. - * @memberof agentInterface - * @classdesc Represents a RegisterNodeResponseMessage. - * @implements IRegisterNodeResponseMessage - * @constructor - * @param {agentInterface.IRegisterNodeResponseMessage=} [p] Properties to set + * Callback as used by {@link agentInterface.Agent#getStatus}. + * @memberof agentInterface.Agent + * @typedef GetStatusCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.AgentStatusMessage} [response] AgentStatusMessage */ - function RegisterNodeResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } /** - * RegisterNodeResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.RegisterNodeResponseMessage + * Calls GetStatus. + * @function getStatus + * @memberof agentInterface.Agent * @instance + * @param {agentInterface.IEmptyMessage} request EmptyMessage message or plain object + * @param {agentInterface.Agent.GetStatusCallback} callback Node-style callback called with the error, if any, and AgentStatusMessage + * @returns {undefined} + * @variation 1 */ - RegisterNodeResponseMessage.prototype.successful = false; + Object.defineProperty(Agent.prototype.getStatus = function getStatus(request, callback) { + return this.rpcCall(getStatus, $root.agentInterface.EmptyMessage, $root.agentInterface.AgentStatusMessage, request, callback); + }, "name", { value: "GetStatus" }); /** - * Creates a new RegisterNodeResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.RegisterNodeResponseMessage - * @static - * @param {agentInterface.IRegisterNodeResponseMessage=} [properties] Properties to set - * @returns {agentInterface.RegisterNodeResponseMessage} RegisterNodeResponseMessage instance + * Calls GetStatus. + * @function getStatus + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IEmptyMessage} request EmptyMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - RegisterNodeResponseMessage.create = function create(properties) { - return new RegisterNodeResponseMessage(properties); - }; /** - * Encodes the specified RegisterNodeResponseMessage message. Does not implicitly {@link agentInterface.RegisterNodeResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.RegisterNodeResponseMessage - * @static - * @param {agentInterface.IRegisterNodeResponseMessage} m RegisterNodeResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link agentInterface.Agent#listKeys}. + * @memberof agentInterface.Agent + * @typedef ListKeysCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.StringListMessage} [response] StringListMessage */ - RegisterNodeResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; /** - * Encodes the specified RegisterNodeResponseMessage message, length delimited. Does not implicitly {@link agentInterface.RegisterNodeResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.RegisterNodeResponseMessage - * @static - * @param {agentInterface.IRegisterNodeResponseMessage} message RegisterNodeResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListKeys. + * @function listKeys + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IEmptyMessage} request EmptyMessage message or plain object + * @param {agentInterface.Agent.ListKeysCallback} callback Node-style callback called with the error, if any, and StringListMessage + * @returns {undefined} + * @variation 1 */ - RegisterNodeResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(Agent.prototype.listKeys = function listKeys(request, callback) { + return this.rpcCall(listKeys, $root.agentInterface.EmptyMessage, $root.agentInterface.StringListMessage, request, callback); + }, "name", { value: "ListKeys" }); /** - * Decodes a RegisterNodeResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.RegisterNodeResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.RegisterNodeResponseMessage} RegisterNodeResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListKeys. + * @function listKeys + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IEmptyMessage} request EmptyMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - RegisterNodeResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.RegisterNodeResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; /** - * Decodes a RegisterNodeResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.RegisterNodeResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.RegisterNodeResponseMessage} RegisterNodeResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link agentInterface.Agent#listNodes}. + * @memberof agentInterface.Agent + * @typedef ListNodesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.StringListMessage} [response] StringListMessage */ - RegisterNodeResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return RegisterNodeResponseMessage; - })(); - agentInterface.NewNodeRequestMessage = (function() { + /** + * Calls ListNodes. + * @function listNodes + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IBooleanMessage} request BooleanMessage message or plain object + * @param {agentInterface.Agent.ListNodesCallback} callback Node-style callback called with the error, if any, and StringListMessage + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Agent.prototype.listNodes = function listNodes(request, callback) { + return this.rpcCall(listNodes, $root.agentInterface.BooleanMessage, $root.agentInterface.StringListMessage, request, callback); + }, "name", { value: "ListNodes" }); /** - * Properties of a NewNodeRequestMessage. - * @memberof agentInterface - * @interface INewNodeRequestMessage - * @property {string|null} [userId] NewNodeRequestMessage userId - * @property {string|null} [passphrase] NewNodeRequestMessage passphrase - * @property {number|null} [nbits] NewNodeRequestMessage nbits + * Calls ListNodes. + * @function listNodes + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IBooleanMessage} request BooleanMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new NewNodeRequestMessage. - * @memberof agentInterface - * @classdesc Represents a NewNodeRequestMessage. - * @implements INewNodeRequestMessage - * @constructor - * @param {agentInterface.INewNodeRequestMessage=} [p] Properties to set + * Callback as used by {@link agentInterface.Agent#listPeers}. + * @memberof agentInterface.Agent + * @typedef ListPeersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.StringListMessage} [response] StringListMessage */ - function NewNodeRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } /** - * NewNodeRequestMessage userId. - * @member {string} userId - * @memberof agentInterface.NewNodeRequestMessage + * Calls ListPeers. + * @function listPeers + * @memberof agentInterface.Agent * @instance + * @param {agentInterface.IEmptyMessage} request EmptyMessage message or plain object + * @param {agentInterface.Agent.ListPeersCallback} callback Node-style callback called with the error, if any, and StringListMessage + * @returns {undefined} + * @variation 1 */ - NewNodeRequestMessage.prototype.userId = ""; + Object.defineProperty(Agent.prototype.listPeers = function listPeers(request, callback) { + return this.rpcCall(listPeers, $root.agentInterface.EmptyMessage, $root.agentInterface.StringListMessage, request, callback); + }, "name", { value: "ListPeers" }); /** - * NewNodeRequestMessage passphrase. - * @member {string} passphrase - * @memberof agentInterface.NewNodeRequestMessage + * Calls ListPeers. + * @function listPeers + * @memberof agentInterface.Agent * @instance + * @param {agentInterface.IEmptyMessage} request EmptyMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - NewNodeRequestMessage.prototype.passphrase = ""; /** - * NewNodeRequestMessage nbits. - * @member {number} nbits - * @memberof agentInterface.NewNodeRequestMessage - * @instance + * Callback as used by {@link agentInterface.Agent#listSecrets}. + * @memberof agentInterface.Agent + * @typedef ListSecretsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.StringListMessage} [response] StringListMessage */ - NewNodeRequestMessage.prototype.nbits = 0; /** - * Creates a new NewNodeRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.NewNodeRequestMessage - * @static - * @param {agentInterface.INewNodeRequestMessage=} [properties] Properties to set - * @returns {agentInterface.NewNodeRequestMessage} NewNodeRequestMessage instance + * Calls ListSecrets. + * @function listSecrets + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IStringMessage} request StringMessage message or plain object + * @param {agentInterface.Agent.ListSecretsCallback} callback Node-style callback called with the error, if any, and StringListMessage + * @returns {undefined} + * @variation 1 */ - NewNodeRequestMessage.create = function create(properties) { - return new NewNodeRequestMessage(properties); - }; + Object.defineProperty(Agent.prototype.listSecrets = function listSecrets(request, callback) { + return this.rpcCall(listSecrets, $root.agentInterface.StringMessage, $root.agentInterface.StringListMessage, request, callback); + }, "name", { value: "ListSecrets" }); /** - * Encodes the specified NewNodeRequestMessage message. Does not implicitly {@link agentInterface.NewNodeRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.NewNodeRequestMessage - * @static - * @param {agentInterface.INewNodeRequestMessage} m NewNodeRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListSecrets. + * @function listSecrets + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IStringMessage} request StringMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - NewNodeRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.userId != null && Object.hasOwnProperty.call(m, "userId")) - w.uint32(10).string(m.userId); - if (m.passphrase != null && Object.hasOwnProperty.call(m, "passphrase")) - w.uint32(18).string(m.passphrase); - if (m.nbits != null && Object.hasOwnProperty.call(m, "nbits")) - w.uint32(24).int32(m.nbits); - return w; - }; /** - * Encodes the specified NewNodeRequestMessage message, length delimited. Does not implicitly {@link agentInterface.NewNodeRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.NewNodeRequestMessage - * @static - * @param {agentInterface.INewNodeRequestMessage} message NewNodeRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link agentInterface.Agent#listVaults}. + * @memberof agentInterface.Agent + * @typedef ListVaultsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.StringListMessage} [response] StringListMessage */ - NewNodeRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a NewNodeRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.NewNodeRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.NewNodeRequestMessage} NewNodeRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListVaults. + * @function listVaults + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IEmptyMessage} request EmptyMessage message or plain object + * @param {agentInterface.Agent.ListVaultsCallback} callback Node-style callback called with the error, if any, and StringListMessage + * @returns {undefined} + * @variation 1 */ - NewNodeRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.NewNodeRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.userId = r.string(); - break; - case 2: - m.passphrase = r.string(); - break; - case 3: - m.nbits = r.int32(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; + Object.defineProperty(Agent.prototype.listVaults = function listVaults(request, callback) { + return this.rpcCall(listVaults, $root.agentInterface.EmptyMessage, $root.agentInterface.StringListMessage, request, callback); + }, "name", { value: "ListVaults" }); /** - * Decodes a NewNodeRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.NewNodeRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.NewNodeRequestMessage} NewNodeRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListVaults. + * @function listVaults + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IEmptyMessage} request EmptyMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - NewNodeRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - return NewNodeRequestMessage; - })(); + /** + * Callback as used by {@link agentInterface.Agent#newNode}. + * @memberof agentInterface.Agent + * @typedef NewNodeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.BooleanMessage} [response] BooleanMessage + */ - agentInterface.NewNodeResponseMessage = (function() { + /** + * Calls NewNode. + * @function newNode + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.INewNodeMessage} request NewNodeMessage message or plain object + * @param {agentInterface.Agent.NewNodeCallback} callback Node-style callback called with the error, if any, and BooleanMessage + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Agent.prototype.newNode = function newNode(request, callback) { + return this.rpcCall(newNode, $root.agentInterface.NewNodeMessage, $root.agentInterface.BooleanMessage, request, callback); + }, "name", { value: "NewNode" }); /** - * Properties of a NewNodeResponseMessage. - * @memberof agentInterface - * @interface INewNodeResponseMessage - * @property {boolean|null} [successful] NewNodeResponseMessage successful + * Calls NewNode. + * @function newNode + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.INewNodeMessage} request NewNodeMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new NewNodeResponseMessage. - * @memberof agentInterface - * @classdesc Represents a NewNodeResponseMessage. - * @implements INewNodeResponseMessage - * @constructor - * @param {agentInterface.INewNodeResponseMessage=} [p] Properties to set + * Callback as used by {@link agentInterface.Agent#newSecret}. + * @memberof agentInterface.Agent + * @typedef NewSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.BooleanMessage} [response] BooleanMessage */ - function NewNodeResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } /** - * NewNodeResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.NewNodeResponseMessage + * Calls NewSecret. + * @function newSecret + * @memberof agentInterface.Agent * @instance + * @param {agentInterface.ISecretContentMessage} request SecretContentMessage message or plain object + * @param {agentInterface.Agent.NewSecretCallback} callback Node-style callback called with the error, if any, and BooleanMessage + * @returns {undefined} + * @variation 1 */ - NewNodeResponseMessage.prototype.successful = false; + Object.defineProperty(Agent.prototype.newSecret = function newSecret(request, callback) { + return this.rpcCall(newSecret, $root.agentInterface.SecretContentMessage, $root.agentInterface.BooleanMessage, request, callback); + }, "name", { value: "NewSecret" }); /** - * Creates a new NewNodeResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.NewNodeResponseMessage - * @static - * @param {agentInterface.INewNodeResponseMessage=} [properties] Properties to set - * @returns {agentInterface.NewNodeResponseMessage} NewNodeResponseMessage instance + * Calls NewSecret. + * @function newSecret + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.ISecretContentMessage} request SecretContentMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - NewNodeResponseMessage.create = function create(properties) { - return new NewNodeResponseMessage(properties); - }; /** - * Encodes the specified NewNodeResponseMessage message. Does not implicitly {@link agentInterface.NewNodeResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.NewNodeResponseMessage - * @static - * @param {agentInterface.INewNodeResponseMessage} m NewNodeResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link agentInterface.Agent#newVault}. + * @memberof agentInterface.Agent + * @typedef NewVaultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.BooleanMessage} [response] BooleanMessage */ - NewNodeResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; /** - * Encodes the specified NewNodeResponseMessage message, length delimited. Does not implicitly {@link agentInterface.NewNodeResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.NewNodeResponseMessage - * @static - * @param {agentInterface.INewNodeResponseMessage} message NewNodeResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls NewVault. + * @function newVault + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IStringMessage} request StringMessage message or plain object + * @param {agentInterface.Agent.NewVaultCallback} callback Node-style callback called with the error, if any, and BooleanMessage + * @returns {undefined} + * @variation 1 */ - NewNodeResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(Agent.prototype.newVault = function newVault(request, callback) { + return this.rpcCall(newVault, $root.agentInterface.StringMessage, $root.agentInterface.BooleanMessage, request, callback); + }, "name", { value: "NewVault" }); /** - * Decodes a NewNodeResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.NewNodeResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.NewNodeResponseMessage} NewNodeResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls NewVault. + * @function newVault + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IStringMessage} request StringMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - NewNodeResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.NewNodeResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; /** - * Decodes a NewNodeResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.NewNodeResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.NewNodeResponseMessage} NewNodeResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link agentInterface.Agent#pingPeer}. + * @memberof agentInterface.Agent + * @typedef PingPeerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.BooleanMessage} [response] BooleanMessage */ - NewNodeResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - return NewNodeResponseMessage; - })(); + /** + * Calls PingPeer. + * @function pingPeer + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IContactPeerMessage} request ContactPeerMessage message or plain object + * @param {agentInterface.Agent.PingPeerCallback} callback Node-style callback called with the error, if any, and BooleanMessage + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Agent.prototype.pingPeer = function pingPeer(request, callback) { + return this.rpcCall(pingPeer, $root.agentInterface.ContactPeerMessage, $root.agentInterface.BooleanMessage, request, callback); + }, "name", { value: "PingPeer" }); - agentInterface.ListNodesRequestMessage = (function() { + /** + * Calls PingPeer. + * @function pingPeer + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IContactPeerMessage} request ContactPeerMessage message or plain object + * @returns {Promise} Promise + * @variation 2 + */ /** - * Properties of a ListNodesRequestMessage. - * @memberof agentInterface - * @interface IListNodesRequestMessage - * @property {boolean|null} [unlockedOnly] ListNodesRequestMessage unlockedOnly + * Callback as used by {@link agentInterface.Agent#pullVault}. + * @memberof agentInterface.Agent + * @typedef PullVaultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.BooleanMessage} [response] BooleanMessage */ /** - * Constructs a new ListNodesRequestMessage. - * @memberof agentInterface - * @classdesc Represents a ListNodesRequestMessage. - * @implements IListNodesRequestMessage - * @constructor - * @param {agentInterface.IListNodesRequestMessage=} [p] Properties to set - */ - function ListNodesRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * ListNodesRequestMessage unlockedOnly. - * @member {boolean} unlockedOnly - * @memberof agentInterface.ListNodesRequestMessage + * Calls PullVault. + * @function pullVault + * @memberof agentInterface.Agent * @instance + * @param {agentInterface.IVaultPathMessage} request VaultPathMessage message or plain object + * @param {agentInterface.Agent.PullVaultCallback} callback Node-style callback called with the error, if any, and BooleanMessage + * @returns {undefined} + * @variation 1 */ - ListNodesRequestMessage.prototype.unlockedOnly = false; - - /** - * Creates a new ListNodesRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ListNodesRequestMessage - * @static - * @param {agentInterface.IListNodesRequestMessage=} [properties] Properties to set - * @returns {agentInterface.ListNodesRequestMessage} ListNodesRequestMessage instance - */ - ListNodesRequestMessage.create = function create(properties) { - return new ListNodesRequestMessage(properties); - }; - - /** - * Encodes the specified ListNodesRequestMessage message. Does not implicitly {@link agentInterface.ListNodesRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ListNodesRequestMessage - * @static - * @param {agentInterface.IListNodesRequestMessage} m ListNodesRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListNodesRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.unlockedOnly != null && Object.hasOwnProperty.call(m, "unlockedOnly")) - w.uint32(8).bool(m.unlockedOnly); - return w; - }; - - /** - * Encodes the specified ListNodesRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ListNodesRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ListNodesRequestMessage - * @static - * @param {agentInterface.IListNodesRequestMessage} message ListNodesRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListNodesRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListNodesRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ListNodesRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ListNodesRequestMessage} ListNodesRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListNodesRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListNodesRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.unlockedOnly = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a ListNodesRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ListNodesRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ListNodesRequestMessage} ListNodesRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListNodesRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ListNodesRequestMessage; - })(); - - agentInterface.ListNodesResponseMessage = (function() { - - /** - * Properties of a ListNodesResponseMessage. - * @memberof agentInterface - * @interface IListNodesResponseMessage - * @property {Array.|null} [nodes] ListNodesResponseMessage nodes - */ - - /** - * Constructs a new ListNodesResponseMessage. - * @memberof agentInterface - * @classdesc Represents a ListNodesResponseMessage. - * @implements IListNodesResponseMessage - * @constructor - * @param {agentInterface.IListNodesResponseMessage=} [p] Properties to set - */ - function ListNodesResponseMessage(p) { - this.nodes = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } + Object.defineProperty(Agent.prototype.pullVault = function pullVault(request, callback) { + return this.rpcCall(pullVault, $root.agentInterface.VaultPathMessage, $root.agentInterface.BooleanMessage, request, callback); + }, "name", { value: "PullVault" }); /** - * ListNodesResponseMessage nodes. - * @member {Array.} nodes - * @memberof agentInterface.ListNodesResponseMessage + * Calls PullVault. + * @function pullVault + * @memberof agentInterface.Agent * @instance + * @param {agentInterface.IVaultPathMessage} request VaultPathMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListNodesResponseMessage.prototype.nodes = $util.emptyArray; - - /** - * Creates a new ListNodesResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ListNodesResponseMessage - * @static - * @param {agentInterface.IListNodesResponseMessage=} [properties] Properties to set - * @returns {agentInterface.ListNodesResponseMessage} ListNodesResponseMessage instance - */ - ListNodesResponseMessage.create = function create(properties) { - return new ListNodesResponseMessage(properties); - }; - - /** - * Encodes the specified ListNodesResponseMessage message. Does not implicitly {@link agentInterface.ListNodesResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ListNodesResponseMessage - * @static - * @param {agentInterface.IListNodesResponseMessage} m ListNodesResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListNodesResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.nodes != null && m.nodes.length) { - for (var i = 0; i < m.nodes.length; ++i) - w.uint32(10).string(m.nodes[i]); - } - return w; - }; - - /** - * Encodes the specified ListNodesResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ListNodesResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ListNodesResponseMessage - * @static - * @param {agentInterface.IListNodesResponseMessage} message ListNodesResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListNodesResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListNodesResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ListNodesResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ListNodesResponseMessage} ListNodesResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListNodesResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListNodesResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.nodes && m.nodes.length)) - m.nodes = []; - m.nodes.push(r.string()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a ListNodesResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ListNodesResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ListNodesResponseMessage} ListNodesResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListNodesResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ListNodesResponseMessage; - })(); - - agentInterface.SignFileRequestMessage = (function() { - - /** - * Properties of a SignFileRequestMessage. - * @memberof agentInterface - * @interface ISignFileRequestMessage - * @property {string|null} [filePath] SignFileRequestMessage filePath - * @property {string|null} [privateKeyPath] SignFileRequestMessage privateKeyPath - * @property {string|null} [passphrase] SignFileRequestMessage passphrase - */ - - /** - * Constructs a new SignFileRequestMessage. - * @memberof agentInterface - * @classdesc Represents a SignFileRequestMessage. - * @implements ISignFileRequestMessage - * @constructor - * @param {agentInterface.ISignFileRequestMessage=} [p] Properties to set - */ - function SignFileRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } /** - * SignFileRequestMessage filePath. - * @member {string} filePath - * @memberof agentInterface.SignFileRequestMessage - * @instance + * Callback as used by {@link agentInterface.Agent#registerNode}. + * @memberof agentInterface.Agent + * @typedef RegisterNodeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.BooleanMessage} [response] BooleanMessage */ - SignFileRequestMessage.prototype.filePath = ""; /** - * SignFileRequestMessage privateKeyPath. - * @member {string} privateKeyPath - * @memberof agentInterface.SignFileRequestMessage + * Calls RegisterNode. + * @function registerNode + * @memberof agentInterface.Agent * @instance + * @param {agentInterface.IStringMessage} request StringMessage message or plain object + * @param {agentInterface.Agent.RegisterNodeCallback} callback Node-style callback called with the error, if any, and BooleanMessage + * @returns {undefined} + * @variation 1 */ - SignFileRequestMessage.prototype.privateKeyPath = ""; + Object.defineProperty(Agent.prototype.registerNode = function registerNode(request, callback) { + return this.rpcCall(registerNode, $root.agentInterface.StringMessage, $root.agentInterface.BooleanMessage, request, callback); + }, "name", { value: "RegisterNode" }); /** - * SignFileRequestMessage passphrase. - * @member {string} passphrase - * @memberof agentInterface.SignFileRequestMessage + * Calls RegisterNode. + * @function registerNode + * @memberof agentInterface.Agent * @instance + * @param {agentInterface.IStringMessage} request StringMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - SignFileRequestMessage.prototype.passphrase = ""; - - /** - * Creates a new SignFileRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.SignFileRequestMessage - * @static - * @param {agentInterface.ISignFileRequestMessage=} [properties] Properties to set - * @returns {agentInterface.SignFileRequestMessage} SignFileRequestMessage instance - */ - SignFileRequestMessage.create = function create(properties) { - return new SignFileRequestMessage(properties); - }; - - /** - * Encodes the specified SignFileRequestMessage message. Does not implicitly {@link agentInterface.SignFileRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.SignFileRequestMessage - * @static - * @param {agentInterface.ISignFileRequestMessage} m SignFileRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignFileRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.filePath != null && Object.hasOwnProperty.call(m, "filePath")) - w.uint32(10).string(m.filePath); - if (m.privateKeyPath != null && Object.hasOwnProperty.call(m, "privateKeyPath")) - w.uint32(18).string(m.privateKeyPath); - if (m.passphrase != null && Object.hasOwnProperty.call(m, "passphrase")) - w.uint32(26).string(m.passphrase); - return w; - }; - - /** - * Encodes the specified SignFileRequestMessage message, length delimited. Does not implicitly {@link agentInterface.SignFileRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.SignFileRequestMessage - * @static - * @param {agentInterface.ISignFileRequestMessage} message SignFileRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignFileRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SignFileRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.SignFileRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.SignFileRequestMessage} SignFileRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignFileRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.SignFileRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.filePath = r.string(); - break; - case 2: - m.privateKeyPath = r.string(); - break; - case 3: - m.passphrase = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; /** - * Decodes a SignFileRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.SignFileRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.SignFileRequestMessage} SignFileRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link agentInterface.Agent#requestHolePunch}. + * @memberof agentInterface.Agent + * @typedef RequestHolePunchCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.BooleanMessage} [response] BooleanMessage */ - SignFileRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return SignFileRequestMessage; - })(); - - agentInterface.SignFileResponseMessage = (function() { /** - * Properties of a SignFileResponseMessage. - * @memberof agentInterface - * @interface ISignFileResponseMessage - * @property {string|null} [signaturePath] SignFileResponseMessage signaturePath + * Calls RequestHolePunch. + * @function requestHolePunch + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IStringMessage} request StringMessage message or plain object + * @param {agentInterface.Agent.RequestHolePunchCallback} callback Node-style callback called with the error, if any, and BooleanMessage + * @returns {undefined} + * @variation 1 */ + Object.defineProperty(Agent.prototype.requestHolePunch = function requestHolePunch(request, callback) { + return this.rpcCall(requestHolePunch, $root.agentInterface.StringMessage, $root.agentInterface.BooleanMessage, request, callback); + }, "name", { value: "RequestHolePunch" }); /** - * Constructs a new SignFileResponseMessage. - * @memberof agentInterface - * @classdesc Represents a SignFileResponseMessage. - * @implements ISignFileResponseMessage - * @constructor - * @param {agentInterface.ISignFileResponseMessage=} [p] Properties to set + * Calls RequestHolePunch. + * @function requestHolePunch + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IStringMessage} request StringMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - function SignFileResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } /** - * SignFileResponseMessage signaturePath. - * @member {string} signaturePath - * @memberof agentInterface.SignFileResponseMessage - * @instance - */ - SignFileResponseMessage.prototype.signaturePath = ""; - - /** - * Creates a new SignFileResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.SignFileResponseMessage - * @static - * @param {agentInterface.ISignFileResponseMessage=} [properties] Properties to set - * @returns {agentInterface.SignFileResponseMessage} SignFileResponseMessage instance - */ - SignFileResponseMessage.create = function create(properties) { - return new SignFileResponseMessage(properties); - }; - - /** - * Encodes the specified SignFileResponseMessage message. Does not implicitly {@link agentInterface.SignFileResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.SignFileResponseMessage - * @static - * @param {agentInterface.ISignFileResponseMessage} m SignFileResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignFileResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.signaturePath != null && Object.hasOwnProperty.call(m, "signaturePath")) - w.uint32(10).string(m.signaturePath); - return w; - }; - - /** - * Encodes the specified SignFileResponseMessage message, length delimited. Does not implicitly {@link agentInterface.SignFileResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.SignFileResponseMessage - * @static - * @param {agentInterface.ISignFileResponseMessage} message SignFileResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignFileResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SignFileResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.SignFileResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.SignFileResponseMessage} SignFileResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignFileResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.SignFileResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.signaturePath = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a SignFileResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.SignFileResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.SignFileResponseMessage} SignFileResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignFileResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return SignFileResponseMessage; - })(); - - agentInterface.VerifyFileRequestMessage = (function() { - - /** - * Properties of a VerifyFileRequestMessage. - * @memberof agentInterface - * @interface IVerifyFileRequestMessage - * @property {string|null} [filePath] VerifyFileRequestMessage filePath - * @property {string|null} [publicKeyPath] VerifyFileRequestMessage publicKeyPath - */ - - /** - * Constructs a new VerifyFileRequestMessage. - * @memberof agentInterface - * @classdesc Represents a VerifyFileRequestMessage. - * @implements IVerifyFileRequestMessage - * @constructor - * @param {agentInterface.IVerifyFileRequestMessage=} [p] Properties to set - */ - function VerifyFileRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * VerifyFileRequestMessage filePath. - * @member {string} filePath - * @memberof agentInterface.VerifyFileRequestMessage - * @instance - */ - VerifyFileRequestMessage.prototype.filePath = ""; - - /** - * VerifyFileRequestMessage publicKeyPath. - * @member {string} publicKeyPath - * @memberof agentInterface.VerifyFileRequestMessage - * @instance - */ - VerifyFileRequestMessage.prototype.publicKeyPath = ""; - - /** - * Creates a new VerifyFileRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.VerifyFileRequestMessage - * @static - * @param {agentInterface.IVerifyFileRequestMessage=} [properties] Properties to set - * @returns {agentInterface.VerifyFileRequestMessage} VerifyFileRequestMessage instance - */ - VerifyFileRequestMessage.create = function create(properties) { - return new VerifyFileRequestMessage(properties); - }; - - /** - * Encodes the specified VerifyFileRequestMessage message. Does not implicitly {@link agentInterface.VerifyFileRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.VerifyFileRequestMessage - * @static - * @param {agentInterface.IVerifyFileRequestMessage} m VerifyFileRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VerifyFileRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.filePath != null && Object.hasOwnProperty.call(m, "filePath")) - w.uint32(10).string(m.filePath); - if (m.publicKeyPath != null && Object.hasOwnProperty.call(m, "publicKeyPath")) - w.uint32(18).string(m.publicKeyPath); - return w; - }; - - /** - * Encodes the specified VerifyFileRequestMessage message, length delimited. Does not implicitly {@link agentInterface.VerifyFileRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.VerifyFileRequestMessage - * @static - * @param {agentInterface.IVerifyFileRequestMessage} message VerifyFileRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VerifyFileRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VerifyFileRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.VerifyFileRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.VerifyFileRequestMessage} VerifyFileRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VerifyFileRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.VerifyFileRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.filePath = r.string(); - break; - case 2: - m.publicKeyPath = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a VerifyFileRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.VerifyFileRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.VerifyFileRequestMessage} VerifyFileRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VerifyFileRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return VerifyFileRequestMessage; - })(); - - agentInterface.VerifyFileResponseMessage = (function() { - - /** - * Properties of a VerifyFileResponseMessage. - * @memberof agentInterface - * @interface IVerifyFileResponseMessage - * @property {boolean|null} [verified] VerifyFileResponseMessage verified - */ - - /** - * Constructs a new VerifyFileResponseMessage. - * @memberof agentInterface - * @classdesc Represents a VerifyFileResponseMessage. - * @implements IVerifyFileResponseMessage - * @constructor - * @param {agentInterface.IVerifyFileResponseMessage=} [p] Properties to set - */ - function VerifyFileResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * VerifyFileResponseMessage verified. - * @member {boolean} verified - * @memberof agentInterface.VerifyFileResponseMessage - * @instance - */ - VerifyFileResponseMessage.prototype.verified = false; - - /** - * Creates a new VerifyFileResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.VerifyFileResponseMessage - * @static - * @param {agentInterface.IVerifyFileResponseMessage=} [properties] Properties to set - * @returns {agentInterface.VerifyFileResponseMessage} VerifyFileResponseMessage instance - */ - VerifyFileResponseMessage.create = function create(properties) { - return new VerifyFileResponseMessage(properties); - }; - - /** - * Encodes the specified VerifyFileResponseMessage message. Does not implicitly {@link agentInterface.VerifyFileResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.VerifyFileResponseMessage - * @static - * @param {agentInterface.IVerifyFileResponseMessage} m VerifyFileResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VerifyFileResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.verified != null && Object.hasOwnProperty.call(m, "verified")) - w.uint32(8).bool(m.verified); - return w; - }; - - /** - * Encodes the specified VerifyFileResponseMessage message, length delimited. Does not implicitly {@link agentInterface.VerifyFileResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.VerifyFileResponseMessage - * @static - * @param {agentInterface.IVerifyFileResponseMessage} message VerifyFileResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VerifyFileResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VerifyFileResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.VerifyFileResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.VerifyFileResponseMessage} VerifyFileResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VerifyFileResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.VerifyFileResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.verified = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a VerifyFileResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.VerifyFileResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.VerifyFileResponseMessage} VerifyFileResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VerifyFileResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return VerifyFileResponseMessage; - })(); - - agentInterface.EncryptFileRequestMessage = (function() { - - /** - * Properties of an EncryptFileRequestMessage. - * @memberof agentInterface - * @interface IEncryptFileRequestMessage - * @property {string|null} [filePath] EncryptFileRequestMessage filePath - * @property {string|null} [publicKeyPath] EncryptFileRequestMessage publicKeyPath - */ - - /** - * Constructs a new EncryptFileRequestMessage. - * @memberof agentInterface - * @classdesc Represents an EncryptFileRequestMessage. - * @implements IEncryptFileRequestMessage - * @constructor - * @param {agentInterface.IEncryptFileRequestMessage=} [p] Properties to set - */ - function EncryptFileRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * EncryptFileRequestMessage filePath. - * @member {string} filePath - * @memberof agentInterface.EncryptFileRequestMessage - * @instance - */ - EncryptFileRequestMessage.prototype.filePath = ""; - - /** - * EncryptFileRequestMessage publicKeyPath. - * @member {string} publicKeyPath - * @memberof agentInterface.EncryptFileRequestMessage - * @instance - */ - EncryptFileRequestMessage.prototype.publicKeyPath = ""; - - /** - * Creates a new EncryptFileRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.EncryptFileRequestMessage - * @static - * @param {agentInterface.IEncryptFileRequestMessage=} [properties] Properties to set - * @returns {agentInterface.EncryptFileRequestMessage} EncryptFileRequestMessage instance - */ - EncryptFileRequestMessage.create = function create(properties) { - return new EncryptFileRequestMessage(properties); - }; - - /** - * Encodes the specified EncryptFileRequestMessage message. Does not implicitly {@link agentInterface.EncryptFileRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.EncryptFileRequestMessage - * @static - * @param {agentInterface.IEncryptFileRequestMessage} m EncryptFileRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EncryptFileRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.filePath != null && Object.hasOwnProperty.call(m, "filePath")) - w.uint32(10).string(m.filePath); - if (m.publicKeyPath != null && Object.hasOwnProperty.call(m, "publicKeyPath")) - w.uint32(18).string(m.publicKeyPath); - return w; - }; - - /** - * Encodes the specified EncryptFileRequestMessage message, length delimited. Does not implicitly {@link agentInterface.EncryptFileRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.EncryptFileRequestMessage - * @static - * @param {agentInterface.IEncryptFileRequestMessage} message EncryptFileRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EncryptFileRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EncryptFileRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.EncryptFileRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.EncryptFileRequestMessage} EncryptFileRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EncryptFileRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.EncryptFileRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.filePath = r.string(); - break; - case 2: - m.publicKeyPath = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes an EncryptFileRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.EncryptFileRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.EncryptFileRequestMessage} EncryptFileRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EncryptFileRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return EncryptFileRequestMessage; - })(); - - agentInterface.EncryptFileResponseMessage = (function() { - - /** - * Properties of an EncryptFileResponseMessage. - * @memberof agentInterface - * @interface IEncryptFileResponseMessage - * @property {string|null} [encryptedPath] EncryptFileResponseMessage encryptedPath - */ - - /** - * Constructs a new EncryptFileResponseMessage. - * @memberof agentInterface - * @classdesc Represents an EncryptFileResponseMessage. - * @implements IEncryptFileResponseMessage - * @constructor - * @param {agentInterface.IEncryptFileResponseMessage=} [p] Properties to set - */ - function EncryptFileResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * EncryptFileResponseMessage encryptedPath. - * @member {string} encryptedPath - * @memberof agentInterface.EncryptFileResponseMessage - * @instance - */ - EncryptFileResponseMessage.prototype.encryptedPath = ""; - - /** - * Creates a new EncryptFileResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.EncryptFileResponseMessage - * @static - * @param {agentInterface.IEncryptFileResponseMessage=} [properties] Properties to set - * @returns {agentInterface.EncryptFileResponseMessage} EncryptFileResponseMessage instance - */ - EncryptFileResponseMessage.create = function create(properties) { - return new EncryptFileResponseMessage(properties); - }; - - /** - * Encodes the specified EncryptFileResponseMessage message. Does not implicitly {@link agentInterface.EncryptFileResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.EncryptFileResponseMessage - * @static - * @param {agentInterface.IEncryptFileResponseMessage} m EncryptFileResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EncryptFileResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.encryptedPath != null && Object.hasOwnProperty.call(m, "encryptedPath")) - w.uint32(10).string(m.encryptedPath); - return w; - }; - - /** - * Encodes the specified EncryptFileResponseMessage message, length delimited. Does not implicitly {@link agentInterface.EncryptFileResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.EncryptFileResponseMessage - * @static - * @param {agentInterface.IEncryptFileResponseMessage} message EncryptFileResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EncryptFileResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EncryptFileResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.EncryptFileResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.EncryptFileResponseMessage} EncryptFileResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EncryptFileResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.EncryptFileResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.encryptedPath = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes an EncryptFileResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.EncryptFileResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.EncryptFileResponseMessage} EncryptFileResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EncryptFileResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return EncryptFileResponseMessage; - })(); - - agentInterface.DecryptFileRequestMessage = (function() { - - /** - * Properties of a DecryptFileRequestMessage. - * @memberof agentInterface - * @interface IDecryptFileRequestMessage - * @property {string|null} [filePath] DecryptFileRequestMessage filePath - * @property {string|null} [privateKeyPath] DecryptFileRequestMessage privateKeyPath - * @property {string|null} [passphrase] DecryptFileRequestMessage passphrase - */ - - /** - * Constructs a new DecryptFileRequestMessage. - * @memberof agentInterface - * @classdesc Represents a DecryptFileRequestMessage. - * @implements IDecryptFileRequestMessage - * @constructor - * @param {agentInterface.IDecryptFileRequestMessage=} [p] Properties to set - */ - function DecryptFileRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * DecryptFileRequestMessage filePath. - * @member {string} filePath - * @memberof agentInterface.DecryptFileRequestMessage - * @instance - */ - DecryptFileRequestMessage.prototype.filePath = ""; - - /** - * DecryptFileRequestMessage privateKeyPath. - * @member {string} privateKeyPath - * @memberof agentInterface.DecryptFileRequestMessage - * @instance - */ - DecryptFileRequestMessage.prototype.privateKeyPath = ""; - - /** - * DecryptFileRequestMessage passphrase. - * @member {string} passphrase - * @memberof agentInterface.DecryptFileRequestMessage - * @instance - */ - DecryptFileRequestMessage.prototype.passphrase = ""; - - /** - * Creates a new DecryptFileRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.DecryptFileRequestMessage - * @static - * @param {agentInterface.IDecryptFileRequestMessage=} [properties] Properties to set - * @returns {agentInterface.DecryptFileRequestMessage} DecryptFileRequestMessage instance - */ - DecryptFileRequestMessage.create = function create(properties) { - return new DecryptFileRequestMessage(properties); - }; - - /** - * Encodes the specified DecryptFileRequestMessage message. Does not implicitly {@link agentInterface.DecryptFileRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.DecryptFileRequestMessage - * @static - * @param {agentInterface.IDecryptFileRequestMessage} m DecryptFileRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DecryptFileRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.filePath != null && Object.hasOwnProperty.call(m, "filePath")) - w.uint32(10).string(m.filePath); - if (m.privateKeyPath != null && Object.hasOwnProperty.call(m, "privateKeyPath")) - w.uint32(18).string(m.privateKeyPath); - if (m.passphrase != null && Object.hasOwnProperty.call(m, "passphrase")) - w.uint32(26).string(m.passphrase); - return w; - }; - - /** - * Encodes the specified DecryptFileRequestMessage message, length delimited. Does not implicitly {@link agentInterface.DecryptFileRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.DecryptFileRequestMessage - * @static - * @param {agentInterface.IDecryptFileRequestMessage} message DecryptFileRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DecryptFileRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DecryptFileRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.DecryptFileRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.DecryptFileRequestMessage} DecryptFileRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DecryptFileRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DecryptFileRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.filePath = r.string(); - break; - case 2: - m.privateKeyPath = r.string(); - break; - case 3: - m.passphrase = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a DecryptFileRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.DecryptFileRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.DecryptFileRequestMessage} DecryptFileRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DecryptFileRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return DecryptFileRequestMessage; - })(); - - agentInterface.DecryptFileResponseMessage = (function() { - - /** - * Properties of a DecryptFileResponseMessage. - * @memberof agentInterface - * @interface IDecryptFileResponseMessage - * @property {string|null} [decryptedPath] DecryptFileResponseMessage decryptedPath - */ - - /** - * Constructs a new DecryptFileResponseMessage. - * @memberof agentInterface - * @classdesc Represents a DecryptFileResponseMessage. - * @implements IDecryptFileResponseMessage - * @constructor - * @param {agentInterface.IDecryptFileResponseMessage=} [p] Properties to set - */ - function DecryptFileResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * DecryptFileResponseMessage decryptedPath. - * @member {string} decryptedPath - * @memberof agentInterface.DecryptFileResponseMessage - * @instance - */ - DecryptFileResponseMessage.prototype.decryptedPath = ""; - - /** - * Creates a new DecryptFileResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.DecryptFileResponseMessage - * @static - * @param {agentInterface.IDecryptFileResponseMessage=} [properties] Properties to set - * @returns {agentInterface.DecryptFileResponseMessage} DecryptFileResponseMessage instance - */ - DecryptFileResponseMessage.create = function create(properties) { - return new DecryptFileResponseMessage(properties); - }; - - /** - * Encodes the specified DecryptFileResponseMessage message. Does not implicitly {@link agentInterface.DecryptFileResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.DecryptFileResponseMessage - * @static - * @param {agentInterface.IDecryptFileResponseMessage} m DecryptFileResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DecryptFileResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.decryptedPath != null && Object.hasOwnProperty.call(m, "decryptedPath")) - w.uint32(10).string(m.decryptedPath); - return w; - }; - - /** - * Encodes the specified DecryptFileResponseMessage message, length delimited. Does not implicitly {@link agentInterface.DecryptFileResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.DecryptFileResponseMessage - * @static - * @param {agentInterface.IDecryptFileResponseMessage} message DecryptFileResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DecryptFileResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DecryptFileResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.DecryptFileResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.DecryptFileResponseMessage} DecryptFileResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DecryptFileResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DecryptFileResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.decryptedPath = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a DecryptFileResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.DecryptFileResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.DecryptFileResponseMessage} DecryptFileResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DecryptFileResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return DecryptFileResponseMessage; - })(); - - agentInterface.ListVaultsRequestMessage = (function() { - - /** - * Properties of a ListVaultsRequestMessage. - * @memberof agentInterface - * @interface IListVaultsRequestMessage - */ - - /** - * Constructs a new ListVaultsRequestMessage. - * @memberof agentInterface - * @classdesc Represents a ListVaultsRequestMessage. - * @implements IListVaultsRequestMessage - * @constructor - * @param {agentInterface.IListVaultsRequestMessage=} [p] Properties to set - */ - function ListVaultsRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * Creates a new ListVaultsRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ListVaultsRequestMessage - * @static - * @param {agentInterface.IListVaultsRequestMessage=} [properties] Properties to set - * @returns {agentInterface.ListVaultsRequestMessage} ListVaultsRequestMessage instance - */ - ListVaultsRequestMessage.create = function create(properties) { - return new ListVaultsRequestMessage(properties); - }; - - /** - * Encodes the specified ListVaultsRequestMessage message. Does not implicitly {@link agentInterface.ListVaultsRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ListVaultsRequestMessage - * @static - * @param {agentInterface.IListVaultsRequestMessage} m ListVaultsRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVaultsRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - return w; - }; - - /** - * Encodes the specified ListVaultsRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ListVaultsRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ListVaultsRequestMessage - * @static - * @param {agentInterface.IListVaultsRequestMessage} message ListVaultsRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVaultsRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListVaultsRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ListVaultsRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ListVaultsRequestMessage} ListVaultsRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVaultsRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListVaultsRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a ListVaultsRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ListVaultsRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ListVaultsRequestMessage} ListVaultsRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVaultsRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ListVaultsRequestMessage; - })(); - - agentInterface.ListVaultsResponseMessage = (function() { - - /** - * Properties of a ListVaultsResponseMessage. - * @memberof agentInterface - * @interface IListVaultsResponseMessage - * @property {Array.|null} [vaultNames] ListVaultsResponseMessage vaultNames - */ - - /** - * Constructs a new ListVaultsResponseMessage. - * @memberof agentInterface - * @classdesc Represents a ListVaultsResponseMessage. - * @implements IListVaultsResponseMessage - * @constructor - * @param {agentInterface.IListVaultsResponseMessage=} [p] Properties to set - */ - function ListVaultsResponseMessage(p) { - this.vaultNames = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * ListVaultsResponseMessage vaultNames. - * @member {Array.} vaultNames - * @memberof agentInterface.ListVaultsResponseMessage - * @instance - */ - ListVaultsResponseMessage.prototype.vaultNames = $util.emptyArray; - - /** - * Creates a new ListVaultsResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ListVaultsResponseMessage - * @static - * @param {agentInterface.IListVaultsResponseMessage=} [properties] Properties to set - * @returns {agentInterface.ListVaultsResponseMessage} ListVaultsResponseMessage instance - */ - ListVaultsResponseMessage.create = function create(properties) { - return new ListVaultsResponseMessage(properties); - }; - - /** - * Encodes the specified ListVaultsResponseMessage message. Does not implicitly {@link agentInterface.ListVaultsResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ListVaultsResponseMessage - * @static - * @param {agentInterface.IListVaultsResponseMessage} m ListVaultsResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVaultsResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.vaultNames != null && m.vaultNames.length) { - for (var i = 0; i < m.vaultNames.length; ++i) - w.uint32(10).string(m.vaultNames[i]); - } - return w; - }; - - /** - * Encodes the specified ListVaultsResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ListVaultsResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ListVaultsResponseMessage - * @static - * @param {agentInterface.IListVaultsResponseMessage} message ListVaultsResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVaultsResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListVaultsResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ListVaultsResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ListVaultsResponseMessage} ListVaultsResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVaultsResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListVaultsResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.vaultNames && m.vaultNames.length)) - m.vaultNames = []; - m.vaultNames.push(r.string()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a ListVaultsResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ListVaultsResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ListVaultsResponseMessage} ListVaultsResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVaultsResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ListVaultsResponseMessage; - })(); - - agentInterface.ScanVaultNamesRequestMessage = (function() { - - /** - * Properties of a ScanVaultNamesRequestMessage. - * @memberof agentInterface - * @interface IScanVaultNamesRequestMessage - * @property {string|null} [publicKey] ScanVaultNamesRequestMessage publicKey - */ - - /** - * Constructs a new ScanVaultNamesRequestMessage. - * @memberof agentInterface - * @classdesc Represents a ScanVaultNamesRequestMessage. - * @implements IScanVaultNamesRequestMessage - * @constructor - * @param {agentInterface.IScanVaultNamesRequestMessage=} [p] Properties to set - */ - function ScanVaultNamesRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * ScanVaultNamesRequestMessage publicKey. - * @member {string} publicKey - * @memberof agentInterface.ScanVaultNamesRequestMessage - * @instance - */ - ScanVaultNamesRequestMessage.prototype.publicKey = ""; - - /** - * Creates a new ScanVaultNamesRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ScanVaultNamesRequestMessage - * @static - * @param {agentInterface.IScanVaultNamesRequestMessage=} [properties] Properties to set - * @returns {agentInterface.ScanVaultNamesRequestMessage} ScanVaultNamesRequestMessage instance - */ - ScanVaultNamesRequestMessage.create = function create(properties) { - return new ScanVaultNamesRequestMessage(properties); - }; - - /** - * Encodes the specified ScanVaultNamesRequestMessage message. Does not implicitly {@link agentInterface.ScanVaultNamesRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ScanVaultNamesRequestMessage - * @static - * @param {agentInterface.IScanVaultNamesRequestMessage} m ScanVaultNamesRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScanVaultNamesRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); - return w; - }; - - /** - * Encodes the specified ScanVaultNamesRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ScanVaultNamesRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ScanVaultNamesRequestMessage - * @static - * @param {agentInterface.IScanVaultNamesRequestMessage} message ScanVaultNamesRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScanVaultNamesRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ScanVaultNamesRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ScanVaultNamesRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ScanVaultNamesRequestMessage} ScanVaultNamesRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScanVaultNamesRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ScanVaultNamesRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.publicKey = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a ScanVaultNamesRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ScanVaultNamesRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ScanVaultNamesRequestMessage} ScanVaultNamesRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScanVaultNamesRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ScanVaultNamesRequestMessage; - })(); - - agentInterface.ScanVaultNamesResponseMessage = (function() { - - /** - * Properties of a ScanVaultNamesResponseMessage. - * @memberof agentInterface - * @interface IScanVaultNamesResponseMessage - * @property {Array.|null} [vaultNames] ScanVaultNamesResponseMessage vaultNames - */ - - /** - * Constructs a new ScanVaultNamesResponseMessage. - * @memberof agentInterface - * @classdesc Represents a ScanVaultNamesResponseMessage. - * @implements IScanVaultNamesResponseMessage - * @constructor - * @param {agentInterface.IScanVaultNamesResponseMessage=} [p] Properties to set - */ - function ScanVaultNamesResponseMessage(p) { - this.vaultNames = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * ScanVaultNamesResponseMessage vaultNames. - * @member {Array.} vaultNames - * @memberof agentInterface.ScanVaultNamesResponseMessage - * @instance - */ - ScanVaultNamesResponseMessage.prototype.vaultNames = $util.emptyArray; - - /** - * Creates a new ScanVaultNamesResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ScanVaultNamesResponseMessage - * @static - * @param {agentInterface.IScanVaultNamesResponseMessage=} [properties] Properties to set - * @returns {agentInterface.ScanVaultNamesResponseMessage} ScanVaultNamesResponseMessage instance - */ - ScanVaultNamesResponseMessage.create = function create(properties) { - return new ScanVaultNamesResponseMessage(properties); - }; - - /** - * Encodes the specified ScanVaultNamesResponseMessage message. Does not implicitly {@link agentInterface.ScanVaultNamesResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ScanVaultNamesResponseMessage - * @static - * @param {agentInterface.IScanVaultNamesResponseMessage} m ScanVaultNamesResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScanVaultNamesResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.vaultNames != null && m.vaultNames.length) { - for (var i = 0; i < m.vaultNames.length; ++i) - w.uint32(10).string(m.vaultNames[i]); - } - return w; - }; - - /** - * Encodes the specified ScanVaultNamesResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ScanVaultNamesResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ScanVaultNamesResponseMessage - * @static - * @param {agentInterface.IScanVaultNamesResponseMessage} message ScanVaultNamesResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScanVaultNamesResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ScanVaultNamesResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ScanVaultNamesResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ScanVaultNamesResponseMessage} ScanVaultNamesResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScanVaultNamesResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ScanVaultNamesResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.vaultNames && m.vaultNames.length)) - m.vaultNames = []; - m.vaultNames.push(r.string()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a ScanVaultNamesResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ScanVaultNamesResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ScanVaultNamesResponseMessage} ScanVaultNamesResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScanVaultNamesResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ScanVaultNamesResponseMessage; - })(); - - agentInterface.NewVaultRequestMessage = (function() { - - /** - * Properties of a NewVaultRequestMessage. - * @memberof agentInterface - * @interface INewVaultRequestMessage - * @property {string|null} [vaultName] NewVaultRequestMessage vaultName - */ - - /** - * Constructs a new NewVaultRequestMessage. - * @memberof agentInterface - * @classdesc Represents a NewVaultRequestMessage. - * @implements INewVaultRequestMessage - * @constructor - * @param {agentInterface.INewVaultRequestMessage=} [p] Properties to set - */ - function NewVaultRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * NewVaultRequestMessage vaultName. - * @member {string} vaultName - * @memberof agentInterface.NewVaultRequestMessage - * @instance - */ - NewVaultRequestMessage.prototype.vaultName = ""; - - /** - * Creates a new NewVaultRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.NewVaultRequestMessage - * @static - * @param {agentInterface.INewVaultRequestMessage=} [properties] Properties to set - * @returns {agentInterface.NewVaultRequestMessage} NewVaultRequestMessage instance - */ - NewVaultRequestMessage.create = function create(properties) { - return new NewVaultRequestMessage(properties); - }; - - /** - * Encodes the specified NewVaultRequestMessage message. Does not implicitly {@link agentInterface.NewVaultRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.NewVaultRequestMessage - * @static - * @param {agentInterface.INewVaultRequestMessage} m NewVaultRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NewVaultRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.vaultName != null && Object.hasOwnProperty.call(m, "vaultName")) - w.uint32(10).string(m.vaultName); - return w; - }; - - /** - * Encodes the specified NewVaultRequestMessage message, length delimited. Does not implicitly {@link agentInterface.NewVaultRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.NewVaultRequestMessage - * @static - * @param {agentInterface.INewVaultRequestMessage} message NewVaultRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NewVaultRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NewVaultRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.NewVaultRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.NewVaultRequestMessage} NewVaultRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NewVaultRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.NewVaultRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.vaultName = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a NewVaultRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.NewVaultRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.NewVaultRequestMessage} NewVaultRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NewVaultRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return NewVaultRequestMessage; - })(); - - agentInterface.NewVaultResponseMessage = (function() { - - /** - * Properties of a NewVaultResponseMessage. - * @memberof agentInterface - * @interface INewVaultResponseMessage - * @property {boolean|null} [successful] NewVaultResponseMessage successful - */ - - /** - * Constructs a new NewVaultResponseMessage. - * @memberof agentInterface - * @classdesc Represents a NewVaultResponseMessage. - * @implements INewVaultResponseMessage - * @constructor - * @param {agentInterface.INewVaultResponseMessage=} [p] Properties to set - */ - function NewVaultResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * NewVaultResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.NewVaultResponseMessage - * @instance - */ - NewVaultResponseMessage.prototype.successful = false; - - /** - * Creates a new NewVaultResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.NewVaultResponseMessage - * @static - * @param {agentInterface.INewVaultResponseMessage=} [properties] Properties to set - * @returns {agentInterface.NewVaultResponseMessage} NewVaultResponseMessage instance - */ - NewVaultResponseMessage.create = function create(properties) { - return new NewVaultResponseMessage(properties); - }; - - /** - * Encodes the specified NewVaultResponseMessage message. Does not implicitly {@link agentInterface.NewVaultResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.NewVaultResponseMessage - * @static - * @param {agentInterface.INewVaultResponseMessage} m NewVaultResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NewVaultResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified NewVaultResponseMessage message, length delimited. Does not implicitly {@link agentInterface.NewVaultResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.NewVaultResponseMessage - * @static - * @param {agentInterface.INewVaultResponseMessage} message NewVaultResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NewVaultResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NewVaultResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.NewVaultResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.NewVaultResponseMessage} NewVaultResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NewVaultResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.NewVaultResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a NewVaultResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.NewVaultResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.NewVaultResponseMessage} NewVaultResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NewVaultResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return NewVaultResponseMessage; - })(); - - agentInterface.PullVaultRequestMessage = (function() { - - /** - * Properties of a PullVaultRequestMessage. - * @memberof agentInterface - * @interface IPullVaultRequestMessage - * @property {string|null} [vaultName] PullVaultRequestMessage vaultName - * @property {string|null} [publicKey] PullVaultRequestMessage publicKey - */ - - /** - * Constructs a new PullVaultRequestMessage. - * @memberof agentInterface - * @classdesc Represents a PullVaultRequestMessage. - * @implements IPullVaultRequestMessage - * @constructor - * @param {agentInterface.IPullVaultRequestMessage=} [p] Properties to set - */ - function PullVaultRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * PullVaultRequestMessage vaultName. - * @member {string} vaultName - * @memberof agentInterface.PullVaultRequestMessage - * @instance - */ - PullVaultRequestMessage.prototype.vaultName = ""; - - /** - * PullVaultRequestMessage publicKey. - * @member {string} publicKey - * @memberof agentInterface.PullVaultRequestMessage - * @instance - */ - PullVaultRequestMessage.prototype.publicKey = ""; - - /** - * Creates a new PullVaultRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.PullVaultRequestMessage - * @static - * @param {agentInterface.IPullVaultRequestMessage=} [properties] Properties to set - * @returns {agentInterface.PullVaultRequestMessage} PullVaultRequestMessage instance - */ - PullVaultRequestMessage.create = function create(properties) { - return new PullVaultRequestMessage(properties); - }; - - /** - * Encodes the specified PullVaultRequestMessage message. Does not implicitly {@link agentInterface.PullVaultRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.PullVaultRequestMessage - * @static - * @param {agentInterface.IPullVaultRequestMessage} m PullVaultRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PullVaultRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.vaultName != null && Object.hasOwnProperty.call(m, "vaultName")) - w.uint32(10).string(m.vaultName); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(18).string(m.publicKey); - return w; - }; - - /** - * Encodes the specified PullVaultRequestMessage message, length delimited. Does not implicitly {@link agentInterface.PullVaultRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.PullVaultRequestMessage - * @static - * @param {agentInterface.IPullVaultRequestMessage} message PullVaultRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PullVaultRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PullVaultRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.PullVaultRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.PullVaultRequestMessage} PullVaultRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PullVaultRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.PullVaultRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.vaultName = r.string(); - break; - case 2: - m.publicKey = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a PullVaultRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.PullVaultRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.PullVaultRequestMessage} PullVaultRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PullVaultRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return PullVaultRequestMessage; - })(); - - agentInterface.PullVaultResponseMessage = (function() { - - /** - * Properties of a PullVaultResponseMessage. - * @memberof agentInterface - * @interface IPullVaultResponseMessage - * @property {boolean|null} [successful] PullVaultResponseMessage successful - */ - - /** - * Constructs a new PullVaultResponseMessage. - * @memberof agentInterface - * @classdesc Represents a PullVaultResponseMessage. - * @implements IPullVaultResponseMessage - * @constructor - * @param {agentInterface.IPullVaultResponseMessage=} [p] Properties to set - */ - function PullVaultResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * PullVaultResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.PullVaultResponseMessage - * @instance - */ - PullVaultResponseMessage.prototype.successful = false; - - /** - * Creates a new PullVaultResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.PullVaultResponseMessage - * @static - * @param {agentInterface.IPullVaultResponseMessage=} [properties] Properties to set - * @returns {agentInterface.PullVaultResponseMessage} PullVaultResponseMessage instance - */ - PullVaultResponseMessage.create = function create(properties) { - return new PullVaultResponseMessage(properties); - }; - - /** - * Encodes the specified PullVaultResponseMessage message. Does not implicitly {@link agentInterface.PullVaultResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.PullVaultResponseMessage - * @static - * @param {agentInterface.IPullVaultResponseMessage} m PullVaultResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PullVaultResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified PullVaultResponseMessage message, length delimited. Does not implicitly {@link agentInterface.PullVaultResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.PullVaultResponseMessage - * @static - * @param {agentInterface.IPullVaultResponseMessage} message PullVaultResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PullVaultResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PullVaultResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.PullVaultResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.PullVaultResponseMessage} PullVaultResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PullVaultResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.PullVaultResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a PullVaultResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.PullVaultResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.PullVaultResponseMessage} PullVaultResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PullVaultResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return PullVaultResponseMessage; - })(); - - agentInterface.DestroyVaultRequestMessage = (function() { - - /** - * Properties of a DestroyVaultRequestMessage. - * @memberof agentInterface - * @interface IDestroyVaultRequestMessage - * @property {string|null} [vaultName] DestroyVaultRequestMessage vaultName - */ - - /** - * Constructs a new DestroyVaultRequestMessage. - * @memberof agentInterface - * @classdesc Represents a DestroyVaultRequestMessage. - * @implements IDestroyVaultRequestMessage - * @constructor - * @param {agentInterface.IDestroyVaultRequestMessage=} [p] Properties to set - */ - function DestroyVaultRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * DestroyVaultRequestMessage vaultName. - * @member {string} vaultName - * @memberof agentInterface.DestroyVaultRequestMessage - * @instance - */ - DestroyVaultRequestMessage.prototype.vaultName = ""; - - /** - * Creates a new DestroyVaultRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.DestroyVaultRequestMessage - * @static - * @param {agentInterface.IDestroyVaultRequestMessage=} [properties] Properties to set - * @returns {agentInterface.DestroyVaultRequestMessage} DestroyVaultRequestMessage instance - */ - DestroyVaultRequestMessage.create = function create(properties) { - return new DestroyVaultRequestMessage(properties); - }; - - /** - * Encodes the specified DestroyVaultRequestMessage message. Does not implicitly {@link agentInterface.DestroyVaultRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.DestroyVaultRequestMessage - * @static - * @param {agentInterface.IDestroyVaultRequestMessage} m DestroyVaultRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DestroyVaultRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.vaultName != null && Object.hasOwnProperty.call(m, "vaultName")) - w.uint32(10).string(m.vaultName); - return w; - }; - - /** - * Encodes the specified DestroyVaultRequestMessage message, length delimited. Does not implicitly {@link agentInterface.DestroyVaultRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.DestroyVaultRequestMessage - * @static - * @param {agentInterface.IDestroyVaultRequestMessage} message DestroyVaultRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DestroyVaultRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DestroyVaultRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.DestroyVaultRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.DestroyVaultRequestMessage} DestroyVaultRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DestroyVaultRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DestroyVaultRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.vaultName = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a DestroyVaultRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.DestroyVaultRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.DestroyVaultRequestMessage} DestroyVaultRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DestroyVaultRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return DestroyVaultRequestMessage; - })(); - - agentInterface.DestroyVaultResponseMessage = (function() { - - /** - * Properties of a DestroyVaultResponseMessage. - * @memberof agentInterface - * @interface IDestroyVaultResponseMessage - * @property {boolean|null} [successful] DestroyVaultResponseMessage successful - */ - - /** - * Constructs a new DestroyVaultResponseMessage. - * @memberof agentInterface - * @classdesc Represents a DestroyVaultResponseMessage. - * @implements IDestroyVaultResponseMessage - * @constructor - * @param {agentInterface.IDestroyVaultResponseMessage=} [p] Properties to set - */ - function DestroyVaultResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * DestroyVaultResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.DestroyVaultResponseMessage - * @instance - */ - DestroyVaultResponseMessage.prototype.successful = false; - - /** - * Creates a new DestroyVaultResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.DestroyVaultResponseMessage - * @static - * @param {agentInterface.IDestroyVaultResponseMessage=} [properties] Properties to set - * @returns {agentInterface.DestroyVaultResponseMessage} DestroyVaultResponseMessage instance - */ - DestroyVaultResponseMessage.create = function create(properties) { - return new DestroyVaultResponseMessage(properties); - }; - - /** - * Encodes the specified DestroyVaultResponseMessage message. Does not implicitly {@link agentInterface.DestroyVaultResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.DestroyVaultResponseMessage - * @static - * @param {agentInterface.IDestroyVaultResponseMessage} m DestroyVaultResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DestroyVaultResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified DestroyVaultResponseMessage message, length delimited. Does not implicitly {@link agentInterface.DestroyVaultResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.DestroyVaultResponseMessage - * @static - * @param {agentInterface.IDestroyVaultResponseMessage} message DestroyVaultResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DestroyVaultResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DestroyVaultResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.DestroyVaultResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.DestroyVaultResponseMessage} DestroyVaultResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DestroyVaultResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DestroyVaultResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a DestroyVaultResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.DestroyVaultResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.DestroyVaultResponseMessage} DestroyVaultResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DestroyVaultResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return DestroyVaultResponseMessage; - })(); - - agentInterface.ListSecretsRequestMessage = (function() { - - /** - * Properties of a ListSecretsRequestMessage. - * @memberof agentInterface - * @interface IListSecretsRequestMessage - * @property {string|null} [vaultName] ListSecretsRequestMessage vaultName - */ - - /** - * Constructs a new ListSecretsRequestMessage. - * @memberof agentInterface - * @classdesc Represents a ListSecretsRequestMessage. - * @implements IListSecretsRequestMessage - * @constructor - * @param {agentInterface.IListSecretsRequestMessage=} [p] Properties to set - */ - function ListSecretsRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * ListSecretsRequestMessage vaultName. - * @member {string} vaultName - * @memberof agentInterface.ListSecretsRequestMessage - * @instance - */ - ListSecretsRequestMessage.prototype.vaultName = ""; - - /** - * Creates a new ListSecretsRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ListSecretsRequestMessage - * @static - * @param {agentInterface.IListSecretsRequestMessage=} [properties] Properties to set - * @returns {agentInterface.ListSecretsRequestMessage} ListSecretsRequestMessage instance - */ - ListSecretsRequestMessage.create = function create(properties) { - return new ListSecretsRequestMessage(properties); - }; - - /** - * Encodes the specified ListSecretsRequestMessage message. Does not implicitly {@link agentInterface.ListSecretsRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ListSecretsRequestMessage - * @static - * @param {agentInterface.IListSecretsRequestMessage} m ListSecretsRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSecretsRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.vaultName != null && Object.hasOwnProperty.call(m, "vaultName")) - w.uint32(10).string(m.vaultName); - return w; - }; - - /** - * Encodes the specified ListSecretsRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ListSecretsRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ListSecretsRequestMessage - * @static - * @param {agentInterface.IListSecretsRequestMessage} message ListSecretsRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSecretsRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListSecretsRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ListSecretsRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ListSecretsRequestMessage} ListSecretsRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSecretsRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListSecretsRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.vaultName = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a ListSecretsRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ListSecretsRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ListSecretsRequestMessage} ListSecretsRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSecretsRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ListSecretsRequestMessage; - })(); - - agentInterface.ListSecretsResponseMessage = (function() { - - /** - * Properties of a ListSecretsResponseMessage. - * @memberof agentInterface - * @interface IListSecretsResponseMessage - * @property {Array.|null} [secretNames] ListSecretsResponseMessage secretNames - */ - - /** - * Constructs a new ListSecretsResponseMessage. - * @memberof agentInterface - * @classdesc Represents a ListSecretsResponseMessage. - * @implements IListSecretsResponseMessage - * @constructor - * @param {agentInterface.IListSecretsResponseMessage=} [p] Properties to set - */ - function ListSecretsResponseMessage(p) { - this.secretNames = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * ListSecretsResponseMessage secretNames. - * @member {Array.} secretNames - * @memberof agentInterface.ListSecretsResponseMessage - * @instance - */ - ListSecretsResponseMessage.prototype.secretNames = $util.emptyArray; - - /** - * Creates a new ListSecretsResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ListSecretsResponseMessage - * @static - * @param {agentInterface.IListSecretsResponseMessage=} [properties] Properties to set - * @returns {agentInterface.ListSecretsResponseMessage} ListSecretsResponseMessage instance - */ - ListSecretsResponseMessage.create = function create(properties) { - return new ListSecretsResponseMessage(properties); - }; - - /** - * Encodes the specified ListSecretsResponseMessage message. Does not implicitly {@link agentInterface.ListSecretsResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ListSecretsResponseMessage - * @static - * @param {agentInterface.IListSecretsResponseMessage} m ListSecretsResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSecretsResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.secretNames != null && m.secretNames.length) { - for (var i = 0; i < m.secretNames.length; ++i) - w.uint32(10).string(m.secretNames[i]); - } - return w; - }; - - /** - * Encodes the specified ListSecretsResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ListSecretsResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ListSecretsResponseMessage - * @static - * @param {agentInterface.IListSecretsResponseMessage} message ListSecretsResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSecretsResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListSecretsResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ListSecretsResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ListSecretsResponseMessage} ListSecretsResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSecretsResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListSecretsResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.secretNames && m.secretNames.length)) - m.secretNames = []; - m.secretNames.push(r.string()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a ListSecretsResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ListSecretsResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ListSecretsResponseMessage} ListSecretsResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSecretsResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ListSecretsResponseMessage; - })(); - - agentInterface.CreateSecretRequestMessage = (function() { - - /** - * Properties of a CreateSecretRequestMessage. - * @memberof agentInterface - * @interface ICreateSecretRequestMessage - * @property {string|null} [vaultName] CreateSecretRequestMessage vaultName - * @property {string|null} [secretName] CreateSecretRequestMessage secretName - * @property {string|null} [secretPath] CreateSecretRequestMessage secretPath - * @property {Uint8Array|null} [secretContent] CreateSecretRequestMessage secretContent - */ - - /** - * Constructs a new CreateSecretRequestMessage. - * @memberof agentInterface - * @classdesc Represents a CreateSecretRequestMessage. - * @implements ICreateSecretRequestMessage - * @constructor - * @param {agentInterface.ICreateSecretRequestMessage=} [p] Properties to set - */ - function CreateSecretRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * CreateSecretRequestMessage vaultName. - * @member {string} vaultName - * @memberof agentInterface.CreateSecretRequestMessage - * @instance - */ - CreateSecretRequestMessage.prototype.vaultName = ""; - - /** - * CreateSecretRequestMessage secretName. - * @member {string} secretName - * @memberof agentInterface.CreateSecretRequestMessage - * @instance - */ - CreateSecretRequestMessage.prototype.secretName = ""; - - /** - * CreateSecretRequestMessage secretPath. - * @member {string} secretPath - * @memberof agentInterface.CreateSecretRequestMessage - * @instance - */ - CreateSecretRequestMessage.prototype.secretPath = ""; - - /** - * CreateSecretRequestMessage secretContent. - * @member {Uint8Array} secretContent - * @memberof agentInterface.CreateSecretRequestMessage - * @instance - */ - CreateSecretRequestMessage.prototype.secretContent = $util.newBuffer([]); - - /** - * Creates a new CreateSecretRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.CreateSecretRequestMessage - * @static - * @param {agentInterface.ICreateSecretRequestMessage=} [properties] Properties to set - * @returns {agentInterface.CreateSecretRequestMessage} CreateSecretRequestMessage instance - */ - CreateSecretRequestMessage.create = function create(properties) { - return new CreateSecretRequestMessage(properties); - }; - - /** - * Encodes the specified CreateSecretRequestMessage message. Does not implicitly {@link agentInterface.CreateSecretRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.CreateSecretRequestMessage - * @static - * @param {agentInterface.ICreateSecretRequestMessage} m CreateSecretRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateSecretRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.vaultName != null && Object.hasOwnProperty.call(m, "vaultName")) - w.uint32(10).string(m.vaultName); - if (m.secretName != null && Object.hasOwnProperty.call(m, "secretName")) - w.uint32(18).string(m.secretName); - if (m.secretPath != null && Object.hasOwnProperty.call(m, "secretPath")) - w.uint32(26).string(m.secretPath); - if (m.secretContent != null && Object.hasOwnProperty.call(m, "secretContent")) - w.uint32(34).bytes(m.secretContent); - return w; - }; - - /** - * Encodes the specified CreateSecretRequestMessage message, length delimited. Does not implicitly {@link agentInterface.CreateSecretRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.CreateSecretRequestMessage - * @static - * @param {agentInterface.ICreateSecretRequestMessage} message CreateSecretRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateSecretRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateSecretRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.CreateSecretRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.CreateSecretRequestMessage} CreateSecretRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateSecretRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.CreateSecretRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.vaultName = r.string(); - break; - case 2: - m.secretName = r.string(); - break; - case 3: - m.secretPath = r.string(); - break; - case 4: - m.secretContent = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a CreateSecretRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.CreateSecretRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.CreateSecretRequestMessage} CreateSecretRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateSecretRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return CreateSecretRequestMessage; - })(); - - agentInterface.CreateSecretResponseMessage = (function() { - - /** - * Properties of a CreateSecretResponseMessage. - * @memberof agentInterface - * @interface ICreateSecretResponseMessage - * @property {boolean|null} [successful] CreateSecretResponseMessage successful - */ - - /** - * Constructs a new CreateSecretResponseMessage. - * @memberof agentInterface - * @classdesc Represents a CreateSecretResponseMessage. - * @implements ICreateSecretResponseMessage - * @constructor - * @param {agentInterface.ICreateSecretResponseMessage=} [p] Properties to set - */ - function CreateSecretResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * CreateSecretResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.CreateSecretResponseMessage - * @instance - */ - CreateSecretResponseMessage.prototype.successful = false; - - /** - * Creates a new CreateSecretResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.CreateSecretResponseMessage - * @static - * @param {agentInterface.ICreateSecretResponseMessage=} [properties] Properties to set - * @returns {agentInterface.CreateSecretResponseMessage} CreateSecretResponseMessage instance - */ - CreateSecretResponseMessage.create = function create(properties) { - return new CreateSecretResponseMessage(properties); - }; - - /** - * Encodes the specified CreateSecretResponseMessage message. Does not implicitly {@link agentInterface.CreateSecretResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.CreateSecretResponseMessage - * @static - * @param {agentInterface.ICreateSecretResponseMessage} m CreateSecretResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateSecretResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified CreateSecretResponseMessage message, length delimited. Does not implicitly {@link agentInterface.CreateSecretResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.CreateSecretResponseMessage - * @static - * @param {agentInterface.ICreateSecretResponseMessage} message CreateSecretResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateSecretResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateSecretResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.CreateSecretResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.CreateSecretResponseMessage} CreateSecretResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateSecretResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.CreateSecretResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a CreateSecretResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.CreateSecretResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.CreateSecretResponseMessage} CreateSecretResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateSecretResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return CreateSecretResponseMessage; - })(); - - agentInterface.DestroySecretRequestMessage = (function() { - - /** - * Properties of a DestroySecretRequestMessage. - * @memberof agentInterface - * @interface IDestroySecretRequestMessage - * @property {string|null} [vaultName] DestroySecretRequestMessage vaultName - * @property {string|null} [secretName] DestroySecretRequestMessage secretName - */ - - /** - * Constructs a new DestroySecretRequestMessage. - * @memberof agentInterface - * @classdesc Represents a DestroySecretRequestMessage. - * @implements IDestroySecretRequestMessage - * @constructor - * @param {agentInterface.IDestroySecretRequestMessage=} [p] Properties to set - */ - function DestroySecretRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * DestroySecretRequestMessage vaultName. - * @member {string} vaultName - * @memberof agentInterface.DestroySecretRequestMessage - * @instance - */ - DestroySecretRequestMessage.prototype.vaultName = ""; - - /** - * DestroySecretRequestMessage secretName. - * @member {string} secretName - * @memberof agentInterface.DestroySecretRequestMessage - * @instance - */ - DestroySecretRequestMessage.prototype.secretName = ""; - - /** - * Creates a new DestroySecretRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.DestroySecretRequestMessage - * @static - * @param {agentInterface.IDestroySecretRequestMessage=} [properties] Properties to set - * @returns {agentInterface.DestroySecretRequestMessage} DestroySecretRequestMessage instance - */ - DestroySecretRequestMessage.create = function create(properties) { - return new DestroySecretRequestMessage(properties); - }; - - /** - * Encodes the specified DestroySecretRequestMessage message. Does not implicitly {@link agentInterface.DestroySecretRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.DestroySecretRequestMessage - * @static - * @param {agentInterface.IDestroySecretRequestMessage} m DestroySecretRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DestroySecretRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.vaultName != null && Object.hasOwnProperty.call(m, "vaultName")) - w.uint32(10).string(m.vaultName); - if (m.secretName != null && Object.hasOwnProperty.call(m, "secretName")) - w.uint32(18).string(m.secretName); - return w; - }; - - /** - * Encodes the specified DestroySecretRequestMessage message, length delimited. Does not implicitly {@link agentInterface.DestroySecretRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.DestroySecretRequestMessage - * @static - * @param {agentInterface.IDestroySecretRequestMessage} message DestroySecretRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DestroySecretRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DestroySecretRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.DestroySecretRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.DestroySecretRequestMessage} DestroySecretRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DestroySecretRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DestroySecretRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.vaultName = r.string(); - break; - case 2: - m.secretName = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a DestroySecretRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.DestroySecretRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.DestroySecretRequestMessage} DestroySecretRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DestroySecretRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return DestroySecretRequestMessage; - })(); - - agentInterface.DestroySecretResponseMessage = (function() { - - /** - * Properties of a DestroySecretResponseMessage. - * @memberof agentInterface - * @interface IDestroySecretResponseMessage - * @property {boolean|null} [successful] DestroySecretResponseMessage successful - */ - - /** - * Constructs a new DestroySecretResponseMessage. - * @memberof agentInterface - * @classdesc Represents a DestroySecretResponseMessage. - * @implements IDestroySecretResponseMessage - * @constructor - * @param {agentInterface.IDestroySecretResponseMessage=} [p] Properties to set - */ - function DestroySecretResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * DestroySecretResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.DestroySecretResponseMessage - * @instance - */ - DestroySecretResponseMessage.prototype.successful = false; - - /** - * Creates a new DestroySecretResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.DestroySecretResponseMessage - * @static - * @param {agentInterface.IDestroySecretResponseMessage=} [properties] Properties to set - * @returns {agentInterface.DestroySecretResponseMessage} DestroySecretResponseMessage instance - */ - DestroySecretResponseMessage.create = function create(properties) { - return new DestroySecretResponseMessage(properties); - }; - - /** - * Encodes the specified DestroySecretResponseMessage message. Does not implicitly {@link agentInterface.DestroySecretResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.DestroySecretResponseMessage - * @static - * @param {agentInterface.IDestroySecretResponseMessage} m DestroySecretResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DestroySecretResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified DestroySecretResponseMessage message, length delimited. Does not implicitly {@link agentInterface.DestroySecretResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.DestroySecretResponseMessage - * @static - * @param {agentInterface.IDestroySecretResponseMessage} message DestroySecretResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DestroySecretResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DestroySecretResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.DestroySecretResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.DestroySecretResponseMessage} DestroySecretResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DestroySecretResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DestroySecretResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a DestroySecretResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.DestroySecretResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.DestroySecretResponseMessage} DestroySecretResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DestroySecretResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return DestroySecretResponseMessage; - })(); - - agentInterface.GetSecretRequestMessage = (function() { - - /** - * Properties of a GetSecretRequestMessage. - * @memberof agentInterface - * @interface IGetSecretRequestMessage - * @property {string|null} [vaultName] GetSecretRequestMessage vaultName - * @property {string|null} [secretName] GetSecretRequestMessage secretName - */ - - /** - * Constructs a new GetSecretRequestMessage. - * @memberof agentInterface - * @classdesc Represents a GetSecretRequestMessage. - * @implements IGetSecretRequestMessage - * @constructor - * @param {agentInterface.IGetSecretRequestMessage=} [p] Properties to set - */ - function GetSecretRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * GetSecretRequestMessage vaultName. - * @member {string} vaultName - * @memberof agentInterface.GetSecretRequestMessage - * @instance - */ - GetSecretRequestMessage.prototype.vaultName = ""; - - /** - * GetSecretRequestMessage secretName. - * @member {string} secretName - * @memberof agentInterface.GetSecretRequestMessage - * @instance - */ - GetSecretRequestMessage.prototype.secretName = ""; - - /** - * Creates a new GetSecretRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.GetSecretRequestMessage - * @static - * @param {agentInterface.IGetSecretRequestMessage=} [properties] Properties to set - * @returns {agentInterface.GetSecretRequestMessage} GetSecretRequestMessage instance - */ - GetSecretRequestMessage.create = function create(properties) { - return new GetSecretRequestMessage(properties); - }; - - /** - * Encodes the specified GetSecretRequestMessage message. Does not implicitly {@link agentInterface.GetSecretRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.GetSecretRequestMessage - * @static - * @param {agentInterface.IGetSecretRequestMessage} m GetSecretRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSecretRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.vaultName != null && Object.hasOwnProperty.call(m, "vaultName")) - w.uint32(10).string(m.vaultName); - if (m.secretName != null && Object.hasOwnProperty.call(m, "secretName")) - w.uint32(18).string(m.secretName); - return w; - }; - - /** - * Encodes the specified GetSecretRequestMessage message, length delimited. Does not implicitly {@link agentInterface.GetSecretRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.GetSecretRequestMessage - * @static - * @param {agentInterface.IGetSecretRequestMessage} message GetSecretRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSecretRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetSecretRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.GetSecretRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.GetSecretRequestMessage} GetSecretRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSecretRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.GetSecretRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.vaultName = r.string(); - break; - case 2: - m.secretName = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a GetSecretRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.GetSecretRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.GetSecretRequestMessage} GetSecretRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSecretRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return GetSecretRequestMessage; - })(); - - agentInterface.GetSecretResponseMessage = (function() { - - /** - * Properties of a GetSecretResponseMessage. - * @memberof agentInterface - * @interface IGetSecretResponseMessage - * @property {Uint8Array|null} [secret] GetSecretResponseMessage secret - */ - - /** - * Constructs a new GetSecretResponseMessage. - * @memberof agentInterface - * @classdesc Represents a GetSecretResponseMessage. - * @implements IGetSecretResponseMessage - * @constructor - * @param {agentInterface.IGetSecretResponseMessage=} [p] Properties to set - */ - function GetSecretResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * GetSecretResponseMessage secret. - * @member {Uint8Array} secret - * @memberof agentInterface.GetSecretResponseMessage - * @instance - */ - GetSecretResponseMessage.prototype.secret = $util.newBuffer([]); - - /** - * Creates a new GetSecretResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.GetSecretResponseMessage - * @static - * @param {agentInterface.IGetSecretResponseMessage=} [properties] Properties to set - * @returns {agentInterface.GetSecretResponseMessage} GetSecretResponseMessage instance - */ - GetSecretResponseMessage.create = function create(properties) { - return new GetSecretResponseMessage(properties); - }; - - /** - * Encodes the specified GetSecretResponseMessage message. Does not implicitly {@link agentInterface.GetSecretResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.GetSecretResponseMessage - * @static - * @param {agentInterface.IGetSecretResponseMessage} m GetSecretResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSecretResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.secret != null && Object.hasOwnProperty.call(m, "secret")) - w.uint32(10).bytes(m.secret); - return w; - }; - - /** - * Encodes the specified GetSecretResponseMessage message, length delimited. Does not implicitly {@link agentInterface.GetSecretResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.GetSecretResponseMessage - * @static - * @param {agentInterface.IGetSecretResponseMessage} message GetSecretResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSecretResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetSecretResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.GetSecretResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.GetSecretResponseMessage} GetSecretResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSecretResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.GetSecretResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.secret = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a GetSecretResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.GetSecretResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.GetSecretResponseMessage} GetSecretResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSecretResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return GetSecretResponseMessage; - })(); - - agentInterface.DeriveKeyRequestMessage = (function() { - - /** - * Properties of a DeriveKeyRequestMessage. - * @memberof agentInterface - * @interface IDeriveKeyRequestMessage - * @property {string|null} [vaultName] DeriveKeyRequestMessage vaultName - * @property {string|null} [keyName] DeriveKeyRequestMessage keyName - * @property {string|null} [passphrase] DeriveKeyRequestMessage passphrase - */ - - /** - * Constructs a new DeriveKeyRequestMessage. - * @memberof agentInterface - * @classdesc Represents a DeriveKeyRequestMessage. - * @implements IDeriveKeyRequestMessage - * @constructor - * @param {agentInterface.IDeriveKeyRequestMessage=} [p] Properties to set - */ - function DeriveKeyRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * DeriveKeyRequestMessage vaultName. - * @member {string} vaultName - * @memberof agentInterface.DeriveKeyRequestMessage - * @instance - */ - DeriveKeyRequestMessage.prototype.vaultName = ""; - - /** - * DeriveKeyRequestMessage keyName. - * @member {string} keyName - * @memberof agentInterface.DeriveKeyRequestMessage - * @instance - */ - DeriveKeyRequestMessage.prototype.keyName = ""; - - /** - * DeriveKeyRequestMessage passphrase. - * @member {string} passphrase - * @memberof agentInterface.DeriveKeyRequestMessage - * @instance - */ - DeriveKeyRequestMessage.prototype.passphrase = ""; - - /** - * Creates a new DeriveKeyRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.DeriveKeyRequestMessage - * @static - * @param {agentInterface.IDeriveKeyRequestMessage=} [properties] Properties to set - * @returns {agentInterface.DeriveKeyRequestMessage} DeriveKeyRequestMessage instance - */ - DeriveKeyRequestMessage.create = function create(properties) { - return new DeriveKeyRequestMessage(properties); - }; - - /** - * Encodes the specified DeriveKeyRequestMessage message. Does not implicitly {@link agentInterface.DeriveKeyRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.DeriveKeyRequestMessage - * @static - * @param {agentInterface.IDeriveKeyRequestMessage} m DeriveKeyRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeriveKeyRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.vaultName != null && Object.hasOwnProperty.call(m, "vaultName")) - w.uint32(10).string(m.vaultName); - if (m.keyName != null && Object.hasOwnProperty.call(m, "keyName")) - w.uint32(18).string(m.keyName); - if (m.passphrase != null && Object.hasOwnProperty.call(m, "passphrase")) - w.uint32(26).string(m.passphrase); - return w; - }; - - /** - * Encodes the specified DeriveKeyRequestMessage message, length delimited. Does not implicitly {@link agentInterface.DeriveKeyRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.DeriveKeyRequestMessage - * @static - * @param {agentInterface.IDeriveKeyRequestMessage} message DeriveKeyRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeriveKeyRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeriveKeyRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.DeriveKeyRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.DeriveKeyRequestMessage} DeriveKeyRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeriveKeyRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DeriveKeyRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.vaultName = r.string(); - break; - case 2: - m.keyName = r.string(); - break; - case 3: - m.passphrase = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a DeriveKeyRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.DeriveKeyRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.DeriveKeyRequestMessage} DeriveKeyRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeriveKeyRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return DeriveKeyRequestMessage; - })(); - - agentInterface.DeriveKeyResponseMessage = (function() { - - /** - * Properties of a DeriveKeyResponseMessage. - * @memberof agentInterface - * @interface IDeriveKeyResponseMessage - * @property {boolean|null} [successful] DeriveKeyResponseMessage successful - */ - - /** - * Constructs a new DeriveKeyResponseMessage. - * @memberof agentInterface - * @classdesc Represents a DeriveKeyResponseMessage. - * @implements IDeriveKeyResponseMessage - * @constructor - * @param {agentInterface.IDeriveKeyResponseMessage=} [p] Properties to set - */ - function DeriveKeyResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * DeriveKeyResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.DeriveKeyResponseMessage - * @instance - */ - DeriveKeyResponseMessage.prototype.successful = false; - - /** - * Creates a new DeriveKeyResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.DeriveKeyResponseMessage - * @static - * @param {agentInterface.IDeriveKeyResponseMessage=} [properties] Properties to set - * @returns {agentInterface.DeriveKeyResponseMessage} DeriveKeyResponseMessage instance - */ - DeriveKeyResponseMessage.create = function create(properties) { - return new DeriveKeyResponseMessage(properties); - }; - - /** - * Encodes the specified DeriveKeyResponseMessage message. Does not implicitly {@link agentInterface.DeriveKeyResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.DeriveKeyResponseMessage - * @static - * @param {agentInterface.IDeriveKeyResponseMessage} m DeriveKeyResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeriveKeyResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified DeriveKeyResponseMessage message, length delimited. Does not implicitly {@link agentInterface.DeriveKeyResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.DeriveKeyResponseMessage - * @static - * @param {agentInterface.IDeriveKeyResponseMessage} message DeriveKeyResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeriveKeyResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeriveKeyResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.DeriveKeyResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.DeriveKeyResponseMessage} DeriveKeyResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeriveKeyResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DeriveKeyResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a DeriveKeyResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.DeriveKeyResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.DeriveKeyResponseMessage} DeriveKeyResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeriveKeyResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return DeriveKeyResponseMessage; - })(); - - agentInterface.ListKeysRequestMessage = (function() { - - /** - * Properties of a ListKeysRequestMessage. - * @memberof agentInterface - * @interface IListKeysRequestMessage - */ - - /** - * Constructs a new ListKeysRequestMessage. - * @memberof agentInterface - * @classdesc Represents a ListKeysRequestMessage. - * @implements IListKeysRequestMessage - * @constructor - * @param {agentInterface.IListKeysRequestMessage=} [p] Properties to set - */ - function ListKeysRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * Creates a new ListKeysRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ListKeysRequestMessage - * @static - * @param {agentInterface.IListKeysRequestMessage=} [properties] Properties to set - * @returns {agentInterface.ListKeysRequestMessage} ListKeysRequestMessage instance - */ - ListKeysRequestMessage.create = function create(properties) { - return new ListKeysRequestMessage(properties); - }; - - /** - * Encodes the specified ListKeysRequestMessage message. Does not implicitly {@link agentInterface.ListKeysRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ListKeysRequestMessage - * @static - * @param {agentInterface.IListKeysRequestMessage} m ListKeysRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListKeysRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - return w; - }; - - /** - * Encodes the specified ListKeysRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ListKeysRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ListKeysRequestMessage - * @static - * @param {agentInterface.IListKeysRequestMessage} message ListKeysRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListKeysRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListKeysRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ListKeysRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ListKeysRequestMessage} ListKeysRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListKeysRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListKeysRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a ListKeysRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ListKeysRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ListKeysRequestMessage} ListKeysRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListKeysRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ListKeysRequestMessage; - })(); - - agentInterface.ListKeysResponseMessage = (function() { - - /** - * Properties of a ListKeysResponseMessage. - * @memberof agentInterface - * @interface IListKeysResponseMessage - * @property {Array.|null} [keyNames] ListKeysResponseMessage keyNames - */ - - /** - * Constructs a new ListKeysResponseMessage. - * @memberof agentInterface - * @classdesc Represents a ListKeysResponseMessage. - * @implements IListKeysResponseMessage - * @constructor - * @param {agentInterface.IListKeysResponseMessage=} [p] Properties to set - */ - function ListKeysResponseMessage(p) { - this.keyNames = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * ListKeysResponseMessage keyNames. - * @member {Array.} keyNames - * @memberof agentInterface.ListKeysResponseMessage - * @instance - */ - ListKeysResponseMessage.prototype.keyNames = $util.emptyArray; - - /** - * Creates a new ListKeysResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.ListKeysResponseMessage - * @static - * @param {agentInterface.IListKeysResponseMessage=} [properties] Properties to set - * @returns {agentInterface.ListKeysResponseMessage} ListKeysResponseMessage instance - */ - ListKeysResponseMessage.create = function create(properties) { - return new ListKeysResponseMessage(properties); - }; - - /** - * Encodes the specified ListKeysResponseMessage message. Does not implicitly {@link agentInterface.ListKeysResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.ListKeysResponseMessage - * @static - * @param {agentInterface.IListKeysResponseMessage} m ListKeysResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListKeysResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.keyNames != null && m.keyNames.length) { - for (var i = 0; i < m.keyNames.length; ++i) - w.uint32(10).string(m.keyNames[i]); - } - return w; - }; - - /** - * Encodes the specified ListKeysResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ListKeysResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.ListKeysResponseMessage - * @static - * @param {agentInterface.IListKeysResponseMessage} message ListKeysResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListKeysResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListKeysResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.ListKeysResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ListKeysResponseMessage} ListKeysResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListKeysResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListKeysResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.keyNames && m.keyNames.length)) - m.keyNames = []; - m.keyNames.push(r.string()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a ListKeysResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.ListKeysResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ListKeysResponseMessage} ListKeysResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListKeysResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return ListKeysResponseMessage; - })(); - - agentInterface.GetKeyRequestMessage = (function() { - - /** - * Properties of a GetKeyRequestMessage. - * @memberof agentInterface - * @interface IGetKeyRequestMessage - * @property {string|null} [keyName] GetKeyRequestMessage keyName - */ - - /** - * Constructs a new GetKeyRequestMessage. - * @memberof agentInterface - * @classdesc Represents a GetKeyRequestMessage. - * @implements IGetKeyRequestMessage - * @constructor - * @param {agentInterface.IGetKeyRequestMessage=} [p] Properties to set - */ - function GetKeyRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * GetKeyRequestMessage keyName. - * @member {string} keyName - * @memberof agentInterface.GetKeyRequestMessage - * @instance - */ - GetKeyRequestMessage.prototype.keyName = ""; - - /** - * Creates a new GetKeyRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.GetKeyRequestMessage - * @static - * @param {agentInterface.IGetKeyRequestMessage=} [properties] Properties to set - * @returns {agentInterface.GetKeyRequestMessage} GetKeyRequestMessage instance - */ - GetKeyRequestMessage.create = function create(properties) { - return new GetKeyRequestMessage(properties); - }; - - /** - * Encodes the specified GetKeyRequestMessage message. Does not implicitly {@link agentInterface.GetKeyRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.GetKeyRequestMessage - * @static - * @param {agentInterface.IGetKeyRequestMessage} m GetKeyRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetKeyRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.keyName != null && Object.hasOwnProperty.call(m, "keyName")) - w.uint32(10).string(m.keyName); - return w; - }; - - /** - * Encodes the specified GetKeyRequestMessage message, length delimited. Does not implicitly {@link agentInterface.GetKeyRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.GetKeyRequestMessage - * @static - * @param {agentInterface.IGetKeyRequestMessage} message GetKeyRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetKeyRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetKeyRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.GetKeyRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.GetKeyRequestMessage} GetKeyRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetKeyRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.GetKeyRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.keyName = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a GetKeyRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.GetKeyRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.GetKeyRequestMessage} GetKeyRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetKeyRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return GetKeyRequestMessage; - })(); - - agentInterface.GetKeyResponseMessage = (function() { - - /** - * Properties of a GetKeyResponseMessage. - * @memberof agentInterface - * @interface IGetKeyResponseMessage - * @property {string|null} [keyName] GetKeyResponseMessage keyName - * @property {string|null} [keyContent] GetKeyResponseMessage keyContent - */ - - /** - * Constructs a new GetKeyResponseMessage. - * @memberof agentInterface - * @classdesc Represents a GetKeyResponseMessage. - * @implements IGetKeyResponseMessage - * @constructor - * @param {agentInterface.IGetKeyResponseMessage=} [p] Properties to set - */ - function GetKeyResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * GetKeyResponseMessage keyName. - * @member {string} keyName - * @memberof agentInterface.GetKeyResponseMessage - * @instance - */ - GetKeyResponseMessage.prototype.keyName = ""; - - /** - * GetKeyResponseMessage keyContent. - * @member {string} keyContent - * @memberof agentInterface.GetKeyResponseMessage - * @instance - */ - GetKeyResponseMessage.prototype.keyContent = ""; - - /** - * Creates a new GetKeyResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.GetKeyResponseMessage - * @static - * @param {agentInterface.IGetKeyResponseMessage=} [properties] Properties to set - * @returns {agentInterface.GetKeyResponseMessage} GetKeyResponseMessage instance - */ - GetKeyResponseMessage.create = function create(properties) { - return new GetKeyResponseMessage(properties); - }; - - /** - * Encodes the specified GetKeyResponseMessage message. Does not implicitly {@link agentInterface.GetKeyResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.GetKeyResponseMessage - * @static - * @param {agentInterface.IGetKeyResponseMessage} m GetKeyResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetKeyResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.keyName != null && Object.hasOwnProperty.call(m, "keyName")) - w.uint32(10).string(m.keyName); - if (m.keyContent != null && Object.hasOwnProperty.call(m, "keyContent")) - w.uint32(18).string(m.keyContent); - return w; - }; - - /** - * Encodes the specified GetKeyResponseMessage message, length delimited. Does not implicitly {@link agentInterface.GetKeyResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.GetKeyResponseMessage - * @static - * @param {agentInterface.IGetKeyResponseMessage} message GetKeyResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetKeyResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetKeyResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.GetKeyResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.GetKeyResponseMessage} GetKeyResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetKeyResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.GetKeyResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.keyName = r.string(); - break; - case 2: - m.keyContent = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a GetKeyResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.GetKeyResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.GetKeyResponseMessage} GetKeyResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetKeyResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return GetKeyResponseMessage; - })(); - - agentInterface.GetPrimaryKeyPairRequestMessage = (function() { - - /** - * Properties of a GetPrimaryKeyPairRequestMessage. - * @memberof agentInterface - * @interface IGetPrimaryKeyPairRequestMessage - * @property {boolean|null} [includePrivateKey] GetPrimaryKeyPairRequestMessage includePrivateKey - */ - - /** - * Constructs a new GetPrimaryKeyPairRequestMessage. - * @memberof agentInterface - * @classdesc Represents a GetPrimaryKeyPairRequestMessage. - * @implements IGetPrimaryKeyPairRequestMessage - * @constructor - * @param {agentInterface.IGetPrimaryKeyPairRequestMessage=} [p] Properties to set - */ - function GetPrimaryKeyPairRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * GetPrimaryKeyPairRequestMessage includePrivateKey. - * @member {boolean} includePrivateKey - * @memberof agentInterface.GetPrimaryKeyPairRequestMessage - * @instance - */ - GetPrimaryKeyPairRequestMessage.prototype.includePrivateKey = false; - - /** - * Creates a new GetPrimaryKeyPairRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.GetPrimaryKeyPairRequestMessage - * @static - * @param {agentInterface.IGetPrimaryKeyPairRequestMessage=} [properties] Properties to set - * @returns {agentInterface.GetPrimaryKeyPairRequestMessage} GetPrimaryKeyPairRequestMessage instance - */ - GetPrimaryKeyPairRequestMessage.create = function create(properties) { - return new GetPrimaryKeyPairRequestMessage(properties); - }; - - /** - * Encodes the specified GetPrimaryKeyPairRequestMessage message. Does not implicitly {@link agentInterface.GetPrimaryKeyPairRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.GetPrimaryKeyPairRequestMessage - * @static - * @param {agentInterface.IGetPrimaryKeyPairRequestMessage} m GetPrimaryKeyPairRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPrimaryKeyPairRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.includePrivateKey != null && Object.hasOwnProperty.call(m, "includePrivateKey")) - w.uint32(8).bool(m.includePrivateKey); - return w; - }; - - /** - * Encodes the specified GetPrimaryKeyPairRequestMessage message, length delimited. Does not implicitly {@link agentInterface.GetPrimaryKeyPairRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.GetPrimaryKeyPairRequestMessage - * @static - * @param {agentInterface.IGetPrimaryKeyPairRequestMessage} message GetPrimaryKeyPairRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPrimaryKeyPairRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetPrimaryKeyPairRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.GetPrimaryKeyPairRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.GetPrimaryKeyPairRequestMessage} GetPrimaryKeyPairRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPrimaryKeyPairRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.GetPrimaryKeyPairRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.includePrivateKey = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a GetPrimaryKeyPairRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.GetPrimaryKeyPairRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.GetPrimaryKeyPairRequestMessage} GetPrimaryKeyPairRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPrimaryKeyPairRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return GetPrimaryKeyPairRequestMessage; - })(); - - agentInterface.GetPrimaryKeyPairResponseMessage = (function() { - - /** - * Properties of a GetPrimaryKeyPairResponseMessage. - * @memberof agentInterface - * @interface IGetPrimaryKeyPairResponseMessage - * @property {string|null} [publicKey] GetPrimaryKeyPairResponseMessage publicKey - * @property {string|null} [privateKey] GetPrimaryKeyPairResponseMessage privateKey - */ - - /** - * Constructs a new GetPrimaryKeyPairResponseMessage. - * @memberof agentInterface - * @classdesc Represents a GetPrimaryKeyPairResponseMessage. - * @implements IGetPrimaryKeyPairResponseMessage - * @constructor - * @param {agentInterface.IGetPrimaryKeyPairResponseMessage=} [p] Properties to set - */ - function GetPrimaryKeyPairResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * GetPrimaryKeyPairResponseMessage publicKey. - * @member {string} publicKey - * @memberof agentInterface.GetPrimaryKeyPairResponseMessage - * @instance - */ - GetPrimaryKeyPairResponseMessage.prototype.publicKey = ""; - - /** - * GetPrimaryKeyPairResponseMessage privateKey. - * @member {string} privateKey - * @memberof agentInterface.GetPrimaryKeyPairResponseMessage - * @instance - */ - GetPrimaryKeyPairResponseMessage.prototype.privateKey = ""; - - /** - * Creates a new GetPrimaryKeyPairResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.GetPrimaryKeyPairResponseMessage - * @static - * @param {agentInterface.IGetPrimaryKeyPairResponseMessage=} [properties] Properties to set - * @returns {agentInterface.GetPrimaryKeyPairResponseMessage} GetPrimaryKeyPairResponseMessage instance - */ - GetPrimaryKeyPairResponseMessage.create = function create(properties) { - return new GetPrimaryKeyPairResponseMessage(properties); - }; - - /** - * Encodes the specified GetPrimaryKeyPairResponseMessage message. Does not implicitly {@link agentInterface.GetPrimaryKeyPairResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.GetPrimaryKeyPairResponseMessage - * @static - * @param {agentInterface.IGetPrimaryKeyPairResponseMessage} m GetPrimaryKeyPairResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPrimaryKeyPairResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); - if (m.privateKey != null && Object.hasOwnProperty.call(m, "privateKey")) - w.uint32(18).string(m.privateKey); - return w; - }; - - /** - * Encodes the specified GetPrimaryKeyPairResponseMessage message, length delimited. Does not implicitly {@link agentInterface.GetPrimaryKeyPairResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.GetPrimaryKeyPairResponseMessage - * @static - * @param {agentInterface.IGetPrimaryKeyPairResponseMessage} message GetPrimaryKeyPairResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPrimaryKeyPairResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetPrimaryKeyPairResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.GetPrimaryKeyPairResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.GetPrimaryKeyPairResponseMessage} GetPrimaryKeyPairResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPrimaryKeyPairResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.GetPrimaryKeyPairResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.publicKey = r.string(); - break; - case 2: - m.privateKey = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a GetPrimaryKeyPairResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.GetPrimaryKeyPairResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.GetPrimaryKeyPairResponseMessage} GetPrimaryKeyPairResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPrimaryKeyPairResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return GetPrimaryKeyPairResponseMessage; - })(); - - agentInterface.UpdateSecretRequestMessage = (function() { - - /** - * Properties of an UpdateSecretRequestMessage. - * @memberof agentInterface - * @interface IUpdateSecretRequestMessage - * @property {string|null} [vaultName] UpdateSecretRequestMessage vaultName - * @property {string|null} [secretName] UpdateSecretRequestMessage secretName - * @property {string|null} [secretPath] UpdateSecretRequestMessage secretPath - * @property {Uint8Array|null} [secretContent] UpdateSecretRequestMessage secretContent - */ - - /** - * Constructs a new UpdateSecretRequestMessage. - * @memberof agentInterface - * @classdesc Represents an UpdateSecretRequestMessage. - * @implements IUpdateSecretRequestMessage - * @constructor - * @param {agentInterface.IUpdateSecretRequestMessage=} [p] Properties to set - */ - function UpdateSecretRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * UpdateSecretRequestMessage vaultName. - * @member {string} vaultName - * @memberof agentInterface.UpdateSecretRequestMessage - * @instance - */ - UpdateSecretRequestMessage.prototype.vaultName = ""; - - /** - * UpdateSecretRequestMessage secretName. - * @member {string} secretName - * @memberof agentInterface.UpdateSecretRequestMessage - * @instance - */ - UpdateSecretRequestMessage.prototype.secretName = ""; - - /** - * UpdateSecretRequestMessage secretPath. - * @member {string} secretPath - * @memberof agentInterface.UpdateSecretRequestMessage - * @instance - */ - UpdateSecretRequestMessage.prototype.secretPath = ""; - - /** - * UpdateSecretRequestMessage secretContent. - * @member {Uint8Array} secretContent - * @memberof agentInterface.UpdateSecretRequestMessage - * @instance - */ - UpdateSecretRequestMessage.prototype.secretContent = $util.newBuffer([]); - - /** - * Creates a new UpdateSecretRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.UpdateSecretRequestMessage - * @static - * @param {agentInterface.IUpdateSecretRequestMessage=} [properties] Properties to set - * @returns {agentInterface.UpdateSecretRequestMessage} UpdateSecretRequestMessage instance - */ - UpdateSecretRequestMessage.create = function create(properties) { - return new UpdateSecretRequestMessage(properties); - }; - - /** - * Encodes the specified UpdateSecretRequestMessage message. Does not implicitly {@link agentInterface.UpdateSecretRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.UpdateSecretRequestMessage - * @static - * @param {agentInterface.IUpdateSecretRequestMessage} m UpdateSecretRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSecretRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.vaultName != null && Object.hasOwnProperty.call(m, "vaultName")) - w.uint32(10).string(m.vaultName); - if (m.secretName != null && Object.hasOwnProperty.call(m, "secretName")) - w.uint32(18).string(m.secretName); - if (m.secretPath != null && Object.hasOwnProperty.call(m, "secretPath")) - w.uint32(26).string(m.secretPath); - if (m.secretContent != null && Object.hasOwnProperty.call(m, "secretContent")) - w.uint32(34).bytes(m.secretContent); - return w; - }; - - /** - * Encodes the specified UpdateSecretRequestMessage message, length delimited. Does not implicitly {@link agentInterface.UpdateSecretRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.UpdateSecretRequestMessage - * @static - * @param {agentInterface.IUpdateSecretRequestMessage} message UpdateSecretRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSecretRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateSecretRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.UpdateSecretRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.UpdateSecretRequestMessage} UpdateSecretRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateSecretRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.UpdateSecretRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.vaultName = r.string(); - break; - case 2: - m.secretName = r.string(); - break; - case 3: - m.secretPath = r.string(); - break; - case 4: - m.secretContent = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes an UpdateSecretRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.UpdateSecretRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.UpdateSecretRequestMessage} UpdateSecretRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateSecretRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return UpdateSecretRequestMessage; - })(); - - agentInterface.UpdateSecretResponseMessage = (function() { - - /** - * Properties of an UpdateSecretResponseMessage. - * @memberof agentInterface - * @interface IUpdateSecretResponseMessage - * @property {boolean|null} [successful] UpdateSecretResponseMessage successful - */ - - /** - * Constructs a new UpdateSecretResponseMessage. - * @memberof agentInterface - * @classdesc Represents an UpdateSecretResponseMessage. - * @implements IUpdateSecretResponseMessage - * @constructor - * @param {agentInterface.IUpdateSecretResponseMessage=} [p] Properties to set - */ - function UpdateSecretResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * UpdateSecretResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.UpdateSecretResponseMessage - * @instance - */ - UpdateSecretResponseMessage.prototype.successful = false; - - /** - * Creates a new UpdateSecretResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.UpdateSecretResponseMessage - * @static - * @param {agentInterface.IUpdateSecretResponseMessage=} [properties] Properties to set - * @returns {agentInterface.UpdateSecretResponseMessage} UpdateSecretResponseMessage instance - */ - UpdateSecretResponseMessage.create = function create(properties) { - return new UpdateSecretResponseMessage(properties); - }; - - /** - * Encodes the specified UpdateSecretResponseMessage message. Does not implicitly {@link agentInterface.UpdateSecretResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.UpdateSecretResponseMessage - * @static - * @param {agentInterface.IUpdateSecretResponseMessage} m UpdateSecretResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSecretResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified UpdateSecretResponseMessage message, length delimited. Does not implicitly {@link agentInterface.UpdateSecretResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.UpdateSecretResponseMessage - * @static - * @param {agentInterface.IUpdateSecretResponseMessage} message UpdateSecretResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSecretResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateSecretResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.UpdateSecretResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.UpdateSecretResponseMessage} UpdateSecretResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateSecretResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.UpdateSecretResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes an UpdateSecretResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.UpdateSecretResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.UpdateSecretResponseMessage} UpdateSecretResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateSecretResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return UpdateSecretResponseMessage; - })(); - - agentInterface.DeleteKeyRequestMessage = (function() { - - /** - * Properties of a DeleteKeyRequestMessage. - * @memberof agentInterface - * @interface IDeleteKeyRequestMessage - * @property {string|null} [keyName] DeleteKeyRequestMessage keyName - */ - - /** - * Constructs a new DeleteKeyRequestMessage. - * @memberof agentInterface - * @classdesc Represents a DeleteKeyRequestMessage. - * @implements IDeleteKeyRequestMessage - * @constructor - * @param {agentInterface.IDeleteKeyRequestMessage=} [p] Properties to set - */ - function DeleteKeyRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * DeleteKeyRequestMessage keyName. - * @member {string} keyName - * @memberof agentInterface.DeleteKeyRequestMessage - * @instance - */ - DeleteKeyRequestMessage.prototype.keyName = ""; - - /** - * Creates a new DeleteKeyRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.DeleteKeyRequestMessage - * @static - * @param {agentInterface.IDeleteKeyRequestMessage=} [properties] Properties to set - * @returns {agentInterface.DeleteKeyRequestMessage} DeleteKeyRequestMessage instance - */ - DeleteKeyRequestMessage.create = function create(properties) { - return new DeleteKeyRequestMessage(properties); - }; - - /** - * Encodes the specified DeleteKeyRequestMessage message. Does not implicitly {@link agentInterface.DeleteKeyRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.DeleteKeyRequestMessage - * @static - * @param {agentInterface.IDeleteKeyRequestMessage} m DeleteKeyRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteKeyRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.keyName != null && Object.hasOwnProperty.call(m, "keyName")) - w.uint32(10).string(m.keyName); - return w; - }; - - /** - * Encodes the specified DeleteKeyRequestMessage message, length delimited. Does not implicitly {@link agentInterface.DeleteKeyRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.DeleteKeyRequestMessage - * @static - * @param {agentInterface.IDeleteKeyRequestMessage} message DeleteKeyRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteKeyRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteKeyRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.DeleteKeyRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.DeleteKeyRequestMessage} DeleteKeyRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteKeyRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DeleteKeyRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.keyName = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a DeleteKeyRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.DeleteKeyRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.DeleteKeyRequestMessage} DeleteKeyRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteKeyRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return DeleteKeyRequestMessage; - })(); - - agentInterface.DeleteKeyResponseMessage = (function() { - - /** - * Properties of a DeleteKeyResponseMessage. - * @memberof agentInterface - * @interface IDeleteKeyResponseMessage - * @property {boolean|null} [successful] DeleteKeyResponseMessage successful - */ - - /** - * Constructs a new DeleteKeyResponseMessage. - * @memberof agentInterface - * @classdesc Represents a DeleteKeyResponseMessage. - * @implements IDeleteKeyResponseMessage - * @constructor - * @param {agentInterface.IDeleteKeyResponseMessage=} [p] Properties to set - */ - function DeleteKeyResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * DeleteKeyResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.DeleteKeyResponseMessage - * @instance - */ - DeleteKeyResponseMessage.prototype.successful = false; - - /** - * Creates a new DeleteKeyResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.DeleteKeyResponseMessage - * @static - * @param {agentInterface.IDeleteKeyResponseMessage=} [properties] Properties to set - * @returns {agentInterface.DeleteKeyResponseMessage} DeleteKeyResponseMessage instance - */ - DeleteKeyResponseMessage.create = function create(properties) { - return new DeleteKeyResponseMessage(properties); - }; - - /** - * Encodes the specified DeleteKeyResponseMessage message. Does not implicitly {@link agentInterface.DeleteKeyResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.DeleteKeyResponseMessage - * @static - * @param {agentInterface.IDeleteKeyResponseMessage} m DeleteKeyResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteKeyResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); - return w; - }; - - /** - * Encodes the specified DeleteKeyResponseMessage message, length delimited. Does not implicitly {@link agentInterface.DeleteKeyResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.DeleteKeyResponseMessage - * @static - * @param {agentInterface.IDeleteKeyResponseMessage} message DeleteKeyResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteKeyResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteKeyResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.DeleteKeyResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.DeleteKeyResponseMessage} DeleteKeyResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteKeyResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DeleteKeyResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - /** - * Decodes a DeleteKeyResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.DeleteKeyResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.DeleteKeyResponseMessage} DeleteKeyResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteKeyResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return DeleteKeyResponseMessage; - })(); - - agentInterface.PeerInfoRequestMessage = (function() { - - /** - * Properties of a PeerInfoRequestMessage. - * @memberof agentInterface - * @interface IPeerInfoRequestMessage - * @property {boolean|null} [current] PeerInfoRequestMessage current - * @property {string|null} [publicKey] PeerInfoRequestMessage publicKey - */ - - /** - * Constructs a new PeerInfoRequestMessage. - * @memberof agentInterface - * @classdesc Represents a PeerInfoRequestMessage. - * @implements IPeerInfoRequestMessage - * @constructor - * @param {agentInterface.IPeerInfoRequestMessage=} [p] Properties to set - */ - function PeerInfoRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } - - /** - * PeerInfoRequestMessage current. - * @member {boolean} current - * @memberof agentInterface.PeerInfoRequestMessage - * @instance + * Callback as used by {@link agentInterface.Agent#requestRelay}. + * @memberof agentInterface.Agent + * @typedef RequestRelayCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.BooleanMessage} [response] BooleanMessage */ - PeerInfoRequestMessage.prototype.current = false; /** - * PeerInfoRequestMessage publicKey. - * @member {string} publicKey - * @memberof agentInterface.PeerInfoRequestMessage + * Calls RequestRelay. + * @function requestRelay + * @memberof agentInterface.Agent * @instance + * @param {agentInterface.IStringMessage} request StringMessage message or plain object + * @param {agentInterface.Agent.RequestRelayCallback} callback Node-style callback called with the error, if any, and BooleanMessage + * @returns {undefined} + * @variation 1 */ - PeerInfoRequestMessage.prototype.publicKey = ""; + Object.defineProperty(Agent.prototype.requestRelay = function requestRelay(request, callback) { + return this.rpcCall(requestRelay, $root.agentInterface.StringMessage, $root.agentInterface.BooleanMessage, request, callback); + }, "name", { value: "RequestRelay" }); /** - * Creates a new PeerInfoRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.PeerInfoRequestMessage - * @static - * @param {agentInterface.IPeerInfoRequestMessage=} [properties] Properties to set - * @returns {agentInterface.PeerInfoRequestMessage} PeerInfoRequestMessage instance + * Calls RequestRelay. + * @function requestRelay + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IStringMessage} request StringMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - PeerInfoRequestMessage.create = function create(properties) { - return new PeerInfoRequestMessage(properties); - }; /** - * Encodes the specified PeerInfoRequestMessage message. Does not implicitly {@link agentInterface.PeerInfoRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.PeerInfoRequestMessage - * @static - * @param {agentInterface.IPeerInfoRequestMessage} m PeerInfoRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link agentInterface.Agent#scanVaultNames}. + * @memberof agentInterface.Agent + * @typedef ScanVaultNamesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.StringListMessage} [response] StringListMessage */ - PeerInfoRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.current != null && Object.hasOwnProperty.call(m, "current")) - w.uint32(8).bool(m.current); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(18).string(m.publicKey); - return w; - }; /** - * Encodes the specified PeerInfoRequestMessage message, length delimited. Does not implicitly {@link agentInterface.PeerInfoRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.PeerInfoRequestMessage - * @static - * @param {agentInterface.IPeerInfoRequestMessage} message PeerInfoRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ScanVaultNames. + * @function scanVaultNames + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IStringMessage} request StringMessage message or plain object + * @param {agentInterface.Agent.ScanVaultNamesCallback} callback Node-style callback called with the error, if any, and StringListMessage + * @returns {undefined} + * @variation 1 */ - PeerInfoRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(Agent.prototype.scanVaultNames = function scanVaultNames(request, callback) { + return this.rpcCall(scanVaultNames, $root.agentInterface.StringMessage, $root.agentInterface.StringListMessage, request, callback); + }, "name", { value: "ScanVaultNames" }); /** - * Decodes a PeerInfoRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.PeerInfoRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.PeerInfoRequestMessage} PeerInfoRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ScanVaultNames. + * @function scanVaultNames + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IStringMessage} request StringMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - PeerInfoRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.PeerInfoRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.current = r.bool(); - break; - case 2: - m.publicKey = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; /** - * Decodes a PeerInfoRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.PeerInfoRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.PeerInfoRequestMessage} PeerInfoRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link agentInterface.Agent#signFile}. + * @memberof agentInterface.Agent + * @typedef SignFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.StringMessage} [response] StringMessage */ - PeerInfoRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return PeerInfoRequestMessage; - })(); - - agentInterface.PeerInfoResponseMessage = (function() { /** - * Properties of a PeerInfoResponseMessage. - * @memberof agentInterface - * @interface IPeerInfoResponseMessage - * @property {string|null} [publicKey] PeerInfoResponseMessage publicKey - * @property {string|null} [peerAddress] PeerInfoResponseMessage peerAddress - * @property {string|null} [relayPublicKey] PeerInfoResponseMessage relayPublicKey + * Calls SignFile. + * @function signFile + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.ISignFileMessage} request SignFileMessage message or plain object + * @param {agentInterface.Agent.SignFileCallback} callback Node-style callback called with the error, if any, and StringMessage + * @returns {undefined} + * @variation 1 */ + Object.defineProperty(Agent.prototype.signFile = function signFile(request, callback) { + return this.rpcCall(signFile, $root.agentInterface.SignFileMessage, $root.agentInterface.StringMessage, request, callback); + }, "name", { value: "SignFile" }); /** - * Constructs a new PeerInfoResponseMessage. - * @memberof agentInterface - * @classdesc Represents a PeerInfoResponseMessage. - * @implements IPeerInfoResponseMessage - * @constructor - * @param {agentInterface.IPeerInfoResponseMessage=} [p] Properties to set + * Calls SignFile. + * @function signFile + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.ISignFileMessage} request SignFileMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - function PeerInfoResponseMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } /** - * PeerInfoResponseMessage publicKey. - * @member {string} publicKey - * @memberof agentInterface.PeerInfoResponseMessage - * @instance + * Callback as used by {@link agentInterface.Agent#stopAgent}. + * @memberof agentInterface.Agent + * @typedef StopAgentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.BooleanMessage} [response] BooleanMessage */ - PeerInfoResponseMessage.prototype.publicKey = ""; /** - * PeerInfoResponseMessage peerAddress. - * @member {string} peerAddress - * @memberof agentInterface.PeerInfoResponseMessage + * Calls StopAgent. + * @function stopAgent + * @memberof agentInterface.Agent * @instance + * @param {agentInterface.IEmptyMessage} request EmptyMessage message or plain object + * @param {agentInterface.Agent.StopAgentCallback} callback Node-style callback called with the error, if any, and BooleanMessage + * @returns {undefined} + * @variation 1 */ - PeerInfoResponseMessage.prototype.peerAddress = ""; + Object.defineProperty(Agent.prototype.stopAgent = function stopAgent(request, callback) { + return this.rpcCall(stopAgent, $root.agentInterface.EmptyMessage, $root.agentInterface.BooleanMessage, request, callback); + }, "name", { value: "StopAgent" }); /** - * PeerInfoResponseMessage relayPublicKey. - * @member {string} relayPublicKey - * @memberof agentInterface.PeerInfoResponseMessage + * Calls StopAgent. + * @function stopAgent + * @memberof agentInterface.Agent * @instance + * @param {agentInterface.IEmptyMessage} request EmptyMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - PeerInfoResponseMessage.prototype.relayPublicKey = ""; /** - * Creates a new PeerInfoResponseMessage instance using the specified properties. - * @function create - * @memberof agentInterface.PeerInfoResponseMessage - * @static - * @param {agentInterface.IPeerInfoResponseMessage=} [properties] Properties to set - * @returns {agentInterface.PeerInfoResponseMessage} PeerInfoResponseMessage instance + * Callback as used by {@link agentInterface.Agent#toggleStealthMode}. + * @memberof agentInterface.Agent + * @typedef ToggleStealthModeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.BooleanMessage} [response] BooleanMessage */ - PeerInfoResponseMessage.create = function create(properties) { - return new PeerInfoResponseMessage(properties); - }; /** - * Encodes the specified PeerInfoResponseMessage message. Does not implicitly {@link agentInterface.PeerInfoResponseMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.PeerInfoResponseMessage - * @static - * @param {agentInterface.IPeerInfoResponseMessage} m PeerInfoResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ToggleStealthMode. + * @function toggleStealthMode + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IBooleanMessage} request BooleanMessage message or plain object + * @param {agentInterface.Agent.ToggleStealthModeCallback} callback Node-style callback called with the error, if any, and BooleanMessage + * @returns {undefined} + * @variation 1 */ - PeerInfoResponseMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); - if (m.peerAddress != null && Object.hasOwnProperty.call(m, "peerAddress")) - w.uint32(18).string(m.peerAddress); - if (m.relayPublicKey != null && Object.hasOwnProperty.call(m, "relayPublicKey")) - w.uint32(26).string(m.relayPublicKey); - return w; - }; + Object.defineProperty(Agent.prototype.toggleStealthMode = function toggleStealthMode(request, callback) { + return this.rpcCall(toggleStealthMode, $root.agentInterface.BooleanMessage, $root.agentInterface.BooleanMessage, request, callback); + }, "name", { value: "ToggleStealthMode" }); /** - * Encodes the specified PeerInfoResponseMessage message, length delimited. Does not implicitly {@link agentInterface.PeerInfoResponseMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.PeerInfoResponseMessage - * @static - * @param {agentInterface.IPeerInfoResponseMessage} message PeerInfoResponseMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ToggleStealthMode. + * @function toggleStealthMode + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IBooleanMessage} request BooleanMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - PeerInfoResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a PeerInfoResponseMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.PeerInfoResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.PeerInfoResponseMessage} PeerInfoResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link agentInterface.Agent#updateLocalPeerInfo}. + * @memberof agentInterface.Agent + * @typedef UpdateLocalPeerInfoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.BooleanMessage} [response] BooleanMessage */ - PeerInfoResponseMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.PeerInfoResponseMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.publicKey = r.string(); - break; - case 2: - m.peerAddress = r.string(); - break; - case 3: - m.relayPublicKey = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; /** - * Decodes a PeerInfoResponseMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.PeerInfoResponseMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.PeerInfoResponseMessage} PeerInfoResponseMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateLocalPeerInfo. + * @function updateLocalPeerInfo + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IPeerInfoMessage} request PeerInfoMessage message or plain object + * @param {agentInterface.Agent.UpdateLocalPeerInfoCallback} callback Node-style callback called with the error, if any, and BooleanMessage + * @returns {undefined} + * @variation 1 */ - PeerInfoResponseMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - return PeerInfoResponseMessage; - })(); - - agentInterface.AddPeerRequestMessage = (function() { + Object.defineProperty(Agent.prototype.updateLocalPeerInfo = function updateLocalPeerInfo(request, callback) { + return this.rpcCall(updateLocalPeerInfo, $root.agentInterface.PeerInfoMessage, $root.agentInterface.BooleanMessage, request, callback); + }, "name", { value: "UpdateLocalPeerInfo" }); /** - * Properties of an AddPeerRequestMessage. - * @memberof agentInterface - * @interface IAddPeerRequestMessage - * @property {string|null} [publicKey] AddPeerRequestMessage publicKey - * @property {string|null} [peerAddress] AddPeerRequestMessage peerAddress - * @property {string|null} [relayPublicKey] AddPeerRequestMessage relayPublicKey + * Calls UpdateLocalPeerInfo. + * @function updateLocalPeerInfo + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IPeerInfoMessage} request PeerInfoMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new AddPeerRequestMessage. - * @memberof agentInterface - * @classdesc Represents an AddPeerRequestMessage. - * @implements IAddPeerRequestMessage - * @constructor - * @param {agentInterface.IAddPeerRequestMessage=} [p] Properties to set + * Callback as used by {@link agentInterface.Agent#updatePeerInfo}. + * @memberof agentInterface.Agent + * @typedef UpdatePeerInfoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.BooleanMessage} [response] BooleanMessage */ - function AddPeerRequestMessage(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } /** - * AddPeerRequestMessage publicKey. - * @member {string} publicKey - * @memberof agentInterface.AddPeerRequestMessage + * Calls UpdatePeerInfo. + * @function updatePeerInfo + * @memberof agentInterface.Agent * @instance + * @param {agentInterface.IPeerInfoMessage} request PeerInfoMessage message or plain object + * @param {agentInterface.Agent.UpdatePeerInfoCallback} callback Node-style callback called with the error, if any, and BooleanMessage + * @returns {undefined} + * @variation 1 */ - AddPeerRequestMessage.prototype.publicKey = ""; + Object.defineProperty(Agent.prototype.updatePeerInfo = function updatePeerInfo(request, callback) { + return this.rpcCall(updatePeerInfo, $root.agentInterface.PeerInfoMessage, $root.agentInterface.BooleanMessage, request, callback); + }, "name", { value: "UpdatePeerInfo" }); /** - * AddPeerRequestMessage peerAddress. - * @member {string} peerAddress - * @memberof agentInterface.AddPeerRequestMessage + * Calls UpdatePeerInfo. + * @function updatePeerInfo + * @memberof agentInterface.Agent * @instance + * @param {agentInterface.IPeerInfoMessage} request PeerInfoMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - AddPeerRequestMessage.prototype.peerAddress = ""; /** - * AddPeerRequestMessage relayPublicKey. - * @member {string} relayPublicKey - * @memberof agentInterface.AddPeerRequestMessage - * @instance + * Callback as used by {@link agentInterface.Agent#updateSecret}. + * @memberof agentInterface.Agent + * @typedef UpdateSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.BooleanMessage} [response] BooleanMessage */ - AddPeerRequestMessage.prototype.relayPublicKey = ""; /** - * Creates a new AddPeerRequestMessage instance using the specified properties. - * @function create - * @memberof agentInterface.AddPeerRequestMessage - * @static - * @param {agentInterface.IAddPeerRequestMessage=} [properties] Properties to set - * @returns {agentInterface.AddPeerRequestMessage} AddPeerRequestMessage instance + * Calls UpdateSecret. + * @function updateSecret + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.ISecretContentMessage} request SecretContentMessage message or plain object + * @param {agentInterface.Agent.UpdateSecretCallback} callback Node-style callback called with the error, if any, and BooleanMessage + * @returns {undefined} + * @variation 1 */ - AddPeerRequestMessage.create = function create(properties) { - return new AddPeerRequestMessage(properties); - }; + Object.defineProperty(Agent.prototype.updateSecret = function updateSecret(request, callback) { + return this.rpcCall(updateSecret, $root.agentInterface.SecretContentMessage, $root.agentInterface.BooleanMessage, request, callback); + }, "name", { value: "UpdateSecret" }); /** - * Encodes the specified AddPeerRequestMessage message. Does not implicitly {@link agentInterface.AddPeerRequestMessage.verify|verify} messages. - * @function encode - * @memberof agentInterface.AddPeerRequestMessage - * @static - * @param {agentInterface.IAddPeerRequestMessage} m AddPeerRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls UpdateSecret. + * @function updateSecret + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.ISecretContentMessage} request SecretContentMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - AddPeerRequestMessage.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); - if (m.peerAddress != null && Object.hasOwnProperty.call(m, "peerAddress")) - w.uint32(18).string(m.peerAddress); - if (m.relayPublicKey != null && Object.hasOwnProperty.call(m, "relayPublicKey")) - w.uint32(26).string(m.relayPublicKey); - return w; - }; /** - * Encodes the specified AddPeerRequestMessage message, length delimited. Does not implicitly {@link agentInterface.AddPeerRequestMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof agentInterface.AddPeerRequestMessage - * @static - * @param {agentInterface.IAddPeerRequestMessage} message AddPeerRequestMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link agentInterface.Agent#verifyFile}. + * @memberof agentInterface.Agent + * @typedef VerifyFileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {agentInterface.BooleanMessage} [response] BooleanMessage */ - AddPeerRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes an AddPeerRequestMessage message from the specified reader or buffer. - * @function decode - * @memberof agentInterface.AddPeerRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.AddPeerRequestMessage} AddPeerRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls VerifyFile. + * @function verifyFile + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IVerifyFileMessage} request VerifyFileMessage message or plain object + * @param {agentInterface.Agent.VerifyFileCallback} callback Node-style callback called with the error, if any, and BooleanMessage + * @returns {undefined} + * @variation 1 */ - AddPeerRequestMessage.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.AddPeerRequestMessage(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.publicKey = r.string(); - break; - case 2: - m.peerAddress = r.string(); - break; - case 3: - m.relayPublicKey = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; + Object.defineProperty(Agent.prototype.verifyFile = function verifyFile(request, callback) { + return this.rpcCall(verifyFile, $root.agentInterface.VerifyFileMessage, $root.agentInterface.BooleanMessage, request, callback); + }, "name", { value: "VerifyFile" }); /** - * Decodes an AddPeerRequestMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof agentInterface.AddPeerRequestMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.AddPeerRequestMessage} AddPeerRequestMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls VerifyFile. + * @function verifyFile + * @memberof agentInterface.Agent + * @instance + * @param {agentInterface.IVerifyFileMessage} request VerifyFileMessage message or plain object + * @returns {Promise} Promise + * @variation 2 */ - AddPeerRequestMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - return AddPeerRequestMessage; + return Agent; })(); - agentInterface.AddPeerResponseMessage = (function() { + agentInterface.EmptyMessage = (function() { /** - * Properties of an AddPeerResponseMessage. + * Properties of an EmptyMessage. * @memberof agentInterface - * @interface IAddPeerResponseMessage - * @property {boolean|null} [successful] AddPeerResponseMessage successful + * @interface IEmptyMessage */ /** - * Constructs a new AddPeerResponseMessage. + * Constructs a new EmptyMessage. * @memberof agentInterface - * @classdesc Represents an AddPeerResponseMessage. - * @implements IAddPeerResponseMessage + * @classdesc Represents an EmptyMessage. + * @implements IEmptyMessage * @constructor - * @param {agentInterface.IAddPeerResponseMessage=} [p] Properties to set + * @param {agentInterface.IEmptyMessage=} [p] Properties to set */ - function AddPeerResponseMessage(p) { + function EmptyMessage(p) { if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) @@ -6642,76 +1265,63 @@ $root.agentInterface = (function() { } /** - * AddPeerResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.AddPeerResponseMessage - * @instance - */ - AddPeerResponseMessage.prototype.successful = false; - - /** - * Creates a new AddPeerResponseMessage instance using the specified properties. + * Creates a new EmptyMessage instance using the specified properties. * @function create - * @memberof agentInterface.AddPeerResponseMessage + * @memberof agentInterface.EmptyMessage * @static - * @param {agentInterface.IAddPeerResponseMessage=} [properties] Properties to set - * @returns {agentInterface.AddPeerResponseMessage} AddPeerResponseMessage instance + * @param {agentInterface.IEmptyMessage=} [properties] Properties to set + * @returns {agentInterface.EmptyMessage} EmptyMessage instance */ - AddPeerResponseMessage.create = function create(properties) { - return new AddPeerResponseMessage(properties); + EmptyMessage.create = function create(properties) { + return new EmptyMessage(properties); }; /** - * Encodes the specified AddPeerResponseMessage message. Does not implicitly {@link agentInterface.AddPeerResponseMessage.verify|verify} messages. + * Encodes the specified EmptyMessage message. Does not implicitly {@link agentInterface.EmptyMessage.verify|verify} messages. * @function encode - * @memberof agentInterface.AddPeerResponseMessage + * @memberof agentInterface.EmptyMessage * @static - * @param {agentInterface.IAddPeerResponseMessage} m AddPeerResponseMessage message or plain object to encode + * @param {agentInterface.IEmptyMessage} m EmptyMessage message or plain object to encode * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AddPeerResponseMessage.encode = function encode(m, w) { + EmptyMessage.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); return w; }; /** - * Encodes the specified AddPeerResponseMessage message, length delimited. Does not implicitly {@link agentInterface.AddPeerResponseMessage.verify|verify} messages. + * Encodes the specified EmptyMessage message, length delimited. Does not implicitly {@link agentInterface.EmptyMessage.verify|verify} messages. * @function encodeDelimited - * @memberof agentInterface.AddPeerResponseMessage + * @memberof agentInterface.EmptyMessage * @static - * @param {agentInterface.IAddPeerResponseMessage} message AddPeerResponseMessage message or plain object to encode + * @param {agentInterface.IEmptyMessage} message EmptyMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AddPeerResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + EmptyMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AddPeerResponseMessage message from the specified reader or buffer. + * Decodes an EmptyMessage message from the specified reader or buffer. * @function decode - * @memberof agentInterface.AddPeerResponseMessage + * @memberof agentInterface.EmptyMessage * @static * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.AddPeerResponseMessage} AddPeerResponseMessage + * @returns {agentInterface.EmptyMessage} EmptyMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AddPeerResponseMessage.decode = function decode(r, l) { + EmptyMessage.decode = function decode(r, l) { if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.AddPeerResponseMessage(); + var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.EmptyMessage(); while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { - case 1: - m.successful = r.bool(); - break; default: r.skipType(t & 7); break; @@ -6721,43 +1331,42 @@ $root.agentInterface = (function() { }; /** - * Decodes an AddPeerResponseMessage message from the specified reader or buffer, length delimited. + * Decodes an EmptyMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof agentInterface.AddPeerResponseMessage + * @memberof agentInterface.EmptyMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.AddPeerResponseMessage} AddPeerResponseMessage + * @returns {agentInterface.EmptyMessage} EmptyMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AddPeerResponseMessage.decodeDelimited = function decodeDelimited(reader) { + EmptyMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; - return AddPeerResponseMessage; + return EmptyMessage; })(); - agentInterface.PingPeerRequestMessage = (function() { + agentInterface.StringMessage = (function() { /** - * Properties of a PingPeerRequestMessage. + * Properties of a StringMessage. * @memberof agentInterface - * @interface IPingPeerRequestMessage - * @property {string|null} [publicKey] PingPeerRequestMessage publicKey - * @property {number|null} [timeout] PingPeerRequestMessage timeout + * @interface IStringMessage + * @property {string|null} [s] StringMessage s */ /** - * Constructs a new PingPeerRequestMessage. + * Constructs a new StringMessage. * @memberof agentInterface - * @classdesc Represents a PingPeerRequestMessage. - * @implements IPingPeerRequestMessage + * @classdesc Represents a StringMessage. + * @implements IStringMessage * @constructor - * @param {agentInterface.IPingPeerRequestMessage=} [p] Properties to set + * @param {agentInterface.IStringMessage=} [p] Properties to set */ - function PingPeerRequestMessage(p) { + function StringMessage(p) { if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) @@ -6765,88 +1374,75 @@ $root.agentInterface = (function() { } /** - * PingPeerRequestMessage publicKey. - * @member {string} publicKey - * @memberof agentInterface.PingPeerRequestMessage - * @instance - */ - PingPeerRequestMessage.prototype.publicKey = ""; - - /** - * PingPeerRequestMessage timeout. - * @member {number} timeout - * @memberof agentInterface.PingPeerRequestMessage + * StringMessage s. + * @member {string} s + * @memberof agentInterface.StringMessage * @instance */ - PingPeerRequestMessage.prototype.timeout = 0; + StringMessage.prototype.s = ""; /** - * Creates a new PingPeerRequestMessage instance using the specified properties. + * Creates a new StringMessage instance using the specified properties. * @function create - * @memberof agentInterface.PingPeerRequestMessage + * @memberof agentInterface.StringMessage * @static - * @param {agentInterface.IPingPeerRequestMessage=} [properties] Properties to set - * @returns {agentInterface.PingPeerRequestMessage} PingPeerRequestMessage instance + * @param {agentInterface.IStringMessage=} [properties] Properties to set + * @returns {agentInterface.StringMessage} StringMessage instance */ - PingPeerRequestMessage.create = function create(properties) { - return new PingPeerRequestMessage(properties); + StringMessage.create = function create(properties) { + return new StringMessage(properties); }; /** - * Encodes the specified PingPeerRequestMessage message. Does not implicitly {@link agentInterface.PingPeerRequestMessage.verify|verify} messages. + * Encodes the specified StringMessage message. Does not implicitly {@link agentInterface.StringMessage.verify|verify} messages. * @function encode - * @memberof agentInterface.PingPeerRequestMessage + * @memberof agentInterface.StringMessage * @static - * @param {agentInterface.IPingPeerRequestMessage} m PingPeerRequestMessage message or plain object to encode + * @param {agentInterface.IStringMessage} m StringMessage message or plain object to encode * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PingPeerRequestMessage.encode = function encode(m, w) { + StringMessage.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); - if (m.timeout != null && Object.hasOwnProperty.call(m, "timeout")) - w.uint32(16).int32(m.timeout); + if (m.s != null && Object.hasOwnProperty.call(m, "s")) + w.uint32(10).string(m.s); return w; }; /** - * Encodes the specified PingPeerRequestMessage message, length delimited. Does not implicitly {@link agentInterface.PingPeerRequestMessage.verify|verify} messages. + * Encodes the specified StringMessage message, length delimited. Does not implicitly {@link agentInterface.StringMessage.verify|verify} messages. * @function encodeDelimited - * @memberof agentInterface.PingPeerRequestMessage + * @memberof agentInterface.StringMessage * @static - * @param {agentInterface.IPingPeerRequestMessage} message PingPeerRequestMessage message or plain object to encode + * @param {agentInterface.IStringMessage} message StringMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PingPeerRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { + StringMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PingPeerRequestMessage message from the specified reader or buffer. + * Decodes a StringMessage message from the specified reader or buffer. * @function decode - * @memberof agentInterface.PingPeerRequestMessage + * @memberof agentInterface.StringMessage * @static * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.PingPeerRequestMessage} PingPeerRequestMessage + * @returns {agentInterface.StringMessage} StringMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PingPeerRequestMessage.decode = function decode(r, l) { + StringMessage.decode = function decode(r, l) { if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.PingPeerRequestMessage(); + var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.StringMessage(); while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { case 1: - m.publicKey = r.string(); - break; - case 2: - m.timeout = r.int32(); + m.s = r.string(); break; default: r.skipType(t & 7); @@ -6857,42 +1453,42 @@ $root.agentInterface = (function() { }; /** - * Decodes a PingPeerRequestMessage message from the specified reader or buffer, length delimited. + * Decodes a StringMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof agentInterface.PingPeerRequestMessage + * @memberof agentInterface.StringMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.PingPeerRequestMessage} PingPeerRequestMessage + * @returns {agentInterface.StringMessage} StringMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PingPeerRequestMessage.decodeDelimited = function decodeDelimited(reader) { + StringMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; - return PingPeerRequestMessage; + return StringMessage; })(); - agentInterface.PingPeerResponseMessage = (function() { + agentInterface.BooleanMessage = (function() { /** - * Properties of a PingPeerResponseMessage. + * Properties of a BooleanMessage. * @memberof agentInterface - * @interface IPingPeerResponseMessage - * @property {boolean|null} [successful] PingPeerResponseMessage successful + * @interface IBooleanMessage + * @property {boolean|null} [b] BooleanMessage b */ /** - * Constructs a new PingPeerResponseMessage. + * Constructs a new BooleanMessage. * @memberof agentInterface - * @classdesc Represents a PingPeerResponseMessage. - * @implements IPingPeerResponseMessage + * @classdesc Represents a BooleanMessage. + * @implements IBooleanMessage * @constructor - * @param {agentInterface.IPingPeerResponseMessage=} [p] Properties to set + * @param {agentInterface.IBooleanMessage=} [p] Properties to set */ - function PingPeerResponseMessage(p) { + function BooleanMessage(p) { if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) @@ -6900,75 +1496,75 @@ $root.agentInterface = (function() { } /** - * PingPeerResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.PingPeerResponseMessage + * BooleanMessage b. + * @member {boolean} b + * @memberof agentInterface.BooleanMessage * @instance */ - PingPeerResponseMessage.prototype.successful = false; + BooleanMessage.prototype.b = false; /** - * Creates a new PingPeerResponseMessage instance using the specified properties. + * Creates a new BooleanMessage instance using the specified properties. * @function create - * @memberof agentInterface.PingPeerResponseMessage + * @memberof agentInterface.BooleanMessage * @static - * @param {agentInterface.IPingPeerResponseMessage=} [properties] Properties to set - * @returns {agentInterface.PingPeerResponseMessage} PingPeerResponseMessage instance + * @param {agentInterface.IBooleanMessage=} [properties] Properties to set + * @returns {agentInterface.BooleanMessage} BooleanMessage instance */ - PingPeerResponseMessage.create = function create(properties) { - return new PingPeerResponseMessage(properties); + BooleanMessage.create = function create(properties) { + return new BooleanMessage(properties); }; /** - * Encodes the specified PingPeerResponseMessage message. Does not implicitly {@link agentInterface.PingPeerResponseMessage.verify|verify} messages. + * Encodes the specified BooleanMessage message. Does not implicitly {@link agentInterface.BooleanMessage.verify|verify} messages. * @function encode - * @memberof agentInterface.PingPeerResponseMessage + * @memberof agentInterface.BooleanMessage * @static - * @param {agentInterface.IPingPeerResponseMessage} m PingPeerResponseMessage message or plain object to encode + * @param {agentInterface.IBooleanMessage} m BooleanMessage message or plain object to encode * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PingPeerResponseMessage.encode = function encode(m, w) { + BooleanMessage.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); + if (m.b != null && Object.hasOwnProperty.call(m, "b")) + w.uint32(8).bool(m.b); return w; }; /** - * Encodes the specified PingPeerResponseMessage message, length delimited. Does not implicitly {@link agentInterface.PingPeerResponseMessage.verify|verify} messages. + * Encodes the specified BooleanMessage message, length delimited. Does not implicitly {@link agentInterface.BooleanMessage.verify|verify} messages. * @function encodeDelimited - * @memberof agentInterface.PingPeerResponseMessage + * @memberof agentInterface.BooleanMessage * @static - * @param {agentInterface.IPingPeerResponseMessage} message PingPeerResponseMessage message or plain object to encode + * @param {agentInterface.IBooleanMessage} message BooleanMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PingPeerResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + BooleanMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PingPeerResponseMessage message from the specified reader or buffer. + * Decodes a BooleanMessage message from the specified reader or buffer. * @function decode - * @memberof agentInterface.PingPeerResponseMessage + * @memberof agentInterface.BooleanMessage * @static * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.PingPeerResponseMessage} PingPeerResponseMessage + * @returns {agentInterface.BooleanMessage} BooleanMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PingPeerResponseMessage.decode = function decode(r, l) { + BooleanMessage.decode = function decode(r, l) { if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.PingPeerResponseMessage(); + var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.BooleanMessage(); while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { case 1: - m.successful = r.bool(); + m.b = r.bool(); break; default: r.skipType(t & 7); @@ -6979,43 +1575,43 @@ $root.agentInterface = (function() { }; /** - * Decodes a PingPeerResponseMessage message from the specified reader or buffer, length delimited. + * Decodes a BooleanMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof agentInterface.PingPeerResponseMessage + * @memberof agentInterface.BooleanMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.PingPeerResponseMessage} PingPeerResponseMessage + * @returns {agentInterface.BooleanMessage} BooleanMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PingPeerResponseMessage.decodeDelimited = function decodeDelimited(reader) { + BooleanMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; - return PingPeerResponseMessage; + return BooleanMessage; })(); - agentInterface.FindPeerRequestMessage = (function() { + agentInterface.StringListMessage = (function() { /** - * Properties of a FindPeerRequestMessage. + * Properties of a StringListMessage. * @memberof agentInterface - * @interface IFindPeerRequestMessage - * @property {string|null} [publicKey] FindPeerRequestMessage publicKey - * @property {number|null} [timeout] FindPeerRequestMessage timeout + * @interface IStringListMessage + * @property {Array.|null} [s] StringListMessage s */ /** - * Constructs a new FindPeerRequestMessage. + * Constructs a new StringListMessage. * @memberof agentInterface - * @classdesc Represents a FindPeerRequestMessage. - * @implements IFindPeerRequestMessage + * @classdesc Represents a StringListMessage. + * @implements IStringListMessage * @constructor - * @param {agentInterface.IFindPeerRequestMessage=} [p] Properties to set + * @param {agentInterface.IStringListMessage=} [p] Properties to set */ - function FindPeerRequestMessage(p) { + function StringListMessage(p) { + this.s = []; if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) @@ -7023,88 +1619,79 @@ $root.agentInterface = (function() { } /** - * FindPeerRequestMessage publicKey. - * @member {string} publicKey - * @memberof agentInterface.FindPeerRequestMessage - * @instance - */ - FindPeerRequestMessage.prototype.publicKey = ""; - - /** - * FindPeerRequestMessage timeout. - * @member {number} timeout - * @memberof agentInterface.FindPeerRequestMessage + * StringListMessage s. + * @member {Array.} s + * @memberof agentInterface.StringListMessage * @instance */ - FindPeerRequestMessage.prototype.timeout = 0; + StringListMessage.prototype.s = $util.emptyArray; /** - * Creates a new FindPeerRequestMessage instance using the specified properties. + * Creates a new StringListMessage instance using the specified properties. * @function create - * @memberof agentInterface.FindPeerRequestMessage + * @memberof agentInterface.StringListMessage * @static - * @param {agentInterface.IFindPeerRequestMessage=} [properties] Properties to set - * @returns {agentInterface.FindPeerRequestMessage} FindPeerRequestMessage instance + * @param {agentInterface.IStringListMessage=} [properties] Properties to set + * @returns {agentInterface.StringListMessage} StringListMessage instance */ - FindPeerRequestMessage.create = function create(properties) { - return new FindPeerRequestMessage(properties); + StringListMessage.create = function create(properties) { + return new StringListMessage(properties); }; /** - * Encodes the specified FindPeerRequestMessage message. Does not implicitly {@link agentInterface.FindPeerRequestMessage.verify|verify} messages. + * Encodes the specified StringListMessage message. Does not implicitly {@link agentInterface.StringListMessage.verify|verify} messages. * @function encode - * @memberof agentInterface.FindPeerRequestMessage + * @memberof agentInterface.StringListMessage * @static - * @param {agentInterface.IFindPeerRequestMessage} m FindPeerRequestMessage message or plain object to encode + * @param {agentInterface.IStringListMessage} m StringListMessage message or plain object to encode * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FindPeerRequestMessage.encode = function encode(m, w) { + StringListMessage.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); - if (m.timeout != null && Object.hasOwnProperty.call(m, "timeout")) - w.uint32(16).int32(m.timeout); + if (m.s != null && m.s.length) { + for (var i = 0; i < m.s.length; ++i) + w.uint32(10).string(m.s[i]); + } return w; }; /** - * Encodes the specified FindPeerRequestMessage message, length delimited. Does not implicitly {@link agentInterface.FindPeerRequestMessage.verify|verify} messages. + * Encodes the specified StringListMessage message, length delimited. Does not implicitly {@link agentInterface.StringListMessage.verify|verify} messages. * @function encodeDelimited - * @memberof agentInterface.FindPeerRequestMessage + * @memberof agentInterface.StringListMessage * @static - * @param {agentInterface.IFindPeerRequestMessage} message FindPeerRequestMessage message or plain object to encode + * @param {agentInterface.IStringListMessage} message StringListMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FindPeerRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { + StringListMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FindPeerRequestMessage message from the specified reader or buffer. + * Decodes a StringListMessage message from the specified reader or buffer. * @function decode - * @memberof agentInterface.FindPeerRequestMessage + * @memberof agentInterface.StringListMessage * @static * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.FindPeerRequestMessage} FindPeerRequestMessage + * @returns {agentInterface.StringListMessage} StringListMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FindPeerRequestMessage.decode = function decode(r, l) { + StringListMessage.decode = function decode(r, l) { if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.FindPeerRequestMessage(); + var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.StringListMessage(); while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { case 1: - m.publicKey = r.string(); - break; - case 2: - m.timeout = r.int32(); + if (!(m.s && m.s.length)) + m.s = []; + m.s.push(r.string()); break; default: r.skipType(t & 7); @@ -7115,42 +1702,45 @@ $root.agentInterface = (function() { }; /** - * Decodes a FindPeerRequestMessage message from the specified reader or buffer, length delimited. + * Decodes a StringListMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof agentInterface.FindPeerRequestMessage + * @memberof agentInterface.StringListMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.FindPeerRequestMessage} FindPeerRequestMessage + * @returns {agentInterface.StringListMessage} StringListMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FindPeerRequestMessage.decodeDelimited = function decodeDelimited(reader) { + StringListMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; - return FindPeerRequestMessage; + return StringListMessage; })(); - agentInterface.FindPeerResponseMessage = (function() { + agentInterface.PeerInfoMessage = (function() { /** - * Properties of a FindPeerResponseMessage. + * Properties of a PeerInfoMessage. * @memberof agentInterface - * @interface IFindPeerResponseMessage - * @property {boolean|null} [successful] FindPeerResponseMessage successful + * @interface IPeerInfoMessage + * @property {string|null} [publicKey] PeerInfoMessage publicKey + * @property {string|null} [relayPublicKey] PeerInfoMessage relayPublicKey + * @property {string|null} [peerAddress] PeerInfoMessage peerAddress + * @property {string|null} [apiAddress] PeerInfoMessage apiAddress */ /** - * Constructs a new FindPeerResponseMessage. + * Constructs a new PeerInfoMessage. * @memberof agentInterface - * @classdesc Represents a FindPeerResponseMessage. - * @implements IFindPeerResponseMessage + * @classdesc Represents a PeerInfoMessage. + * @implements IPeerInfoMessage * @constructor - * @param {agentInterface.IFindPeerResponseMessage=} [p] Properties to set + * @param {agentInterface.IPeerInfoMessage=} [p] Properties to set */ - function FindPeerResponseMessage(p) { + function PeerInfoMessage(p) { if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) @@ -7158,75 +1748,114 @@ $root.agentInterface = (function() { } /** - * FindPeerResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.FindPeerResponseMessage + * PeerInfoMessage publicKey. + * @member {string} publicKey + * @memberof agentInterface.PeerInfoMessage + * @instance + */ + PeerInfoMessage.prototype.publicKey = ""; + + /** + * PeerInfoMessage relayPublicKey. + * @member {string} relayPublicKey + * @memberof agentInterface.PeerInfoMessage + * @instance + */ + PeerInfoMessage.prototype.relayPublicKey = ""; + + /** + * PeerInfoMessage peerAddress. + * @member {string} peerAddress + * @memberof agentInterface.PeerInfoMessage + * @instance + */ + PeerInfoMessage.prototype.peerAddress = ""; + + /** + * PeerInfoMessage apiAddress. + * @member {string} apiAddress + * @memberof agentInterface.PeerInfoMessage * @instance */ - FindPeerResponseMessage.prototype.successful = false; + PeerInfoMessage.prototype.apiAddress = ""; /** - * Creates a new FindPeerResponseMessage instance using the specified properties. + * Creates a new PeerInfoMessage instance using the specified properties. * @function create - * @memberof agentInterface.FindPeerResponseMessage + * @memberof agentInterface.PeerInfoMessage * @static - * @param {agentInterface.IFindPeerResponseMessage=} [properties] Properties to set - * @returns {agentInterface.FindPeerResponseMessage} FindPeerResponseMessage instance + * @param {agentInterface.IPeerInfoMessage=} [properties] Properties to set + * @returns {agentInterface.PeerInfoMessage} PeerInfoMessage instance */ - FindPeerResponseMessage.create = function create(properties) { - return new FindPeerResponseMessage(properties); + PeerInfoMessage.create = function create(properties) { + return new PeerInfoMessage(properties); }; /** - * Encodes the specified FindPeerResponseMessage message. Does not implicitly {@link agentInterface.FindPeerResponseMessage.verify|verify} messages. + * Encodes the specified PeerInfoMessage message. Does not implicitly {@link agentInterface.PeerInfoMessage.verify|verify} messages. * @function encode - * @memberof agentInterface.FindPeerResponseMessage + * @memberof agentInterface.PeerInfoMessage * @static - * @param {agentInterface.IFindPeerResponseMessage} m FindPeerResponseMessage message or plain object to encode + * @param {agentInterface.IPeerInfoMessage} m PeerInfoMessage message or plain object to encode * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FindPeerResponseMessage.encode = function encode(m, w) { + PeerInfoMessage.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); + if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) + w.uint32(10).string(m.publicKey); + if (m.relayPublicKey != null && Object.hasOwnProperty.call(m, "relayPublicKey")) + w.uint32(18).string(m.relayPublicKey); + if (m.peerAddress != null && Object.hasOwnProperty.call(m, "peerAddress")) + w.uint32(26).string(m.peerAddress); + if (m.apiAddress != null && Object.hasOwnProperty.call(m, "apiAddress")) + w.uint32(34).string(m.apiAddress); return w; }; /** - * Encodes the specified FindPeerResponseMessage message, length delimited. Does not implicitly {@link agentInterface.FindPeerResponseMessage.verify|verify} messages. + * Encodes the specified PeerInfoMessage message, length delimited. Does not implicitly {@link agentInterface.PeerInfoMessage.verify|verify} messages. * @function encodeDelimited - * @memberof agentInterface.FindPeerResponseMessage + * @memberof agentInterface.PeerInfoMessage * @static - * @param {agentInterface.IFindPeerResponseMessage} message FindPeerResponseMessage message or plain object to encode + * @param {agentInterface.IPeerInfoMessage} message PeerInfoMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FindPeerResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + PeerInfoMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FindPeerResponseMessage message from the specified reader or buffer. + * Decodes a PeerInfoMessage message from the specified reader or buffer. * @function decode - * @memberof agentInterface.FindPeerResponseMessage + * @memberof agentInterface.PeerInfoMessage * @static * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.FindPeerResponseMessage} FindPeerResponseMessage + * @returns {agentInterface.PeerInfoMessage} PeerInfoMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FindPeerResponseMessage.decode = function decode(r, l) { + PeerInfoMessage.decode = function decode(r, l) { if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.FindPeerResponseMessage(); + var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.PeerInfoMessage(); while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { case 1: - m.successful = r.bool(); + m.publicKey = r.string(); + break; + case 2: + m.relayPublicKey = r.string(); + break; + case 3: + m.peerAddress = r.string(); + break; + case 4: + m.apiAddress = r.string(); break; default: r.skipType(t & 7); @@ -7237,44 +1866,58 @@ $root.agentInterface = (function() { }; /** - * Decodes a FindPeerResponseMessage message from the specified reader or buffer, length delimited. + * Decodes a PeerInfoMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof agentInterface.FindPeerResponseMessage + * @memberof agentInterface.PeerInfoMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.FindPeerResponseMessage} FindPeerResponseMessage + * @returns {agentInterface.PeerInfoMessage} PeerInfoMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FindPeerResponseMessage.decodeDelimited = function decodeDelimited(reader) { + PeerInfoMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; - return FindPeerResponseMessage; + return PeerInfoMessage; + })(); + + /** + * AgentStatusType enum. + * @name agentInterface.AgentStatusType + * @enum {number} + * @property {number} ONLINE=0 ONLINE value + * @property {number} OFFLINE=1 OFFLINE value + * @property {number} ERRORED=2 ERRORED value + */ + agentInterface.AgentStatusType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ONLINE"] = 0; + values[valuesById[1] = "OFFLINE"] = 1; + values[valuesById[2] = "ERRORED"] = 2; + return values; })(); - agentInterface.FindSocialPeerRequestMessage = (function() { + agentInterface.AgentStatusMessage = (function() { /** - * Properties of a FindSocialPeerRequestMessage. + * Properties of an AgentStatusMessage. * @memberof agentInterface - * @interface IFindSocialPeerRequestMessage - * @property {string|null} [handle] FindSocialPeerRequestMessage handle - * @property {string|null} [service] FindSocialPeerRequestMessage service - * @property {number|null} [timeout] FindSocialPeerRequestMessage timeout + * @interface IAgentStatusMessage + * @property {agentInterface.AgentStatusType|null} [status] AgentStatusMessage status */ /** - * Constructs a new FindSocialPeerRequestMessage. + * Constructs a new AgentStatusMessage. * @memberof agentInterface - * @classdesc Represents a FindSocialPeerRequestMessage. - * @implements IFindSocialPeerRequestMessage + * @classdesc Represents an AgentStatusMessage. + * @implements IAgentStatusMessage * @constructor - * @param {agentInterface.IFindSocialPeerRequestMessage=} [p] Properties to set + * @param {agentInterface.IAgentStatusMessage=} [p] Properties to set */ - function FindSocialPeerRequestMessage(p) { + function AgentStatusMessage(p) { if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) @@ -7282,101 +1925,75 @@ $root.agentInterface = (function() { } /** - * FindSocialPeerRequestMessage handle. - * @member {string} handle - * @memberof agentInterface.FindSocialPeerRequestMessage - * @instance - */ - FindSocialPeerRequestMessage.prototype.handle = ""; - - /** - * FindSocialPeerRequestMessage service. - * @member {string} service - * @memberof agentInterface.FindSocialPeerRequestMessage - * @instance - */ - FindSocialPeerRequestMessage.prototype.service = ""; - - /** - * FindSocialPeerRequestMessage timeout. - * @member {number} timeout - * @memberof agentInterface.FindSocialPeerRequestMessage + * AgentStatusMessage status. + * @member {agentInterface.AgentStatusType} status + * @memberof agentInterface.AgentStatusMessage * @instance */ - FindSocialPeerRequestMessage.prototype.timeout = 0; + AgentStatusMessage.prototype.status = 0; /** - * Creates a new FindSocialPeerRequestMessage instance using the specified properties. + * Creates a new AgentStatusMessage instance using the specified properties. * @function create - * @memberof agentInterface.FindSocialPeerRequestMessage + * @memberof agentInterface.AgentStatusMessage * @static - * @param {agentInterface.IFindSocialPeerRequestMessage=} [properties] Properties to set - * @returns {agentInterface.FindSocialPeerRequestMessage} FindSocialPeerRequestMessage instance + * @param {agentInterface.IAgentStatusMessage=} [properties] Properties to set + * @returns {agentInterface.AgentStatusMessage} AgentStatusMessage instance */ - FindSocialPeerRequestMessage.create = function create(properties) { - return new FindSocialPeerRequestMessage(properties); + AgentStatusMessage.create = function create(properties) { + return new AgentStatusMessage(properties); }; /** - * Encodes the specified FindSocialPeerRequestMessage message. Does not implicitly {@link agentInterface.FindSocialPeerRequestMessage.verify|verify} messages. + * Encodes the specified AgentStatusMessage message. Does not implicitly {@link agentInterface.AgentStatusMessage.verify|verify} messages. * @function encode - * @memberof agentInterface.FindSocialPeerRequestMessage + * @memberof agentInterface.AgentStatusMessage * @static - * @param {agentInterface.IFindSocialPeerRequestMessage} m FindSocialPeerRequestMessage message or plain object to encode + * @param {agentInterface.IAgentStatusMessage} m AgentStatusMessage message or plain object to encode * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FindSocialPeerRequestMessage.encode = function encode(m, w) { + AgentStatusMessage.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.handle != null && Object.hasOwnProperty.call(m, "handle")) - w.uint32(10).string(m.handle); - if (m.service != null && Object.hasOwnProperty.call(m, "service")) - w.uint32(18).string(m.service); - if (m.timeout != null && Object.hasOwnProperty.call(m, "timeout")) - w.uint32(24).int32(m.timeout); + if (m.status != null && Object.hasOwnProperty.call(m, "status")) + w.uint32(8).int32(m.status); return w; }; /** - * Encodes the specified FindSocialPeerRequestMessage message, length delimited. Does not implicitly {@link agentInterface.FindSocialPeerRequestMessage.verify|verify} messages. + * Encodes the specified AgentStatusMessage message, length delimited. Does not implicitly {@link agentInterface.AgentStatusMessage.verify|verify} messages. * @function encodeDelimited - * @memberof agentInterface.FindSocialPeerRequestMessage + * @memberof agentInterface.AgentStatusMessage * @static - * @param {agentInterface.IFindSocialPeerRequestMessage} message FindSocialPeerRequestMessage message or plain object to encode + * @param {agentInterface.IAgentStatusMessage} message AgentStatusMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FindSocialPeerRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { + AgentStatusMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FindSocialPeerRequestMessage message from the specified reader or buffer. + * Decodes an AgentStatusMessage message from the specified reader or buffer. * @function decode - * @memberof agentInterface.FindSocialPeerRequestMessage + * @memberof agentInterface.AgentStatusMessage * @static * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.FindSocialPeerRequestMessage} FindSocialPeerRequestMessage + * @returns {agentInterface.AgentStatusMessage} AgentStatusMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FindSocialPeerRequestMessage.decode = function decode(r, l) { + AgentStatusMessage.decode = function decode(r, l) { if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.FindSocialPeerRequestMessage(); + var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.AgentStatusMessage(); while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { case 1: - m.handle = r.string(); - break; - case 2: - m.service = r.string(); - break; - case 3: - m.timeout = r.int32(); + m.status = r.int32(); break; default: r.skipType(t & 7); @@ -7387,42 +2004,44 @@ $root.agentInterface = (function() { }; /** - * Decodes a FindSocialPeerRequestMessage message from the specified reader or buffer, length delimited. + * Decodes an AgentStatusMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof agentInterface.FindSocialPeerRequestMessage + * @memberof agentInterface.AgentStatusMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.FindSocialPeerRequestMessage} FindSocialPeerRequestMessage + * @returns {agentInterface.AgentStatusMessage} AgentStatusMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FindSocialPeerRequestMessage.decodeDelimited = function decodeDelimited(reader) { + AgentStatusMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; - return FindSocialPeerRequestMessage; + return AgentStatusMessage; })(); - agentInterface.FindSocialPeerResponseMessage = (function() { + agentInterface.NewNodeMessage = (function() { /** - * Properties of a FindSocialPeerResponseMessage. + * Properties of a NewNodeMessage. * @memberof agentInterface - * @interface IFindSocialPeerResponseMessage - * @property {boolean|null} [successful] FindSocialPeerResponseMessage successful + * @interface INewNodeMessage + * @property {string|null} [userId] NewNodeMessage userId + * @property {string|null} [passphrase] NewNodeMessage passphrase + * @property {number|null} [nbits] NewNodeMessage nbits */ /** - * Constructs a new FindSocialPeerResponseMessage. + * Constructs a new NewNodeMessage. * @memberof agentInterface - * @classdesc Represents a FindSocialPeerResponseMessage. - * @implements IFindSocialPeerResponseMessage + * @classdesc Represents a NewNodeMessage. + * @implements INewNodeMessage * @constructor - * @param {agentInterface.IFindSocialPeerResponseMessage=} [p] Properties to set + * @param {agentInterface.INewNodeMessage=} [p] Properties to set */ - function FindSocialPeerResponseMessage(p) { + function NewNodeMessage(p) { if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) @@ -7430,75 +2049,101 @@ $root.agentInterface = (function() { } /** - * FindSocialPeerResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.FindSocialPeerResponseMessage + * NewNodeMessage userId. + * @member {string} userId + * @memberof agentInterface.NewNodeMessage + * @instance + */ + NewNodeMessage.prototype.userId = ""; + + /** + * NewNodeMessage passphrase. + * @member {string} passphrase + * @memberof agentInterface.NewNodeMessage + * @instance + */ + NewNodeMessage.prototype.passphrase = ""; + + /** + * NewNodeMessage nbits. + * @member {number} nbits + * @memberof agentInterface.NewNodeMessage * @instance */ - FindSocialPeerResponseMessage.prototype.successful = false; + NewNodeMessage.prototype.nbits = 0; /** - * Creates a new FindSocialPeerResponseMessage instance using the specified properties. + * Creates a new NewNodeMessage instance using the specified properties. * @function create - * @memberof agentInterface.FindSocialPeerResponseMessage + * @memberof agentInterface.NewNodeMessage * @static - * @param {agentInterface.IFindSocialPeerResponseMessage=} [properties] Properties to set - * @returns {agentInterface.FindSocialPeerResponseMessage} FindSocialPeerResponseMessage instance + * @param {agentInterface.INewNodeMessage=} [properties] Properties to set + * @returns {agentInterface.NewNodeMessage} NewNodeMessage instance */ - FindSocialPeerResponseMessage.create = function create(properties) { - return new FindSocialPeerResponseMessage(properties); + NewNodeMessage.create = function create(properties) { + return new NewNodeMessage(properties); }; /** - * Encodes the specified FindSocialPeerResponseMessage message. Does not implicitly {@link agentInterface.FindSocialPeerResponseMessage.verify|verify} messages. + * Encodes the specified NewNodeMessage message. Does not implicitly {@link agentInterface.NewNodeMessage.verify|verify} messages. * @function encode - * @memberof agentInterface.FindSocialPeerResponseMessage + * @memberof agentInterface.NewNodeMessage * @static - * @param {agentInterface.IFindSocialPeerResponseMessage} m FindSocialPeerResponseMessage message or plain object to encode + * @param {agentInterface.INewNodeMessage} m NewNodeMessage message or plain object to encode * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FindSocialPeerResponseMessage.encode = function encode(m, w) { + NewNodeMessage.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); + if (m.userId != null && Object.hasOwnProperty.call(m, "userId")) + w.uint32(10).string(m.userId); + if (m.passphrase != null && Object.hasOwnProperty.call(m, "passphrase")) + w.uint32(18).string(m.passphrase); + if (m.nbits != null && Object.hasOwnProperty.call(m, "nbits")) + w.uint32(24).int32(m.nbits); return w; }; /** - * Encodes the specified FindSocialPeerResponseMessage message, length delimited. Does not implicitly {@link agentInterface.FindSocialPeerResponseMessage.verify|verify} messages. + * Encodes the specified NewNodeMessage message, length delimited. Does not implicitly {@link agentInterface.NewNodeMessage.verify|verify} messages. * @function encodeDelimited - * @memberof agentInterface.FindSocialPeerResponseMessage + * @memberof agentInterface.NewNodeMessage * @static - * @param {agentInterface.IFindSocialPeerResponseMessage} message FindSocialPeerResponseMessage message or plain object to encode + * @param {agentInterface.INewNodeMessage} message NewNodeMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FindSocialPeerResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + NewNodeMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FindSocialPeerResponseMessage message from the specified reader or buffer. + * Decodes a NewNodeMessage message from the specified reader or buffer. * @function decode - * @memberof agentInterface.FindSocialPeerResponseMessage + * @memberof agentInterface.NewNodeMessage * @static * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.FindSocialPeerResponseMessage} FindSocialPeerResponseMessage + * @returns {agentInterface.NewNodeMessage} NewNodeMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FindSocialPeerResponseMessage.decode = function decode(r, l) { + NewNodeMessage.decode = function decode(r, l) { if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.FindSocialPeerResponseMessage(); + var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.NewNodeMessage(); while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { case 1: - m.successful = r.bool(); + m.userId = r.string(); + break; + case 2: + m.passphrase = r.string(); + break; + case 3: + m.nbits = r.int32(); break; default: r.skipType(t & 7); @@ -7509,41 +2154,44 @@ $root.agentInterface = (function() { }; /** - * Decodes a FindSocialPeerResponseMessage message from the specified reader or buffer, length delimited. + * Decodes a NewNodeMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof agentInterface.FindSocialPeerResponseMessage + * @memberof agentInterface.NewNodeMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.FindSocialPeerResponseMessage} FindSocialPeerResponseMessage + * @returns {agentInterface.NewNodeMessage} NewNodeMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FindSocialPeerResponseMessage.decodeDelimited = function decodeDelimited(reader) { + NewNodeMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; - return FindSocialPeerResponseMessage; + return NewNodeMessage; })(); - agentInterface.ListPeersRequestMessage = (function() { + agentInterface.DeriveKeyMessage = (function() { /** - * Properties of a ListPeersRequestMessage. + * Properties of a DeriveKeyMessage. * @memberof agentInterface - * @interface IListPeersRequestMessage + * @interface IDeriveKeyMessage + * @property {string|null} [vaultName] DeriveKeyMessage vaultName + * @property {string|null} [keyName] DeriveKeyMessage keyName + * @property {string|null} [passphrase] DeriveKeyMessage passphrase */ /** - * Constructs a new ListPeersRequestMessage. + * Constructs a new DeriveKeyMessage. * @memberof agentInterface - * @classdesc Represents a ListPeersRequestMessage. - * @implements IListPeersRequestMessage + * @classdesc Represents a DeriveKeyMessage. + * @implements IDeriveKeyMessage * @constructor - * @param {agentInterface.IListPeersRequestMessage=} [p] Properties to set + * @param {agentInterface.IDeriveKeyMessage=} [p] Properties to set */ - function ListPeersRequestMessage(p) { + function DeriveKeyMessage(p) { if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) @@ -7551,63 +2199,102 @@ $root.agentInterface = (function() { } /** - * Creates a new ListPeersRequestMessage instance using the specified properties. + * DeriveKeyMessage vaultName. + * @member {string} vaultName + * @memberof agentInterface.DeriveKeyMessage + * @instance + */ + DeriveKeyMessage.prototype.vaultName = ""; + + /** + * DeriveKeyMessage keyName. + * @member {string} keyName + * @memberof agentInterface.DeriveKeyMessage + * @instance + */ + DeriveKeyMessage.prototype.keyName = ""; + + /** + * DeriveKeyMessage passphrase. + * @member {string} passphrase + * @memberof agentInterface.DeriveKeyMessage + * @instance + */ + DeriveKeyMessage.prototype.passphrase = ""; + + /** + * Creates a new DeriveKeyMessage instance using the specified properties. * @function create - * @memberof agentInterface.ListPeersRequestMessage + * @memberof agentInterface.DeriveKeyMessage * @static - * @param {agentInterface.IListPeersRequestMessage=} [properties] Properties to set - * @returns {agentInterface.ListPeersRequestMessage} ListPeersRequestMessage instance + * @param {agentInterface.IDeriveKeyMessage=} [properties] Properties to set + * @returns {agentInterface.DeriveKeyMessage} DeriveKeyMessage instance */ - ListPeersRequestMessage.create = function create(properties) { - return new ListPeersRequestMessage(properties); + DeriveKeyMessage.create = function create(properties) { + return new DeriveKeyMessage(properties); }; /** - * Encodes the specified ListPeersRequestMessage message. Does not implicitly {@link agentInterface.ListPeersRequestMessage.verify|verify} messages. + * Encodes the specified DeriveKeyMessage message. Does not implicitly {@link agentInterface.DeriveKeyMessage.verify|verify} messages. * @function encode - * @memberof agentInterface.ListPeersRequestMessage + * @memberof agentInterface.DeriveKeyMessage * @static - * @param {agentInterface.IListPeersRequestMessage} m ListPeersRequestMessage message or plain object to encode + * @param {agentInterface.IDeriveKeyMessage} m DeriveKeyMessage message or plain object to encode * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPeersRequestMessage.encode = function encode(m, w) { + DeriveKeyMessage.encode = function encode(m, w) { if (!w) w = $Writer.create(); + if (m.vaultName != null && Object.hasOwnProperty.call(m, "vaultName")) + w.uint32(10).string(m.vaultName); + if (m.keyName != null && Object.hasOwnProperty.call(m, "keyName")) + w.uint32(18).string(m.keyName); + if (m.passphrase != null && Object.hasOwnProperty.call(m, "passphrase")) + w.uint32(26).string(m.passphrase); return w; }; /** - * Encodes the specified ListPeersRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ListPeersRequestMessage.verify|verify} messages. + * Encodes the specified DeriveKeyMessage message, length delimited. Does not implicitly {@link agentInterface.DeriveKeyMessage.verify|verify} messages. * @function encodeDelimited - * @memberof agentInterface.ListPeersRequestMessage + * @memberof agentInterface.DeriveKeyMessage * @static - * @param {agentInterface.IListPeersRequestMessage} message ListPeersRequestMessage message or plain object to encode + * @param {agentInterface.IDeriveKeyMessage} message DeriveKeyMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPeersRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { + DeriveKeyMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListPeersRequestMessage message from the specified reader or buffer. + * Decodes a DeriveKeyMessage message from the specified reader or buffer. * @function decode - * @memberof agentInterface.ListPeersRequestMessage + * @memberof agentInterface.DeriveKeyMessage * @static * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ListPeersRequestMessage} ListPeersRequestMessage + * @returns {agentInterface.DeriveKeyMessage} DeriveKeyMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPeersRequestMessage.decode = function decode(r, l) { + DeriveKeyMessage.decode = function decode(r, l) { if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListPeersRequestMessage(); + var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DeriveKeyMessage(); while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { + case 1: + m.vaultName = r.string(); + break; + case 2: + m.keyName = r.string(); + break; + case 3: + m.passphrase = r.string(); + break; default: r.skipType(t & 7); break; @@ -7617,43 +2304,44 @@ $root.agentInterface = (function() { }; /** - * Decodes a ListPeersRequestMessage message from the specified reader or buffer, length delimited. + * Decodes a DeriveKeyMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof agentInterface.ListPeersRequestMessage + * @memberof agentInterface.DeriveKeyMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ListPeersRequestMessage} ListPeersRequestMessage + * @returns {agentInterface.DeriveKeyMessage} DeriveKeyMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPeersRequestMessage.decodeDelimited = function decodeDelimited(reader) { + DeriveKeyMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; - return ListPeersRequestMessage; + return DeriveKeyMessage; })(); - agentInterface.ListPeersResponseMessage = (function() { + agentInterface.SignFileMessage = (function() { /** - * Properties of a ListPeersResponseMessage. + * Properties of a SignFileMessage. * @memberof agentInterface - * @interface IListPeersResponseMessage - * @property {Array.|null} [publicKeys] ListPeersResponseMessage publicKeys + * @interface ISignFileMessage + * @property {string|null} [filePath] SignFileMessage filePath + * @property {string|null} [privateKeyPath] SignFileMessage privateKeyPath + * @property {string|null} [passphrase] SignFileMessage passphrase */ /** - * Constructs a new ListPeersResponseMessage. + * Constructs a new SignFileMessage. * @memberof agentInterface - * @classdesc Represents a ListPeersResponseMessage. - * @implements IListPeersResponseMessage + * @classdesc Represents a SignFileMessage. + * @implements ISignFileMessage * @constructor - * @param {agentInterface.IListPeersResponseMessage=} [p] Properties to set + * @param {agentInterface.ISignFileMessage=} [p] Properties to set */ - function ListPeersResponseMessage(p) { - this.publicKeys = []; + function SignFileMessage(p) { if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) @@ -7661,79 +2349,101 @@ $root.agentInterface = (function() { } /** - * ListPeersResponseMessage publicKeys. - * @member {Array.} publicKeys - * @memberof agentInterface.ListPeersResponseMessage + * SignFileMessage filePath. + * @member {string} filePath + * @memberof agentInterface.SignFileMessage + * @instance + */ + SignFileMessage.prototype.filePath = ""; + + /** + * SignFileMessage privateKeyPath. + * @member {string} privateKeyPath + * @memberof agentInterface.SignFileMessage + * @instance + */ + SignFileMessage.prototype.privateKeyPath = ""; + + /** + * SignFileMessage passphrase. + * @member {string} passphrase + * @memberof agentInterface.SignFileMessage * @instance */ - ListPeersResponseMessage.prototype.publicKeys = $util.emptyArray; + SignFileMessage.prototype.passphrase = ""; /** - * Creates a new ListPeersResponseMessage instance using the specified properties. + * Creates a new SignFileMessage instance using the specified properties. * @function create - * @memberof agentInterface.ListPeersResponseMessage + * @memberof agentInterface.SignFileMessage * @static - * @param {agentInterface.IListPeersResponseMessage=} [properties] Properties to set - * @returns {agentInterface.ListPeersResponseMessage} ListPeersResponseMessage instance + * @param {agentInterface.ISignFileMessage=} [properties] Properties to set + * @returns {agentInterface.SignFileMessage} SignFileMessage instance */ - ListPeersResponseMessage.create = function create(properties) { - return new ListPeersResponseMessage(properties); + SignFileMessage.create = function create(properties) { + return new SignFileMessage(properties); }; /** - * Encodes the specified ListPeersResponseMessage message. Does not implicitly {@link agentInterface.ListPeersResponseMessage.verify|verify} messages. + * Encodes the specified SignFileMessage message. Does not implicitly {@link agentInterface.SignFileMessage.verify|verify} messages. * @function encode - * @memberof agentInterface.ListPeersResponseMessage + * @memberof agentInterface.SignFileMessage * @static - * @param {agentInterface.IListPeersResponseMessage} m ListPeersResponseMessage message or plain object to encode + * @param {agentInterface.ISignFileMessage} m SignFileMessage message or plain object to encode * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPeersResponseMessage.encode = function encode(m, w) { + SignFileMessage.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.publicKeys != null && m.publicKeys.length) { - for (var i = 0; i < m.publicKeys.length; ++i) - w.uint32(10).string(m.publicKeys[i]); - } + if (m.filePath != null && Object.hasOwnProperty.call(m, "filePath")) + w.uint32(10).string(m.filePath); + if (m.privateKeyPath != null && Object.hasOwnProperty.call(m, "privateKeyPath")) + w.uint32(18).string(m.privateKeyPath); + if (m.passphrase != null && Object.hasOwnProperty.call(m, "passphrase")) + w.uint32(26).string(m.passphrase); return w; }; /** - * Encodes the specified ListPeersResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ListPeersResponseMessage.verify|verify} messages. + * Encodes the specified SignFileMessage message, length delimited. Does not implicitly {@link agentInterface.SignFileMessage.verify|verify} messages. * @function encodeDelimited - * @memberof agentInterface.ListPeersResponseMessage + * @memberof agentInterface.SignFileMessage * @static - * @param {agentInterface.IListPeersResponseMessage} message ListPeersResponseMessage message or plain object to encode + * @param {agentInterface.ISignFileMessage} message SignFileMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPeersResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + SignFileMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListPeersResponseMessage message from the specified reader or buffer. + * Decodes a SignFileMessage message from the specified reader or buffer. * @function decode - * @memberof agentInterface.ListPeersResponseMessage + * @memberof agentInterface.SignFileMessage * @static * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ListPeersResponseMessage} ListPeersResponseMessage + * @returns {agentInterface.SignFileMessage} SignFileMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPeersResponseMessage.decode = function decode(r, l) { + SignFileMessage.decode = function decode(r, l) { if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ListPeersResponseMessage(); + var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.SignFileMessage(); while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { case 1: - if (!(m.publicKeys && m.publicKeys.length)) - m.publicKeys = []; - m.publicKeys.push(r.string()); + m.filePath = r.string(); + break; + case 2: + m.privateKeyPath = r.string(); + break; + case 3: + m.passphrase = r.string(); break; default: r.skipType(t & 7); @@ -7744,42 +2454,43 @@ $root.agentInterface = (function() { }; /** - * Decodes a ListPeersResponseMessage message from the specified reader or buffer, length delimited. + * Decodes a SignFileMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof agentInterface.ListPeersResponseMessage + * @memberof agentInterface.SignFileMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ListPeersResponseMessage} ListPeersResponseMessage + * @returns {agentInterface.SignFileMessage} SignFileMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPeersResponseMessage.decodeDelimited = function decodeDelimited(reader) { + SignFileMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; - return ListPeersResponseMessage; + return SignFileMessage; })(); - agentInterface.ToggleStealthRequestMessage = (function() { + agentInterface.VerifyFileMessage = (function() { /** - * Properties of a ToggleStealthRequestMessage. + * Properties of a VerifyFileMessage. * @memberof agentInterface - * @interface IToggleStealthRequestMessage - * @property {boolean|null} [active] ToggleStealthRequestMessage active + * @interface IVerifyFileMessage + * @property {string|null} [filePath] VerifyFileMessage filePath + * @property {string|null} [publicKeyPath] VerifyFileMessage publicKeyPath */ /** - * Constructs a new ToggleStealthRequestMessage. + * Constructs a new VerifyFileMessage. * @memberof agentInterface - * @classdesc Represents a ToggleStealthRequestMessage. - * @implements IToggleStealthRequestMessage + * @classdesc Represents a VerifyFileMessage. + * @implements IVerifyFileMessage * @constructor - * @param {agentInterface.IToggleStealthRequestMessage=} [p] Properties to set + * @param {agentInterface.IVerifyFileMessage=} [p] Properties to set */ - function ToggleStealthRequestMessage(p) { + function VerifyFileMessage(p) { if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) @@ -7787,75 +2498,88 @@ $root.agentInterface = (function() { } /** - * ToggleStealthRequestMessage active. - * @member {boolean} active - * @memberof agentInterface.ToggleStealthRequestMessage + * VerifyFileMessage filePath. + * @member {string} filePath + * @memberof agentInterface.VerifyFileMessage + * @instance + */ + VerifyFileMessage.prototype.filePath = ""; + + /** + * VerifyFileMessage publicKeyPath. + * @member {string} publicKeyPath + * @memberof agentInterface.VerifyFileMessage * @instance */ - ToggleStealthRequestMessage.prototype.active = false; + VerifyFileMessage.prototype.publicKeyPath = ""; /** - * Creates a new ToggleStealthRequestMessage instance using the specified properties. + * Creates a new VerifyFileMessage instance using the specified properties. * @function create - * @memberof agentInterface.ToggleStealthRequestMessage + * @memberof agentInterface.VerifyFileMessage * @static - * @param {agentInterface.IToggleStealthRequestMessage=} [properties] Properties to set - * @returns {agentInterface.ToggleStealthRequestMessage} ToggleStealthRequestMessage instance + * @param {agentInterface.IVerifyFileMessage=} [properties] Properties to set + * @returns {agentInterface.VerifyFileMessage} VerifyFileMessage instance */ - ToggleStealthRequestMessage.create = function create(properties) { - return new ToggleStealthRequestMessage(properties); + VerifyFileMessage.create = function create(properties) { + return new VerifyFileMessage(properties); }; /** - * Encodes the specified ToggleStealthRequestMessage message. Does not implicitly {@link agentInterface.ToggleStealthRequestMessage.verify|verify} messages. + * Encodes the specified VerifyFileMessage message. Does not implicitly {@link agentInterface.VerifyFileMessage.verify|verify} messages. * @function encode - * @memberof agentInterface.ToggleStealthRequestMessage + * @memberof agentInterface.VerifyFileMessage * @static - * @param {agentInterface.IToggleStealthRequestMessage} m ToggleStealthRequestMessage message or plain object to encode + * @param {agentInterface.IVerifyFileMessage} m VerifyFileMessage message or plain object to encode * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ToggleStealthRequestMessage.encode = function encode(m, w) { + VerifyFileMessage.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.active != null && Object.hasOwnProperty.call(m, "active")) - w.uint32(8).bool(m.active); + if (m.filePath != null && Object.hasOwnProperty.call(m, "filePath")) + w.uint32(10).string(m.filePath); + if (m.publicKeyPath != null && Object.hasOwnProperty.call(m, "publicKeyPath")) + w.uint32(18).string(m.publicKeyPath); return w; }; /** - * Encodes the specified ToggleStealthRequestMessage message, length delimited. Does not implicitly {@link agentInterface.ToggleStealthRequestMessage.verify|verify} messages. + * Encodes the specified VerifyFileMessage message, length delimited. Does not implicitly {@link agentInterface.VerifyFileMessage.verify|verify} messages. * @function encodeDelimited - * @memberof agentInterface.ToggleStealthRequestMessage + * @memberof agentInterface.VerifyFileMessage * @static - * @param {agentInterface.IToggleStealthRequestMessage} message ToggleStealthRequestMessage message or plain object to encode + * @param {agentInterface.IVerifyFileMessage} message VerifyFileMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ToggleStealthRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { + VerifyFileMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ToggleStealthRequestMessage message from the specified reader or buffer. + * Decodes a VerifyFileMessage message from the specified reader or buffer. * @function decode - * @memberof agentInterface.ToggleStealthRequestMessage + * @memberof agentInterface.VerifyFileMessage * @static * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ToggleStealthRequestMessage} ToggleStealthRequestMessage + * @returns {agentInterface.VerifyFileMessage} VerifyFileMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ToggleStealthRequestMessage.decode = function decode(r, l) { + VerifyFileMessage.decode = function decode(r, l) { if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ToggleStealthRequestMessage(); + var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.VerifyFileMessage(); while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { case 1: - m.active = r.bool(); + m.filePath = r.string(); + break; + case 2: + m.publicKeyPath = r.string(); break; default: r.skipType(t & 7); @@ -7866,42 +2590,43 @@ $root.agentInterface = (function() { }; /** - * Decodes a ToggleStealthRequestMessage message from the specified reader or buffer, length delimited. + * Decodes a VerifyFileMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof agentInterface.ToggleStealthRequestMessage + * @memberof agentInterface.VerifyFileMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ToggleStealthRequestMessage} ToggleStealthRequestMessage + * @returns {agentInterface.VerifyFileMessage} VerifyFileMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ToggleStealthRequestMessage.decodeDelimited = function decodeDelimited(reader) { + VerifyFileMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; - return ToggleStealthRequestMessage; + return VerifyFileMessage; })(); - agentInterface.ToggleStealthResponseMessage = (function() { + agentInterface.SecretPathMessage = (function() { /** - * Properties of a ToggleStealthResponseMessage. + * Properties of a SecretPathMessage. * @memberof agentInterface - * @interface IToggleStealthResponseMessage - * @property {boolean|null} [successful] ToggleStealthResponseMessage successful + * @interface ISecretPathMessage + * @property {string|null} [vaultName] SecretPathMessage vaultName + * @property {string|null} [secretName] SecretPathMessage secretName */ /** - * Constructs a new ToggleStealthResponseMessage. + * Constructs a new SecretPathMessage. * @memberof agentInterface - * @classdesc Represents a ToggleStealthResponseMessage. - * @implements IToggleStealthResponseMessage + * @classdesc Represents a SecretPathMessage. + * @implements ISecretPathMessage * @constructor - * @param {agentInterface.IToggleStealthResponseMessage=} [p] Properties to set + * @param {agentInterface.ISecretPathMessage=} [p] Properties to set */ - function ToggleStealthResponseMessage(p) { + function SecretPathMessage(p) { if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) @@ -7909,75 +2634,88 @@ $root.agentInterface = (function() { } /** - * ToggleStealthResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.ToggleStealthResponseMessage + * SecretPathMessage vaultName. + * @member {string} vaultName + * @memberof agentInterface.SecretPathMessage + * @instance + */ + SecretPathMessage.prototype.vaultName = ""; + + /** + * SecretPathMessage secretName. + * @member {string} secretName + * @memberof agentInterface.SecretPathMessage * @instance */ - ToggleStealthResponseMessage.prototype.successful = false; + SecretPathMessage.prototype.secretName = ""; /** - * Creates a new ToggleStealthResponseMessage instance using the specified properties. + * Creates a new SecretPathMessage instance using the specified properties. * @function create - * @memberof agentInterface.ToggleStealthResponseMessage + * @memberof agentInterface.SecretPathMessage * @static - * @param {agentInterface.IToggleStealthResponseMessage=} [properties] Properties to set - * @returns {agentInterface.ToggleStealthResponseMessage} ToggleStealthResponseMessage instance + * @param {agentInterface.ISecretPathMessage=} [properties] Properties to set + * @returns {agentInterface.SecretPathMessage} SecretPathMessage instance */ - ToggleStealthResponseMessage.create = function create(properties) { - return new ToggleStealthResponseMessage(properties); + SecretPathMessage.create = function create(properties) { + return new SecretPathMessage(properties); }; /** - * Encodes the specified ToggleStealthResponseMessage message. Does not implicitly {@link agentInterface.ToggleStealthResponseMessage.verify|verify} messages. + * Encodes the specified SecretPathMessage message. Does not implicitly {@link agentInterface.SecretPathMessage.verify|verify} messages. * @function encode - * @memberof agentInterface.ToggleStealthResponseMessage + * @memberof agentInterface.SecretPathMessage * @static - * @param {agentInterface.IToggleStealthResponseMessage} m ToggleStealthResponseMessage message or plain object to encode + * @param {agentInterface.ISecretPathMessage} m SecretPathMessage message or plain object to encode * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ToggleStealthResponseMessage.encode = function encode(m, w) { + SecretPathMessage.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); + if (m.vaultName != null && Object.hasOwnProperty.call(m, "vaultName")) + w.uint32(10).string(m.vaultName); + if (m.secretName != null && Object.hasOwnProperty.call(m, "secretName")) + w.uint32(18).string(m.secretName); return w; }; /** - * Encodes the specified ToggleStealthResponseMessage message, length delimited. Does not implicitly {@link agentInterface.ToggleStealthResponseMessage.verify|verify} messages. + * Encodes the specified SecretPathMessage message, length delimited. Does not implicitly {@link agentInterface.SecretPathMessage.verify|verify} messages. * @function encodeDelimited - * @memberof agentInterface.ToggleStealthResponseMessage + * @memberof agentInterface.SecretPathMessage * @static - * @param {agentInterface.IToggleStealthResponseMessage} message ToggleStealthResponseMessage message or plain object to encode + * @param {agentInterface.ISecretPathMessage} message SecretPathMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ToggleStealthResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + SecretPathMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ToggleStealthResponseMessage message from the specified reader or buffer. + * Decodes a SecretPathMessage message from the specified reader or buffer. * @function decode - * @memberof agentInterface.ToggleStealthResponseMessage + * @memberof agentInterface.SecretPathMessage * @static * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.ToggleStealthResponseMessage} ToggleStealthResponseMessage + * @returns {agentInterface.SecretPathMessage} SecretPathMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ToggleStealthResponseMessage.decode = function decode(r, l) { + SecretPathMessage.decode = function decode(r, l) { if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ToggleStealthResponseMessage(); + var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.SecretPathMessage(); while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { case 1: - m.successful = r.bool(); + m.vaultName = r.string(); + break; + case 2: + m.secretName = r.string(); break; default: r.skipType(t & 7); @@ -7988,46 +2726,44 @@ $root.agentInterface = (function() { }; /** - * Decodes a ToggleStealthResponseMessage message from the specified reader or buffer, length delimited. + * Decodes a SecretPathMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof agentInterface.ToggleStealthResponseMessage + * @memberof agentInterface.SecretPathMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.ToggleStealthResponseMessage} ToggleStealthResponseMessage + * @returns {agentInterface.SecretPathMessage} SecretPathMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ToggleStealthResponseMessage.decodeDelimited = function decodeDelimited(reader) { + SecretPathMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; - return ToggleStealthResponseMessage; + return SecretPathMessage; })(); - agentInterface.UpdatePeerInfoRequestMessage = (function() { + agentInterface.SecretContentMessage = (function() { /** - * Properties of an UpdatePeerInfoRequestMessage. + * Properties of a SecretContentMessage. * @memberof agentInterface - * @interface IUpdatePeerInfoRequestMessage - * @property {string|null} [publicKey] UpdatePeerInfoRequestMessage publicKey - * @property {boolean|null} [currentNode] UpdatePeerInfoRequestMessage currentNode - * @property {string|null} [peerHost] UpdatePeerInfoRequestMessage peerHost - * @property {number|null} [peerPort] UpdatePeerInfoRequestMessage peerPort - * @property {string|null} [relayPublicKey] UpdatePeerInfoRequestMessage relayPublicKey + * @interface ISecretContentMessage + * @property {agentInterface.ISecretPathMessage|null} [secretPath] SecretContentMessage secretPath + * @property {string|null} [secretFilePath] SecretContentMessage secretFilePath + * @property {string|null} [secretContent] SecretContentMessage secretContent */ /** - * Constructs a new UpdatePeerInfoRequestMessage. + * Constructs a new SecretContentMessage. * @memberof agentInterface - * @classdesc Represents an UpdatePeerInfoRequestMessage. - * @implements IUpdatePeerInfoRequestMessage + * @classdesc Represents a SecretContentMessage. + * @implements ISecretContentMessage * @constructor - * @param {agentInterface.IUpdatePeerInfoRequestMessage=} [p] Properties to set + * @param {agentInterface.ISecretContentMessage=} [p] Properties to set */ - function UpdatePeerInfoRequestMessage(p) { + function SecretContentMessage(p) { if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) @@ -8035,127 +2771,101 @@ $root.agentInterface = (function() { } /** - * UpdatePeerInfoRequestMessage publicKey. - * @member {string} publicKey - * @memberof agentInterface.UpdatePeerInfoRequestMessage - * @instance - */ - UpdatePeerInfoRequestMessage.prototype.publicKey = ""; - - /** - * UpdatePeerInfoRequestMessage currentNode. - * @member {boolean} currentNode - * @memberof agentInterface.UpdatePeerInfoRequestMessage - * @instance - */ - UpdatePeerInfoRequestMessage.prototype.currentNode = false; - - /** - * UpdatePeerInfoRequestMessage peerHost. - * @member {string} peerHost - * @memberof agentInterface.UpdatePeerInfoRequestMessage + * SecretContentMessage secretPath. + * @member {agentInterface.ISecretPathMessage|null|undefined} secretPath + * @memberof agentInterface.SecretContentMessage * @instance */ - UpdatePeerInfoRequestMessage.prototype.peerHost = ""; + SecretContentMessage.prototype.secretPath = null; /** - * UpdatePeerInfoRequestMessage peerPort. - * @member {number} peerPort - * @memberof agentInterface.UpdatePeerInfoRequestMessage + * SecretContentMessage secretFilePath. + * @member {string} secretFilePath + * @memberof agentInterface.SecretContentMessage * @instance */ - UpdatePeerInfoRequestMessage.prototype.peerPort = 0; + SecretContentMessage.prototype.secretFilePath = ""; /** - * UpdatePeerInfoRequestMessage relayPublicKey. - * @member {string} relayPublicKey - * @memberof agentInterface.UpdatePeerInfoRequestMessage + * SecretContentMessage secretContent. + * @member {string} secretContent + * @memberof agentInterface.SecretContentMessage * @instance */ - UpdatePeerInfoRequestMessage.prototype.relayPublicKey = ""; + SecretContentMessage.prototype.secretContent = ""; /** - * Creates a new UpdatePeerInfoRequestMessage instance using the specified properties. + * Creates a new SecretContentMessage instance using the specified properties. * @function create - * @memberof agentInterface.UpdatePeerInfoRequestMessage + * @memberof agentInterface.SecretContentMessage * @static - * @param {agentInterface.IUpdatePeerInfoRequestMessage=} [properties] Properties to set - * @returns {agentInterface.UpdatePeerInfoRequestMessage} UpdatePeerInfoRequestMessage instance + * @param {agentInterface.ISecretContentMessage=} [properties] Properties to set + * @returns {agentInterface.SecretContentMessage} SecretContentMessage instance */ - UpdatePeerInfoRequestMessage.create = function create(properties) { - return new UpdatePeerInfoRequestMessage(properties); + SecretContentMessage.create = function create(properties) { + return new SecretContentMessage(properties); }; /** - * Encodes the specified UpdatePeerInfoRequestMessage message. Does not implicitly {@link agentInterface.UpdatePeerInfoRequestMessage.verify|verify} messages. + * Encodes the specified SecretContentMessage message. Does not implicitly {@link agentInterface.SecretContentMessage.verify|verify} messages. * @function encode - * @memberof agentInterface.UpdatePeerInfoRequestMessage + * @memberof agentInterface.SecretContentMessage * @static - * @param {agentInterface.IUpdatePeerInfoRequestMessage} m UpdatePeerInfoRequestMessage message or plain object to encode + * @param {agentInterface.ISecretContentMessage} m SecretContentMessage message or plain object to encode * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdatePeerInfoRequestMessage.encode = function encode(m, w) { + SecretContentMessage.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); - if (m.currentNode != null && Object.hasOwnProperty.call(m, "currentNode")) - w.uint32(16).bool(m.currentNode); - if (m.peerHost != null && Object.hasOwnProperty.call(m, "peerHost")) - w.uint32(26).string(m.peerHost); - if (m.peerPort != null && Object.hasOwnProperty.call(m, "peerPort")) - w.uint32(32).int32(m.peerPort); - if (m.relayPublicKey != null && Object.hasOwnProperty.call(m, "relayPublicKey")) - w.uint32(42).string(m.relayPublicKey); + if (m.secretPath != null && Object.hasOwnProperty.call(m, "secretPath")) + $root.agentInterface.SecretPathMessage.encode(m.secretPath, w.uint32(10).fork()).ldelim(); + if (m.secretFilePath != null && Object.hasOwnProperty.call(m, "secretFilePath")) + w.uint32(18).string(m.secretFilePath); + if (m.secretContent != null && Object.hasOwnProperty.call(m, "secretContent")) + w.uint32(26).string(m.secretContent); return w; }; /** - * Encodes the specified UpdatePeerInfoRequestMessage message, length delimited. Does not implicitly {@link agentInterface.UpdatePeerInfoRequestMessage.verify|verify} messages. + * Encodes the specified SecretContentMessage message, length delimited. Does not implicitly {@link agentInterface.SecretContentMessage.verify|verify} messages. * @function encodeDelimited - * @memberof agentInterface.UpdatePeerInfoRequestMessage + * @memberof agentInterface.SecretContentMessage * @static - * @param {agentInterface.IUpdatePeerInfoRequestMessage} message UpdatePeerInfoRequestMessage message or plain object to encode + * @param {agentInterface.ISecretContentMessage} message SecretContentMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdatePeerInfoRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { + SecretContentMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdatePeerInfoRequestMessage message from the specified reader or buffer. + * Decodes a SecretContentMessage message from the specified reader or buffer. * @function decode - * @memberof agentInterface.UpdatePeerInfoRequestMessage + * @memberof agentInterface.SecretContentMessage * @static * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.UpdatePeerInfoRequestMessage} UpdatePeerInfoRequestMessage + * @returns {agentInterface.SecretContentMessage} SecretContentMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdatePeerInfoRequestMessage.decode = function decode(r, l) { + SecretContentMessage.decode = function decode(r, l) { if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.UpdatePeerInfoRequestMessage(); + var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.SecretContentMessage(); while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { case 1: - m.publicKey = r.string(); + m.secretPath = $root.agentInterface.SecretPathMessage.decode(r, r.uint32()); break; case 2: - m.currentNode = r.bool(); + m.secretFilePath = r.string(); break; case 3: - m.peerHost = r.string(); - break; - case 4: - m.peerPort = r.int32(); - break; - case 5: - m.relayPublicKey = r.string(); + m.secretContent = r.string(); break; default: r.skipType(t & 7); @@ -8166,42 +2876,43 @@ $root.agentInterface = (function() { }; /** - * Decodes an UpdatePeerInfoRequestMessage message from the specified reader or buffer, length delimited. + * Decodes a SecretContentMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof agentInterface.UpdatePeerInfoRequestMessage + * @memberof agentInterface.SecretContentMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.UpdatePeerInfoRequestMessage} UpdatePeerInfoRequestMessage + * @returns {agentInterface.SecretContentMessage} SecretContentMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdatePeerInfoRequestMessage.decodeDelimited = function decodeDelimited(reader) { + SecretContentMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; - return UpdatePeerInfoRequestMessage; + return SecretContentMessage; })(); - agentInterface.UpdatePeerInfoResponseMessage = (function() { + agentInterface.EncryptFileMessage = (function() { /** - * Properties of an UpdatePeerInfoResponseMessage. + * Properties of an EncryptFileMessage. * @memberof agentInterface - * @interface IUpdatePeerInfoResponseMessage - * @property {boolean|null} [successful] UpdatePeerInfoResponseMessage successful + * @interface IEncryptFileMessage + * @property {string|null} [filePath] EncryptFileMessage filePath + * @property {string|null} [publicKeyPath] EncryptFileMessage publicKeyPath */ /** - * Constructs a new UpdatePeerInfoResponseMessage. + * Constructs a new EncryptFileMessage. * @memberof agentInterface - * @classdesc Represents an UpdatePeerInfoResponseMessage. - * @implements IUpdatePeerInfoResponseMessage + * @classdesc Represents an EncryptFileMessage. + * @implements IEncryptFileMessage * @constructor - * @param {agentInterface.IUpdatePeerInfoResponseMessage=} [p] Properties to set + * @param {agentInterface.IEncryptFileMessage=} [p] Properties to set */ - function UpdatePeerInfoResponseMessage(p) { + function EncryptFileMessage(p) { if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) @@ -8209,75 +2920,88 @@ $root.agentInterface = (function() { } /** - * UpdatePeerInfoResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.UpdatePeerInfoResponseMessage + * EncryptFileMessage filePath. + * @member {string} filePath + * @memberof agentInterface.EncryptFileMessage + * @instance + */ + EncryptFileMessage.prototype.filePath = ""; + + /** + * EncryptFileMessage publicKeyPath. + * @member {string} publicKeyPath + * @memberof agentInterface.EncryptFileMessage * @instance */ - UpdatePeerInfoResponseMessage.prototype.successful = false; + EncryptFileMessage.prototype.publicKeyPath = ""; /** - * Creates a new UpdatePeerInfoResponseMessage instance using the specified properties. + * Creates a new EncryptFileMessage instance using the specified properties. * @function create - * @memberof agentInterface.UpdatePeerInfoResponseMessage + * @memberof agentInterface.EncryptFileMessage * @static - * @param {agentInterface.IUpdatePeerInfoResponseMessage=} [properties] Properties to set - * @returns {agentInterface.UpdatePeerInfoResponseMessage} UpdatePeerInfoResponseMessage instance + * @param {agentInterface.IEncryptFileMessage=} [properties] Properties to set + * @returns {agentInterface.EncryptFileMessage} EncryptFileMessage instance */ - UpdatePeerInfoResponseMessage.create = function create(properties) { - return new UpdatePeerInfoResponseMessage(properties); + EncryptFileMessage.create = function create(properties) { + return new EncryptFileMessage(properties); }; /** - * Encodes the specified UpdatePeerInfoResponseMessage message. Does not implicitly {@link agentInterface.UpdatePeerInfoResponseMessage.verify|verify} messages. + * Encodes the specified EncryptFileMessage message. Does not implicitly {@link agentInterface.EncryptFileMessage.verify|verify} messages. * @function encode - * @memberof agentInterface.UpdatePeerInfoResponseMessage + * @memberof agentInterface.EncryptFileMessage * @static - * @param {agentInterface.IUpdatePeerInfoResponseMessage} m UpdatePeerInfoResponseMessage message or plain object to encode + * @param {agentInterface.IEncryptFileMessage} m EncryptFileMessage message or plain object to encode * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdatePeerInfoResponseMessage.encode = function encode(m, w) { + EncryptFileMessage.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); + if (m.filePath != null && Object.hasOwnProperty.call(m, "filePath")) + w.uint32(10).string(m.filePath); + if (m.publicKeyPath != null && Object.hasOwnProperty.call(m, "publicKeyPath")) + w.uint32(18).string(m.publicKeyPath); return w; }; /** - * Encodes the specified UpdatePeerInfoResponseMessage message, length delimited. Does not implicitly {@link agentInterface.UpdatePeerInfoResponseMessage.verify|verify} messages. + * Encodes the specified EncryptFileMessage message, length delimited. Does not implicitly {@link agentInterface.EncryptFileMessage.verify|verify} messages. * @function encodeDelimited - * @memberof agentInterface.UpdatePeerInfoResponseMessage + * @memberof agentInterface.EncryptFileMessage * @static - * @param {agentInterface.IUpdatePeerInfoResponseMessage} message UpdatePeerInfoResponseMessage message or plain object to encode + * @param {agentInterface.IEncryptFileMessage} message EncryptFileMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdatePeerInfoResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + EncryptFileMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdatePeerInfoResponseMessage message from the specified reader or buffer. + * Decodes an EncryptFileMessage message from the specified reader or buffer. * @function decode - * @memberof agentInterface.UpdatePeerInfoResponseMessage + * @memberof agentInterface.EncryptFileMessage * @static * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.UpdatePeerInfoResponseMessage} UpdatePeerInfoResponseMessage + * @returns {agentInterface.EncryptFileMessage} EncryptFileMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdatePeerInfoResponseMessage.decode = function decode(r, l) { + EncryptFileMessage.decode = function decode(r, l) { if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.UpdatePeerInfoResponseMessage(); + var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.EncryptFileMessage(); while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { case 1: - m.successful = r.bool(); + m.filePath = r.string(); + break; + case 2: + m.publicKeyPath = r.string(); break; default: r.skipType(t & 7); @@ -8288,42 +3012,44 @@ $root.agentInterface = (function() { }; /** - * Decodes an UpdatePeerInfoResponseMessage message from the specified reader or buffer, length delimited. + * Decodes an EncryptFileMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof agentInterface.UpdatePeerInfoResponseMessage + * @memberof agentInterface.EncryptFileMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.UpdatePeerInfoResponseMessage} UpdatePeerInfoResponseMessage + * @returns {agentInterface.EncryptFileMessage} EncryptFileMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdatePeerInfoResponseMessage.decodeDelimited = function decodeDelimited(reader) { + EncryptFileMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; - return UpdatePeerInfoResponseMessage; + return EncryptFileMessage; })(); - agentInterface.RequestRelayRequestMessage = (function() { + agentInterface.DecryptFileMessage = (function() { /** - * Properties of a RequestRelayRequestMessage. + * Properties of a DecryptFileMessage. * @memberof agentInterface - * @interface IRequestRelayRequestMessage - * @property {string|null} [publicKey] RequestRelayRequestMessage publicKey + * @interface IDecryptFileMessage + * @property {string|null} [filePath] DecryptFileMessage filePath + * @property {string|null} [privateKeyPath] DecryptFileMessage privateKeyPath + * @property {string|null} [passphrase] DecryptFileMessage passphrase */ /** - * Constructs a new RequestRelayRequestMessage. + * Constructs a new DecryptFileMessage. * @memberof agentInterface - * @classdesc Represents a RequestRelayRequestMessage. - * @implements IRequestRelayRequestMessage + * @classdesc Represents a DecryptFileMessage. + * @implements IDecryptFileMessage * @constructor - * @param {agentInterface.IRequestRelayRequestMessage=} [p] Properties to set + * @param {agentInterface.IDecryptFileMessage=} [p] Properties to set */ - function RequestRelayRequestMessage(p) { + function DecryptFileMessage(p) { if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) @@ -8331,75 +3057,101 @@ $root.agentInterface = (function() { } /** - * RequestRelayRequestMessage publicKey. - * @member {string} publicKey - * @memberof agentInterface.RequestRelayRequestMessage + * DecryptFileMessage filePath. + * @member {string} filePath + * @memberof agentInterface.DecryptFileMessage + * @instance + */ + DecryptFileMessage.prototype.filePath = ""; + + /** + * DecryptFileMessage privateKeyPath. + * @member {string} privateKeyPath + * @memberof agentInterface.DecryptFileMessage + * @instance + */ + DecryptFileMessage.prototype.privateKeyPath = ""; + + /** + * DecryptFileMessage passphrase. + * @member {string} passphrase + * @memberof agentInterface.DecryptFileMessage * @instance */ - RequestRelayRequestMessage.prototype.publicKey = ""; + DecryptFileMessage.prototype.passphrase = ""; /** - * Creates a new RequestRelayRequestMessage instance using the specified properties. + * Creates a new DecryptFileMessage instance using the specified properties. * @function create - * @memberof agentInterface.RequestRelayRequestMessage + * @memberof agentInterface.DecryptFileMessage * @static - * @param {agentInterface.IRequestRelayRequestMessage=} [properties] Properties to set - * @returns {agentInterface.RequestRelayRequestMessage} RequestRelayRequestMessage instance + * @param {agentInterface.IDecryptFileMessage=} [properties] Properties to set + * @returns {agentInterface.DecryptFileMessage} DecryptFileMessage instance */ - RequestRelayRequestMessage.create = function create(properties) { - return new RequestRelayRequestMessage(properties); + DecryptFileMessage.create = function create(properties) { + return new DecryptFileMessage(properties); }; /** - * Encodes the specified RequestRelayRequestMessage message. Does not implicitly {@link agentInterface.RequestRelayRequestMessage.verify|verify} messages. + * Encodes the specified DecryptFileMessage message. Does not implicitly {@link agentInterface.DecryptFileMessage.verify|verify} messages. * @function encode - * @memberof agentInterface.RequestRelayRequestMessage + * @memberof agentInterface.DecryptFileMessage * @static - * @param {agentInterface.IRequestRelayRequestMessage} m RequestRelayRequestMessage message or plain object to encode + * @param {agentInterface.IDecryptFileMessage} m DecryptFileMessage message or plain object to encode * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestRelayRequestMessage.encode = function encode(m, w) { + DecryptFileMessage.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); + if (m.filePath != null && Object.hasOwnProperty.call(m, "filePath")) + w.uint32(10).string(m.filePath); + if (m.privateKeyPath != null && Object.hasOwnProperty.call(m, "privateKeyPath")) + w.uint32(18).string(m.privateKeyPath); + if (m.passphrase != null && Object.hasOwnProperty.call(m, "passphrase")) + w.uint32(26).string(m.passphrase); return w; }; /** - * Encodes the specified RequestRelayRequestMessage message, length delimited. Does not implicitly {@link agentInterface.RequestRelayRequestMessage.verify|verify} messages. + * Encodes the specified DecryptFileMessage message, length delimited. Does not implicitly {@link agentInterface.DecryptFileMessage.verify|verify} messages. * @function encodeDelimited - * @memberof agentInterface.RequestRelayRequestMessage + * @memberof agentInterface.DecryptFileMessage * @static - * @param {agentInterface.IRequestRelayRequestMessage} message RequestRelayRequestMessage message or plain object to encode + * @param {agentInterface.IDecryptFileMessage} message DecryptFileMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestRelayRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { + DecryptFileMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RequestRelayRequestMessage message from the specified reader or buffer. + * Decodes a DecryptFileMessage message from the specified reader or buffer. * @function decode - * @memberof agentInterface.RequestRelayRequestMessage + * @memberof agentInterface.DecryptFileMessage * @static * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.RequestRelayRequestMessage} RequestRelayRequestMessage + * @returns {agentInterface.DecryptFileMessage} DecryptFileMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestRelayRequestMessage.decode = function decode(r, l) { + DecryptFileMessage.decode = function decode(r, l) { if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.RequestRelayRequestMessage(); + var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.DecryptFileMessage(); while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { case 1: - m.publicKey = r.string(); + m.filePath = r.string(); + break; + case 2: + m.privateKeyPath = r.string(); + break; + case 3: + m.passphrase = r.string(); break; default: r.skipType(t & 7); @@ -8410,42 +3162,43 @@ $root.agentInterface = (function() { }; /** - * Decodes a RequestRelayRequestMessage message from the specified reader or buffer, length delimited. + * Decodes a DecryptFileMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof agentInterface.RequestRelayRequestMessage + * @memberof agentInterface.DecryptFileMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.RequestRelayRequestMessage} RequestRelayRequestMessage + * @returns {agentInterface.DecryptFileMessage} DecryptFileMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestRelayRequestMessage.decodeDelimited = function decodeDelimited(reader) { + DecryptFileMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; - return RequestRelayRequestMessage; + return DecryptFileMessage; })(); - agentInterface.RequestRelayResponseMessage = (function() { + agentInterface.KeyPairMessage = (function() { /** - * Properties of a RequestRelayResponseMessage. + * Properties of a KeyPairMessage. * @memberof agentInterface - * @interface IRequestRelayResponseMessage - * @property {boolean|null} [successful] RequestRelayResponseMessage successful + * @interface IKeyPairMessage + * @property {string|null} [publicKey] KeyPairMessage publicKey + * @property {string|null} [privateKey] KeyPairMessage privateKey */ /** - * Constructs a new RequestRelayResponseMessage. + * Constructs a new KeyPairMessage. * @memberof agentInterface - * @classdesc Represents a RequestRelayResponseMessage. - * @implements IRequestRelayResponseMessage + * @classdesc Represents a KeyPairMessage. + * @implements IKeyPairMessage * @constructor - * @param {agentInterface.IRequestRelayResponseMessage=} [p] Properties to set + * @param {agentInterface.IKeyPairMessage=} [p] Properties to set */ - function RequestRelayResponseMessage(p) { + function KeyPairMessage(p) { if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) @@ -8453,75 +3206,88 @@ $root.agentInterface = (function() { } /** - * RequestRelayResponseMessage successful. - * @member {boolean} successful - * @memberof agentInterface.RequestRelayResponseMessage + * KeyPairMessage publicKey. + * @member {string} publicKey + * @memberof agentInterface.KeyPairMessage + * @instance + */ + KeyPairMessage.prototype.publicKey = ""; + + /** + * KeyPairMessage privateKey. + * @member {string} privateKey + * @memberof agentInterface.KeyPairMessage * @instance */ - RequestRelayResponseMessage.prototype.successful = false; + KeyPairMessage.prototype.privateKey = ""; /** - * Creates a new RequestRelayResponseMessage instance using the specified properties. + * Creates a new KeyPairMessage instance using the specified properties. * @function create - * @memberof agentInterface.RequestRelayResponseMessage + * @memberof agentInterface.KeyPairMessage * @static - * @param {agentInterface.IRequestRelayResponseMessage=} [properties] Properties to set - * @returns {agentInterface.RequestRelayResponseMessage} RequestRelayResponseMessage instance + * @param {agentInterface.IKeyPairMessage=} [properties] Properties to set + * @returns {agentInterface.KeyPairMessage} KeyPairMessage instance */ - RequestRelayResponseMessage.create = function create(properties) { - return new RequestRelayResponseMessage(properties); + KeyPairMessage.create = function create(properties) { + return new KeyPairMessage(properties); }; /** - * Encodes the specified RequestRelayResponseMessage message. Does not implicitly {@link agentInterface.RequestRelayResponseMessage.verify|verify} messages. + * Encodes the specified KeyPairMessage message. Does not implicitly {@link agentInterface.KeyPairMessage.verify|verify} messages. * @function encode - * @memberof agentInterface.RequestRelayResponseMessage + * @memberof agentInterface.KeyPairMessage * @static - * @param {agentInterface.IRequestRelayResponseMessage} m RequestRelayResponseMessage message or plain object to encode + * @param {agentInterface.IKeyPairMessage} m KeyPairMessage message or plain object to encode * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestRelayResponseMessage.encode = function encode(m, w) { + KeyPairMessage.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.successful != null && Object.hasOwnProperty.call(m, "successful")) - w.uint32(8).bool(m.successful); + if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) + w.uint32(10).string(m.publicKey); + if (m.privateKey != null && Object.hasOwnProperty.call(m, "privateKey")) + w.uint32(18).string(m.privateKey); return w; }; /** - * Encodes the specified RequestRelayResponseMessage message, length delimited. Does not implicitly {@link agentInterface.RequestRelayResponseMessage.verify|verify} messages. + * Encodes the specified KeyPairMessage message, length delimited. Does not implicitly {@link agentInterface.KeyPairMessage.verify|verify} messages. * @function encodeDelimited - * @memberof agentInterface.RequestRelayResponseMessage + * @memberof agentInterface.KeyPairMessage * @static - * @param {agentInterface.IRequestRelayResponseMessage} message RequestRelayResponseMessage message or plain object to encode + * @param {agentInterface.IKeyPairMessage} message KeyPairMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestRelayResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + KeyPairMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RequestRelayResponseMessage message from the specified reader or buffer. + * Decodes a KeyPairMessage message from the specified reader or buffer. * @function decode - * @memberof agentInterface.RequestRelayResponseMessage + * @memberof agentInterface.KeyPairMessage * @static * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.RequestRelayResponseMessage} RequestRelayResponseMessage + * @returns {agentInterface.KeyPairMessage} KeyPairMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestRelayResponseMessage.decode = function decode(r, l) { + KeyPairMessage.decode = function decode(r, l) { if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.RequestRelayResponseMessage(); + var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.KeyPairMessage(); while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { case 1: - m.successful = r.bool(); + m.publicKey = r.string(); + break; + case 2: + m.privateKey = r.string(); break; default: r.skipType(t & 7); @@ -8532,42 +3298,43 @@ $root.agentInterface = (function() { }; /** - * Decodes a RequestRelayResponseMessage message from the specified reader or buffer, length delimited. + * Decodes a KeyPairMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof agentInterface.RequestRelayResponseMessage + * @memberof agentInterface.KeyPairMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.RequestRelayResponseMessage} RequestRelayResponseMessage + * @returns {agentInterface.KeyPairMessage} KeyPairMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestRelayResponseMessage.decodeDelimited = function decodeDelimited(reader) { + KeyPairMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; - return RequestRelayResponseMessage; + return KeyPairMessage; })(); - agentInterface.RequestPunchRequestMessage = (function() { + agentInterface.VaultPathMessage = (function() { /** - * Properties of a RequestPunchRequestMessage. + * Properties of a VaultPathMessage. * @memberof agentInterface - * @interface IRequestPunchRequestMessage - * @property {string|null} [publicKey] RequestPunchRequestMessage publicKey + * @interface IVaultPathMessage + * @property {string|null} [vaultName] VaultPathMessage vaultName + * @property {string|null} [publicKey] VaultPathMessage publicKey */ /** - * Constructs a new RequestPunchRequestMessage. + * Constructs a new VaultPathMessage. * @memberof agentInterface - * @classdesc Represents a RequestPunchRequestMessage. - * @implements IRequestPunchRequestMessage + * @classdesc Represents a VaultPathMessage. + * @implements IVaultPathMessage * @constructor - * @param {agentInterface.IRequestPunchRequestMessage=} [p] Properties to set + * @param {agentInterface.IVaultPathMessage=} [p] Properties to set */ - function RequestPunchRequestMessage(p) { + function VaultPathMessage(p) { if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) @@ -8575,74 +3342,87 @@ $root.agentInterface = (function() { } /** - * RequestPunchRequestMessage publicKey. + * VaultPathMessage vaultName. + * @member {string} vaultName + * @memberof agentInterface.VaultPathMessage + * @instance + */ + VaultPathMessage.prototype.vaultName = ""; + + /** + * VaultPathMessage publicKey. * @member {string} publicKey - * @memberof agentInterface.RequestPunchRequestMessage + * @memberof agentInterface.VaultPathMessage * @instance */ - RequestPunchRequestMessage.prototype.publicKey = ""; + VaultPathMessage.prototype.publicKey = ""; /** - * Creates a new RequestPunchRequestMessage instance using the specified properties. + * Creates a new VaultPathMessage instance using the specified properties. * @function create - * @memberof agentInterface.RequestPunchRequestMessage + * @memberof agentInterface.VaultPathMessage * @static - * @param {agentInterface.IRequestPunchRequestMessage=} [properties] Properties to set - * @returns {agentInterface.RequestPunchRequestMessage} RequestPunchRequestMessage instance + * @param {agentInterface.IVaultPathMessage=} [properties] Properties to set + * @returns {agentInterface.VaultPathMessage} VaultPathMessage instance */ - RequestPunchRequestMessage.create = function create(properties) { - return new RequestPunchRequestMessage(properties); + VaultPathMessage.create = function create(properties) { + return new VaultPathMessage(properties); }; /** - * Encodes the specified RequestPunchRequestMessage message. Does not implicitly {@link agentInterface.RequestPunchRequestMessage.verify|verify} messages. + * Encodes the specified VaultPathMessage message. Does not implicitly {@link agentInterface.VaultPathMessage.verify|verify} messages. * @function encode - * @memberof agentInterface.RequestPunchRequestMessage + * @memberof agentInterface.VaultPathMessage * @static - * @param {agentInterface.IRequestPunchRequestMessage} m RequestPunchRequestMessage message or plain object to encode + * @param {agentInterface.IVaultPathMessage} m VaultPathMessage message or plain object to encode * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestPunchRequestMessage.encode = function encode(m, w) { + VaultPathMessage.encode = function encode(m, w) { if (!w) w = $Writer.create(); + if (m.vaultName != null && Object.hasOwnProperty.call(m, "vaultName")) + w.uint32(10).string(m.vaultName); if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - w.uint32(10).string(m.publicKey); + w.uint32(18).string(m.publicKey); return w; }; /** - * Encodes the specified RequestPunchRequestMessage message, length delimited. Does not implicitly {@link agentInterface.RequestPunchRequestMessage.verify|verify} messages. + * Encodes the specified VaultPathMessage message, length delimited. Does not implicitly {@link agentInterface.VaultPathMessage.verify|verify} messages. * @function encodeDelimited - * @memberof agentInterface.RequestPunchRequestMessage + * @memberof agentInterface.VaultPathMessage * @static - * @param {agentInterface.IRequestPunchRequestMessage} message RequestPunchRequestMessage message or plain object to encode + * @param {agentInterface.IVaultPathMessage} message VaultPathMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestPunchRequestMessage.encodeDelimited = function encodeDelimited(message, writer) { + VaultPathMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RequestPunchRequestMessage message from the specified reader or buffer. + * Decodes a VaultPathMessage message from the specified reader or buffer. * @function decode - * @memberof agentInterface.RequestPunchRequestMessage + * @memberof agentInterface.VaultPathMessage * @static * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.RequestPunchRequestMessage} RequestPunchRequestMessage + * @returns {agentInterface.VaultPathMessage} VaultPathMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestPunchRequestMessage.decode = function decode(r, l) { + VaultPathMessage.decode = function decode(r, l) { if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.RequestPunchRequestMessage(); + var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.VaultPathMessage(); while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { case 1: + m.vaultName = r.string(); + break; + case 2: m.publicKey = r.string(); break; default: @@ -8654,42 +3434,43 @@ $root.agentInterface = (function() { }; /** - * Decodes a RequestPunchRequestMessage message from the specified reader or buffer, length delimited. + * Decodes a VaultPathMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof agentInterface.RequestPunchRequestMessage + * @memberof agentInterface.VaultPathMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.RequestPunchRequestMessage} RequestPunchRequestMessage + * @returns {agentInterface.VaultPathMessage} VaultPathMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestPunchRequestMessage.decodeDelimited = function decodeDelimited(reader) { + VaultPathMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; - return RequestPunchRequestMessage; + return VaultPathMessage; })(); - agentInterface.RequestPunchResponseMessage = (function() { + agentInterface.ContactPeerMessage = (function() { /** - * Properties of a RequestPunchResponseMessage. + * Properties of a ContactPeerMessage. * @memberof agentInterface - * @interface IRequestPunchResponseMessage - * @property {string|null} [address] RequestPunchResponseMessage address + * @interface IContactPeerMessage + * @property {string|null} [publicKeyOrHandle] ContactPeerMessage publicKeyOrHandle + * @property {number|null} [timeout] ContactPeerMessage timeout */ /** - * Constructs a new RequestPunchResponseMessage. + * Constructs a new ContactPeerMessage. * @memberof agentInterface - * @classdesc Represents a RequestPunchResponseMessage. - * @implements IRequestPunchResponseMessage + * @classdesc Represents a ContactPeerMessage. + * @implements IContactPeerMessage * @constructor - * @param {agentInterface.IRequestPunchResponseMessage=} [p] Properties to set + * @param {agentInterface.IContactPeerMessage=} [p] Properties to set */ - function RequestPunchResponseMessage(p) { + function ContactPeerMessage(p) { if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) @@ -8697,75 +3478,88 @@ $root.agentInterface = (function() { } /** - * RequestPunchResponseMessage address. - * @member {string} address - * @memberof agentInterface.RequestPunchResponseMessage + * ContactPeerMessage publicKeyOrHandle. + * @member {string} publicKeyOrHandle + * @memberof agentInterface.ContactPeerMessage + * @instance + */ + ContactPeerMessage.prototype.publicKeyOrHandle = ""; + + /** + * ContactPeerMessage timeout. + * @member {number} timeout + * @memberof agentInterface.ContactPeerMessage * @instance */ - RequestPunchResponseMessage.prototype.address = ""; + ContactPeerMessage.prototype.timeout = 0; /** - * Creates a new RequestPunchResponseMessage instance using the specified properties. + * Creates a new ContactPeerMessage instance using the specified properties. * @function create - * @memberof agentInterface.RequestPunchResponseMessage + * @memberof agentInterface.ContactPeerMessage * @static - * @param {agentInterface.IRequestPunchResponseMessage=} [properties] Properties to set - * @returns {agentInterface.RequestPunchResponseMessage} RequestPunchResponseMessage instance + * @param {agentInterface.IContactPeerMessage=} [properties] Properties to set + * @returns {agentInterface.ContactPeerMessage} ContactPeerMessage instance */ - RequestPunchResponseMessage.create = function create(properties) { - return new RequestPunchResponseMessage(properties); + ContactPeerMessage.create = function create(properties) { + return new ContactPeerMessage(properties); }; /** - * Encodes the specified RequestPunchResponseMessage message. Does not implicitly {@link agentInterface.RequestPunchResponseMessage.verify|verify} messages. + * Encodes the specified ContactPeerMessage message. Does not implicitly {@link agentInterface.ContactPeerMessage.verify|verify} messages. * @function encode - * @memberof agentInterface.RequestPunchResponseMessage + * @memberof agentInterface.ContactPeerMessage * @static - * @param {agentInterface.IRequestPunchResponseMessage} m RequestPunchResponseMessage message or plain object to encode + * @param {agentInterface.IContactPeerMessage} m ContactPeerMessage message or plain object to encode * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestPunchResponseMessage.encode = function encode(m, w) { + ContactPeerMessage.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.address != null && Object.hasOwnProperty.call(m, "address")) - w.uint32(10).string(m.address); + if (m.publicKeyOrHandle != null && Object.hasOwnProperty.call(m, "publicKeyOrHandle")) + w.uint32(10).string(m.publicKeyOrHandle); + if (m.timeout != null && Object.hasOwnProperty.call(m, "timeout")) + w.uint32(16).int32(m.timeout); return w; }; /** - * Encodes the specified RequestPunchResponseMessage message, length delimited. Does not implicitly {@link agentInterface.RequestPunchResponseMessage.verify|verify} messages. + * Encodes the specified ContactPeerMessage message, length delimited. Does not implicitly {@link agentInterface.ContactPeerMessage.verify|verify} messages. * @function encodeDelimited - * @memberof agentInterface.RequestPunchResponseMessage + * @memberof agentInterface.ContactPeerMessage * @static - * @param {agentInterface.IRequestPunchResponseMessage} message RequestPunchResponseMessage message or plain object to encode + * @param {agentInterface.IContactPeerMessage} message ContactPeerMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestPunchResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + ContactPeerMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RequestPunchResponseMessage message from the specified reader or buffer. + * Decodes a ContactPeerMessage message from the specified reader or buffer. * @function decode - * @memberof agentInterface.RequestPunchResponseMessage + * @memberof agentInterface.ContactPeerMessage * @static * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from * @param {number} [l] Message length if known beforehand - * @returns {agentInterface.RequestPunchResponseMessage} RequestPunchResponseMessage + * @returns {agentInterface.ContactPeerMessage} ContactPeerMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestPunchResponseMessage.decode = function decode(r, l) { + ContactPeerMessage.decode = function decode(r, l) { if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.RequestPunchResponseMessage(); + var c = l === undefined ? r.len : r.pos + l, m = new $root.agentInterface.ContactPeerMessage(); while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { case 1: - m.address = r.string(); + m.publicKeyOrHandle = r.string(); + break; + case 2: + m.timeout = r.int32(); break; default: r.skipType(t & 7); @@ -8776,22 +3570,22 @@ $root.agentInterface = (function() { }; /** - * Decodes a RequestPunchResponseMessage message from the specified reader or buffer, length delimited. + * Decodes a ContactPeerMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof agentInterface.RequestPunchResponseMessage + * @memberof agentInterface.ContactPeerMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {agentInterface.RequestPunchResponseMessage} RequestPunchResponseMessage + * @returns {agentInterface.ContactPeerMessage} ContactPeerMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestPunchResponseMessage.decodeDelimited = function decodeDelimited(reader) { + ContactPeerMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; - return RequestPunchResponseMessage; + return ContactPeerMessage; })(); return agentInterface; diff --git a/proto/js/Git.js b/proto/js/Git.js index dd5c8e9019..a8ef5b0b50 100644 --- a/proto/js/Git.js +++ b/proto/js/Git.js @@ -100,9 +100,9 @@ $root.gitInterface = (function() { if (!w) w = $Writer.create(); if (m.type != null && Object.hasOwnProperty.call(m, "type")) - w.uint32(0).int32(m.type); + w.uint32(8).int32(m.type); if (m.subMessage != null && Object.hasOwnProperty.call(m, "subMessage")) - w.uint32(10).bytes(m.subMessage); + w.uint32(18).bytes(m.subMessage); return w; }; @@ -137,10 +137,10 @@ $root.gitInterface = (function() { while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { - case 0: + case 1: m.type = r.int32(); break; - case 1: + case 2: m.subMessage = r.bytes(); break; default: diff --git a/proto/js/Peer.d.ts b/proto/js/Peer.d.ts index 0f04e305dd..59652f2c50 100644 --- a/proto/js/Peer.d.ts +++ b/proto/js/Peer.d.ts @@ -213,11 +213,14 @@ declare namespace Peer { /** PeerInfoMessage publicKey */ publicKey?: (string|null); + /** PeerInfoMessage relayPublicKey */ + relayPublicKey?: (string|null); + /** PeerInfoMessage peerAddress */ peerAddress?: (string|null); - /** PeerInfoMessage relayPublicKey */ - relayPublicKey?: (string|null); + /** PeerInfoMessage apiAddress */ + apiAddress?: (string|null); } /** Represents a PeerInfoMessage. */ @@ -232,11 +235,14 @@ declare namespace Peer { /** PeerInfoMessage publicKey. */ public publicKey: string; + /** PeerInfoMessage relayPublicKey. */ + public relayPublicKey: string; + /** PeerInfoMessage peerAddress. */ public peerAddress: string; - /** PeerInfoMessage relayPublicKey. */ - public relayPublicKey: string; + /** PeerInfoMessage apiAddress. */ + public apiAddress: string; /** * Creates a new PeerInfoMessage instance using the specified properties. diff --git a/proto/js/Peer.js b/proto/js/Peer.js index c22deb19c3..29db252bdb 100644 --- a/proto/js/Peer.js +++ b/proto/js/Peer.js @@ -409,8 +409,9 @@ $root.peerInterface = (function() { * @memberof peerInterface * @interface IPeerInfoMessage * @property {string|null} [publicKey] PeerInfoMessage publicKey - * @property {string|null} [peerAddress] PeerInfoMessage peerAddress * @property {string|null} [relayPublicKey] PeerInfoMessage relayPublicKey + * @property {string|null} [peerAddress] PeerInfoMessage peerAddress + * @property {string|null} [apiAddress] PeerInfoMessage apiAddress */ /** @@ -436,6 +437,14 @@ $root.peerInterface = (function() { */ PeerInfoMessage.prototype.publicKey = ""; + /** + * PeerInfoMessage relayPublicKey. + * @member {string} relayPublicKey + * @memberof peerInterface.PeerInfoMessage + * @instance + */ + PeerInfoMessage.prototype.relayPublicKey = ""; + /** * PeerInfoMessage peerAddress. * @member {string} peerAddress @@ -445,12 +454,12 @@ $root.peerInterface = (function() { PeerInfoMessage.prototype.peerAddress = ""; /** - * PeerInfoMessage relayPublicKey. - * @member {string} relayPublicKey + * PeerInfoMessage apiAddress. + * @member {string} apiAddress * @memberof peerInterface.PeerInfoMessage * @instance */ - PeerInfoMessage.prototype.relayPublicKey = ""; + PeerInfoMessage.prototype.apiAddress = ""; /** * Creates a new PeerInfoMessage instance using the specified properties. @@ -478,10 +487,12 @@ $root.peerInterface = (function() { w = $Writer.create(); if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) w.uint32(10).string(m.publicKey); - if (m.peerAddress != null && Object.hasOwnProperty.call(m, "peerAddress")) - w.uint32(18).string(m.peerAddress); if (m.relayPublicKey != null && Object.hasOwnProperty.call(m, "relayPublicKey")) - w.uint32(26).string(m.relayPublicKey); + w.uint32(18).string(m.relayPublicKey); + if (m.peerAddress != null && Object.hasOwnProperty.call(m, "peerAddress")) + w.uint32(26).string(m.peerAddress); + if (m.apiAddress != null && Object.hasOwnProperty.call(m, "apiAddress")) + w.uint32(34).string(m.apiAddress); return w; }; @@ -520,10 +531,13 @@ $root.peerInterface = (function() { m.publicKey = r.string(); break; case 2: - m.peerAddress = r.string(); + m.relayPublicKey = r.string(); break; case 3: - m.relayPublicKey = r.string(); + m.peerAddress = r.string(); + break; + case 4: + m.apiAddress = r.string(); break; default: r.skipType(t & 7); diff --git a/src/api/HttpApi.ts b/src/api/HttpApi.ts index 40095f5c09..0fd2d22f1e 100644 --- a/src/api/HttpApi.ts +++ b/src/api/HttpApi.ts @@ -1,7 +1,7 @@ import fs from 'fs'; import net from 'net'; import http from 'http'; -import path from 'path' +import path from 'path'; import jsyaml from 'js-yaml'; import connect from 'connect'; import swaggerTools from 'swagger-tools'; @@ -42,15 +42,15 @@ class HttpApi { async start(port: number = 0): Promise { return await new Promise((resolve, reject) => { // this code is needed as we can't require yaml files - let yamlDoc: string - const fromSrcFolderPath = path.join(__dirname, '../../openapi.yaml') - const fromDistFolderPath = path.join(__dirname, '../openapi.yaml') + let yamlDoc: string; + const fromSrcFolderPath = path.join(__dirname, '../../openapi.yaml'); + const fromDistFolderPath = path.join(__dirname, '../openapi.yaml'); if (fs.existsSync(fromSrcFolderPath)) { - yamlDoc = fs.readFileSync(fromSrcFolderPath).toString() + yamlDoc = fs.readFileSync(fromSrcFolderPath).toString(); } else { - yamlDoc = fs.readFileSync(fromDistFolderPath).toString() + yamlDoc = fs.readFileSync(fromDistFolderPath).toString(); } - const swaggerDoc = jsyaml.load(yamlDoc) + const swaggerDoc = jsyaml.load(yamlDoc); // Initialize the Swagger middleware swaggerTools.initializeMiddleware(swaggerDoc, (middleware) => { @@ -61,11 +61,13 @@ class HttpApi { this.connectServer.use(middleware.swaggerValidator()); // Route validated requests to appropriate controller - this.connectServer.use(middleware.swaggerRouter({ - controllers: this.ControllerOptions, - // controllers: path.join(__dirname, './controllers'), - useStubs: process.env.NODE_ENV === 'development', // Conditionally turn on stubs (mock mode) - })); + this.connectServer.use( + middleware.swaggerRouter({ + controllers: this.ControllerOptions, + // controllers: path.join(__dirname, './controllers'), + useStubs: process.env.NODE_ENV === 'development', // Conditionally turn on stubs (mock mode) + }), + ); // Serve the Swagger documents and Swagger UI this.connectServer.use(middleware.swaggerUi()); @@ -132,12 +134,12 @@ class HttpApi { // === Helper methods === // private writeJson(response: http.ServerResponse, payload?: Object | Error | Array, code: number = 200) { - let responseString: string | undefined + let responseString: string | undefined; if (!payload) { - responseString = undefined + responseString = undefined; } else if (payload instanceof Error) { - code = 500 - responseString = JSON.stringify({error: payload.message}, null, 2); + code = 500; + responseString = JSON.stringify({ error: payload.message }, null, 2); } else { responseString = JSON.stringify(payload, null, 2); } diff --git a/src/vaults/VaultManager.ts b/src/vaults/VaultManager.ts index 7b6b631c19..205c5443b2 100644 --- a/src/vaults/VaultManager.ts +++ b/src/vaults/VaultManager.ts @@ -54,7 +54,6 @@ class VaultManager { this.loadEncryptedMetadata(); } - /** * Get the names of all vaults in memory */